0
開始位置(b)と終了位置(e)を指定して、私はmovement keys with shiftをbからeに打ち込むが、elispでは同じ動作をしたい。選択は、移動キーなしでキャンセルできるので、set-mark-commandは私が望むものではありません。シフトをプログラム的に実行する
開始位置(b)と終了位置(e)を指定して、私はmovement keys with shiftをbからeに打ち込むが、elispでは同じ動作をしたい。選択は、移動キーなしでキャンセルできるので、set-mark-commandは私が望むものではありません。シフトをプログラム的に実行する
あなたは試すことができます:
(defun my-mark-region-as-shifted (other-end)
(let ((pos (point)))
(goto-char other-end)
(setq-local transient-mark-mode
(cons 'only
(unless (eq transient-mark-mode 'lambda)
transient-mark-mode)))
(push-mark nil nil t)
(goto-char pos)))
このコードは、主にhandle-shift-selection
から持ち上げられます。
これは機能します。ありがとう! – AhLeung