Mercurial > emacs
changeset 3457:730b8751e536
(define-hide-ifdef-mode-map): Don't bind C-c LETTER.
Use C-c ESC LETTER instead.
Handle case where where-is-internal returns nil.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 03 Jun 1993 19:35:54 +0000 |
parents | 57089987a2de |
children | 447a28bdc0fe |
files | lisp/progmodes/hideif.el |
diffstat | 1 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/hideif.el Thu Jun 03 19:28:59 1993 +0000 +++ b/lisp/progmodes/hideif.el Thu Jun 03 19:35:54 1993 +0000 @@ -154,13 +154,13 @@ (if hide-ifdef-mode-map () ; dont redefine it. (setq hide-ifdef-mode-map (make-sparse-keymap)) - (define-key hide-ifdef-mode-map "d" 'hide-ifdef-define) - (define-key hide-ifdef-mode-map "u" 'hide-ifdef-undef) - (define-key hide-ifdef-mode-map "D" 'hide-ifdef-set-define-alist) - (define-key hide-ifdef-mode-map "U" 'hide-ifdef-use-define-alist) + (define-key hide-ifdef-mode-map "\ed" 'hide-ifdef-define) + (define-key hide-ifdef-mode-map "\eu" 'hide-ifdef-undef) + (define-key hide-ifdef-mode-map "\eD" 'hide-ifdef-set-define-alist) + (define-key hide-ifdef-mode-map "\eU" 'hide-ifdef-use-define-alist) - (define-key hide-ifdef-mode-map "h" 'hide-ifdefs) - (define-key hide-ifdef-mode-map "s" 'show-ifdefs) + (define-key hide-ifdef-mode-map "\eh" 'hide-ifdefs) + (define-key hide-ifdef-mode-map "\es" 'show-ifdefs) (define-key hide-ifdef-mode-map "\C-h" 'hide-ifdef-block) (define-key hide-ifdef-mode-map "\C-s" 'show-ifdef-block) @@ -171,9 +171,11 @@ (define-key hide-ifdef-mode-map "\C-n" 'next-ifdef) (define-key hide-ifdef-mode-map "\C-p" 'previous-ifdef) (define-key hide-ifdef-mode-map "\C-q" 'hide-ifdef-toggle-read-only) - (define-key hide-ifdef-mode-map - (where-is-internal 'toggle-read-only nil nil t) - 'hide-ifdef-toggle-outside-read-only) + (let ((where (where-is-internal 'toggle-read-only nil nil t))) + (if where + (define-key hide-ifdef-mode-map + where + 'hide-ifdef-toggle-outside-read-only))) ) (fset 'hide-ifdef-mode-map hide-ifdef-mode-map) ; the function is the map )