Mercurial > hg > xemacs-beta
comparison lisp/list-mode.el @ 274:ca9a9ec9c1c1 r21-0b35
Import from CVS: tag r21-0b35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:29:42 +0200 |
parents | 41ff10fd062f |
children | 6cb5e14cd98e |
comparison
equal
deleted
inserted
replaced
273:411aac7253ef | 274:ca9a9ec9c1c1 |
---|---|
42 (let ((map (setq list-mode-map (make-sparse-keymap 'list-mode-map)))) | 42 (let ((map (setq list-mode-map (make-sparse-keymap 'list-mode-map)))) |
43 (suppress-keymap map) | 43 (suppress-keymap map) |
44 (define-key map 'button2up 'list-mode-item-mouse-selected) | 44 (define-key map 'button2up 'list-mode-item-mouse-selected) |
45 (define-key map 'button2 'undefined) | 45 (define-key map 'button2 'undefined) |
46 (define-key map "\C-m" 'list-mode-item-keyboard-selected) | 46 (define-key map "\C-m" 'list-mode-item-keyboard-selected) |
47 (substitute-key-definition 'forward-char 'next-list-mode-item map | 47 ;; |
48 global-map) | 48 ;; The following calls to `substitute-key-definition' losed because |
49 (substitute-key-definition 'backward-char 'previous-list-mode-item map | 49 ;; they were based on an incorrect assumption that `forward-char' and |
50 global-map))) | 50 ;; `backward-char' are bound to keys in the global map. This might not |
51 ;; be the case if a user binds motion keys to different functions, | |
52 ;; and was not actually the case since 20.5 beta 28 or around. | |
53 ;; | |
54 ;; (substitute-key-definition 'forward-char 'next-list-mode-item map | |
55 ;; global-map) | |
56 ;; (substitute-key-definition 'backward-char 'previous-list-mode-item map | |
57 ;; global-map) | |
58 ;; | |
59 ;; We bind standard keys to motion commands instead. | |
60 ;; | |
61 (dolist (key '(kp-right right (control ?f))) | |
62 (define-key map key 'next-list-mode-item)) | |
63 (dolist (key '(kp-left left (control ?b))) | |
64 (define-key map key 'previous-list-mode-item)))) | |
51 | 65 |
52 (defun list-mode () | 66 (defun list-mode () |
53 "Major mode for buffer containing lists of items." | 67 "Major mode for buffer containing lists of items." |
54 (interactive) | 68 (interactive) |
55 (kill-all-local-variables) | 69 (kill-all-local-variables) |