Mercurial > emacs
comparison lisp/vcursor.el @ 89909:68c22ea6027c
Sync to HEAD
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 16 Apr 2004 12:51:06 +0000 |
parents | 375f2633d815 |
children | a1b34dec1104 |
comparison
equal
deleted
inserted
replaced
89908:ee1402f7b568 | 89909:68c22ea6027c |
---|---|
312 ;; - vcursor-window-funcall could perhaps be smarter about restoring | 312 ;; - vcursor-window-funcall could perhaps be smarter about restoring |
313 ;; the previous window state on failure. | 313 ;; the previous window state on failure. |
314 ;; - The logic in vcursor-find-window is rather complicated and | 314 ;; - The logic in vcursor-find-window is rather complicated and |
315 ;; therefore bug-prone, though in practice it seems to work OK. | 315 ;; therefore bug-prone, though in practice it seems to work OK. |
316 ;; | 316 ;; |
317 ;; Possible enhnacements: | 317 ;; Possible enhancements: |
318 ;; It would be easy to implement vcursor-push (save vcursor position | 318 ;; It would be easy to implement vcursor-push (save vcursor position |
319 ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and | 319 ;; as mark and deactivate) and vcursor-pop (deactivate vcursor and |
320 ;; move to last pushed position) functions. | 320 ;; move to last pushed position) functions. |
321 | 321 |
322 ;;; Code: | 322 ;;; Code: |
340 If non-nil but not t, just make sure copying is toggled off, but don't | 340 If non-nil but not t, just make sure copying is toggled off, but don't |
341 disable the vcursor." | 341 disable the vcursor." |
342 :type '(choice (const t) (const nil) (const copy)) | 342 :type '(choice (const t) (const nil) (const copy)) |
343 :group 'vcursor) | 343 :group 'vcursor) |
344 | 344 |
345 (defcustom vcursor-modifiers (list 'control 'shift) | |
346 "*A list of modifiers that are used to define vcursor key bindings." | |
347 :type '(repeat symbol) | |
348 :group 'vcursor) | |
349 | |
345 ;; Needed for defcustom, must be up here | 350 ;; Needed for defcustom, must be up here |
346 (defun vcursor-cs-binding (base &optional meta) | 351 (defun vcursor-cs-binding (base &optional meta) |
347 (vector (let ((key (list 'control 'shift (intern base)))) | 352 (vector (let ((key (append vcursor-modifiers (list (intern base))))) |
348 (if meta | 353 (if meta |
349 (cons 'meta key) | 354 (cons 'meta key) |
350 key)))) | 355 key)))) |
351 | 356 |
352 (defun vcursor-bind-keys (var value) | 357 (defun vcursor-bind-keys (var value) |
1159 | 1164 |
1160 (add-hook 'post-command-hook 'vcursor-post-command) | 1165 (add-hook 'post-command-hook 'vcursor-post-command) |
1161 | 1166 |
1162 (provide 'vcursor) | 1167 (provide 'vcursor) |
1163 | 1168 |
1169 ;;; arch-tag: cdfe1cdc-2c46-4046-88e4-ed57d20f7aca | |
1164 ;;; vcursor.el ends here | 1170 ;;; vcursor.el ends here |