Mercurial > emacs
changeset 6906:bcd548b4921d
(calendar-mode-map): Use substitute-key-definition.
Don't mess with kill-region and copy-region-as-kill.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 16 Apr 1994 00:21:29 +0000 |
parents | e068218e992b |
children | 35e524a24c7f |
files | lisp/calendar/calendar.el |
diffstat | 1 files changed, 9 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/calendar.el Sat Apr 16 00:06:58 1994 +0000 +++ b/lisp/calendar/calendar.el Sat Apr 16 00:21:29 1994 +0000 @@ -1450,16 +1450,17 @@ (if window-system (require 'cal-menu)) (calendar-for-loop i from 0 to 9 do (define-key calendar-mode-map (int-to-string i) 'digit-argument)) + ;; kill-region and copy-region-as-kill are omitted from this list + ;; because they cause an ugly second pane in the Edit menu. (let ((l (list 'narrow-to-region 'mark-word 'mark-sexp 'mark-paragraph - 'mark-defun 'mark-whole-buffer 'mark-page 'kill-region - 'copy-region-as-kill 'downcase-region 'upcase-region + 'mark-defun 'mark-whole-buffer 'mark-page + 'downcase-region 'upcase-region 'capitalize-region 'write-region))) - (while (car l) - (let ((k (where-is-internal (car l) '(keymap)))) - (while (car k) - (define-key calendar-mode-map (car k) 'calendar-not-implemented) - (setq k (cdr k))) - (setq l (cdr l))))) + + (while l + (substitute-key-definition (car l) 'calendar-not-implemented + calendar-mode-map global-map) + (setq l (cdr l)))) (define-key calendar-mode-map "-" 'negative-argument) (define-key calendar-mode-map "\C-x>" 'scroll-calendar-right) (define-key calendar-mode-map [prior] 'scroll-calendar-right-three-months)