aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier2009-09-11 00:58:59 +0000
committerStefan Monnier2009-09-11 00:58:59 +0000
commit8cb95edf7cdec140efb1c8dbf4f7f33320f0ca0c (patch)
tree082de7005695b6792640b4a2d54cfbe4a67921fc /lisp
parent599498c31f0ce7a3ffd6094a12a986766b5a694d (diff)
downloademacs-8cb95edf7cdec140efb1c8dbf4f7f33320f0ca0c.tar.gz
emacs-8cb95edf7cdec140efb1c8dbf4f7f33320f0ca0c.zip
* keymap.c (QCadvertised_binding): New constant.
(syms_of_keymap): Initialize it. (Fwhere_is_internal): Try and use bindings from :advertised-binding if applicable. * progmodes/xscheme.el (xscheme-evaluation-commands): Put a :advertised-binding property rather than using advertised-xscheme-send-previous-expression. (advertised-xscheme-send-previous-expression): Declare obsolete. * emulation/crisp.el (crisp-mode-map): Use `undo' rather than `advertised-undo'. (crisp-mode): Add corresponding bindings to undo's :advertised-binding instead. * dired.el (dired-mode-map): Put a :advertised-binding property rather than using dired-advertised-find-file. (dired-advertised-find-file): * simple.el (advertised-undo): * wid-edit.el (advertised-widget-backward): Declare obsolete. (widget-keymap): Put a :advertised-binding property rather than using advertised-widget-backward. * bindings.el (ctl-x-map): Put a :advertised-binding property rather than using advertised-undo. * tutorial.el (tutorial--default-keys): Adjust accordingly.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog21
-rw-r--r--lisp/bindings.el3
-rw-r--r--lisp/dired.el7
-rw-r--r--lisp/emulation/crisp.el9
-rw-r--r--lisp/progmodes/xscheme.el11
-rw-r--r--lisp/simple.el2
-rw-r--r--lisp/startup.el2
-rw-r--r--lisp/textmodes/picture.el2
-rw-r--r--lisp/tutorial.el3
-rw-r--r--lisp/wid-edit.el6
10 files changed, 48 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6487d3fcbef..9513e9ecb4e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,24 @@
12009-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/xscheme.el (xscheme-evaluation-commands):
4 Put a :advertised-binding property rather than using
5 advertised-xscheme-send-previous-expression.
6 (advertised-xscheme-send-previous-expression): Declare obsolete.
7 * emulation/crisp.el (crisp-mode-map): Use `undo' rather than
8 `advertised-undo'.
9 (crisp-mode): Add corresponding bindings to
10 undo's :advertised-binding instead.
11 * dired.el (dired-mode-map): Put a :advertised-binding property rather
12 than using dired-advertised-find-file.
13 (dired-advertised-find-file):
14 * simple.el (advertised-undo):
15 * wid-edit.el (advertised-widget-backward): Declare obsolete.
16 (widget-keymap): Put a :advertised-binding property rather
17 than using advertised-widget-backward.
18 * bindings.el (ctl-x-map): Put a :advertised-binding property rather
19 than using advertised-undo.
20 * tutorial.el (tutorial--default-keys): Adjust accordingly.
21
12009-09-10 Stefan Monnier <monnier@iro.umontreal.ca> 222009-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
2 23
3 * subr.el (define-key-rebound-commands): Mark obsolete. 24 * subr.el (define-key-rebound-commands): Mark obsolete.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 9ee6c3fa306..9f3f43c7cd7 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -757,7 +757,8 @@ language you are using."
757(define-key ctl-x-map "\e\e" 'repeat-complex-command) 757(define-key ctl-x-map "\e\e" 'repeat-complex-command)
758;; New binding analogous to M-:. 758;; New binding analogous to M-:.
759(define-key ctl-x-map "\M-:" 'repeat-complex-command) 759(define-key ctl-x-map "\M-:" 'repeat-complex-command)
760(define-key ctl-x-map "u" 'advertised-undo) 760(define-key ctl-x-map "u" 'undo)
761(put 'undo :advertised-binding [?\C-x ?u])
761;; Many people are used to typing C-/ on X terminals and getting C-_. 762;; Many people are used to typing C-/ on X terminals and getting C-_.
762(define-key global-map [?\C-/] 'undo) 763(define-key global-map [?\C-/] 'undo)
763(define-key global-map "\C-_" 'undo) 764(define-key global-map "\C-_" 'undo)
diff --git a/lisp/dired.el b/lisp/dired.el
index 21734f6ae7d..cf975158cf5 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1292,7 +1292,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1292 (define-key map "d" 'dired-flag-file-deletion) 1292 (define-key map "d" 'dired-flag-file-deletion)
1293 (define-key map "e" 'dired-find-file) 1293 (define-key map "e" 'dired-find-file)
1294 (define-key map "f" 'dired-find-file) 1294 (define-key map "f" 'dired-find-file)
1295 (define-key map "\C-m" 'dired-advertised-find-file) 1295 (define-key map "\C-m" 'dired-find-file)
1296 (put 'dired-find-file :advertised-binding "\C-m")
1296 (define-key map "g" 'revert-buffer) 1297 (define-key map "g" 'revert-buffer)
1297 (define-key map "h" 'describe-mode) 1298 (define-key map "h" 'describe-mode)
1298 (define-key map "i" 'dired-maybe-insert-subdir) 1299 (define-key map "i" 'dired-maybe-insert-subdir)
@@ -1685,7 +1686,7 @@ Type \\[dired-mark] to Mark a file or subdirectory for later commands.
1685Type \\[dired-unmark] to Unmark a file or all files of a subdirectory. 1686Type \\[dired-unmark] to Unmark a file or all files of a subdirectory.
1686Type \\[dired-unmark-backward] to back up one line and unflag. 1687Type \\[dired-unmark-backward] to back up one line and unflag.
1687Type \\[dired-do-flagged-delete] to eXecute the deletions requested. 1688Type \\[dired-do-flagged-delete] to eXecute the deletions requested.
1688Type \\[dired-advertised-find-file] to Find the current line's file 1689Type \\[dired-find-file] to Find the current line's file
1689 (or dired it in another buffer, if it is a directory). 1690 (or dired it in another buffer, if it is a directory).
1690Type \\[dired-find-file-other-window] to find file or dired directory in Other window. 1691Type \\[dired-find-file-other-window] to find file or dired directory in Other window.
1691Type \\[dired-maybe-insert-subdir] to Insert a subdirectory in this buffer. 1692Type \\[dired-maybe-insert-subdir] to Insert a subdirectory in this buffer.
@@ -1859,7 +1860,7 @@ Creates a buffer if necessary."
1859 (error "File no longer exists; type `g' to update dired buffer"))))) 1860 (error "File no longer exists; type `g' to update dired buffer")))))
1860 1861
1861;; Force C-m keybinding rather than `f' or `e' in the mode doc: 1862;; Force C-m keybinding rather than `f' or `e' in the mode doc:
1862(defalias 'dired-advertised-find-file 'dired-find-file) 1863(define-obsolete-function-alias 'dired-advertised-find-file 'dired-find-file "23.2")
1863(defun dired-find-file () 1864(defun dired-find-file ()
1864 "In Dired, visit the file or directory named on this line." 1865 "In Dired, visit the file or directory named on this line."
1865 (interactive) 1866 (interactive)
diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el
index 64ca561fbe2..a53adf00fea 100644
--- a/lisp/emulation/crisp.el
+++ b/lisp/emulation/crisp.el
@@ -55,6 +55,8 @@
55 55
56;;; Code: 56;;; Code:
57 57
58(eval-when-compile (require 'cl))
59
58;; local variables 60;; local variables
59 61
60(defgroup crisp nil 62(defgroup crisp nil
@@ -205,8 +207,8 @@ does not load the scroll-all package."
205(define-key crisp-mode-map [(meta m)] 'set-mark-command) 207(define-key crisp-mode-map [(meta m)] 'set-mark-command)
206(define-key crisp-mode-map [(meta n)] 'bury-buffer) 208(define-key crisp-mode-map [(meta n)] 'bury-buffer)
207(define-key crisp-mode-map [(meta p)] 'crisp-unbury-buffer) 209(define-key crisp-mode-map [(meta p)] 'crisp-unbury-buffer)
208(define-key crisp-mode-map [(meta u)] 'advertised-undo) 210(define-key crisp-mode-map [(meta u)] 'undo)
209(define-key crisp-mode-map [(f14)] 'advertised-undo) 211(define-key crisp-mode-map [(f14)] 'undo)
210(define-key crisp-mode-map [(meta w)] 'save-buffer) 212(define-key crisp-mode-map [(meta w)] 'save-buffer)
211(define-key crisp-mode-map [(meta x)] 'crisp-meta-x-wrapper) 213(define-key crisp-mode-map [(meta x)] 'crisp-meta-x-wrapper)
212(define-key crisp-mode-map [(meta ?0)] (lambda () 214(define-key crisp-mode-map [(meta ?0)] (lambda ()
@@ -357,6 +359,9 @@ With ARG, turn CRiSP mode on if ARG is positive, off otherwise."
357 (not crisp-mode) 359 (not crisp-mode)
358 (> (prefix-numeric-value arg) 0))) 360 (> (prefix-numeric-value arg) 0)))
359 (when crisp-mode 361 (when crisp-mode
362 ;; Make menu entries show M-u or f14 in preference to C-x u.
363 (put 'undo :advertised-binding
364 (list* [?\M-u] [f14] (get 'undo :advertised-binding)))
360 ;; Force transient-mark-mode, so that the marking routines work as 365 ;; Force transient-mark-mode, so that the marking routines work as
361 ;; expected. If the user turns off transient mark mode, most 366 ;; expected. If the user turns off transient mark mode, most
362 ;; things will still work fine except the crisp-(copy|kill) 367 ;; things will still work fine except the crisp-(copy|kill)
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 56c4aaaa5da..5cf4651ad13 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -134,7 +134,7 @@ has finished evaluating will signal an error."
134 134
135(defcustom xscheme-startup-message 135(defcustom xscheme-startup-message
136 "This is the Scheme process buffer. 136 "This is the Scheme process buffer.
137Type \\[advertised-xscheme-send-previous-expression] to evaluate the expression before point. 137Type \\[xscheme-send-previous-expression] to evaluate the expression before point.
138Type \\[xscheme-send-control-g-interrupt] to abort evaluation. 138Type \\[xscheme-send-control-g-interrupt] to abort evaluation.
139Type \\[describe-mode] for more information. 139Type \\[describe-mode] for more information.
140 140
@@ -158,7 +158,8 @@ When called, the current buffer will be the Scheme process-buffer."
158 158
159(defun xscheme-evaluation-commands (keymap) 159(defun xscheme-evaluation-commands (keymap)
160 (define-key keymap "\e\C-x" 'xscheme-send-definition) 160 (define-key keymap "\e\C-x" 'xscheme-send-definition)
161 (define-key keymap "\C-x\C-e" 'advertised-xscheme-send-previous-expression) 161 (define-key keymap "\C-x\C-e" 'xscheme-send-previous-expression)
162 (put 'xscheme-send-previous-expression :advertised-binding "\C-x\C-e")
162 (define-key keymap "\eo" 'xscheme-send-buffer) 163 (define-key keymap "\eo" 'xscheme-send-buffer)
163 (define-key keymap "\ez" 'xscheme-send-definition) 164 (define-key keymap "\ez" 'xscheme-send-definition)
164 (define-key keymap "\e\C-m" 'xscheme-send-previous-expression) 165 (define-key keymap "\e\C-m" 'xscheme-send-previous-expression)
@@ -317,7 +318,7 @@ With argument, asks for a command line."
317 "Major mode for interacting with an inferior MIT Scheme process. 318 "Major mode for interacting with an inferior MIT Scheme process.
318Like scheme-mode except that: 319Like scheme-mode except that:
319 320
320\\[advertised-xscheme-send-previous-expression] sends the expression before point to the Scheme process as input 321\\[xscheme-send-previous-expression] sends the expression before point to the Scheme process as input
321\\[xscheme-yank-pop] yanks an expression previously sent to Scheme 322\\[xscheme-yank-pop] yanks an expression previously sent to Scheme
322\\[xscheme-yank-push] yanks an expression more recently sent to Scheme 323\\[xscheme-yank-push] yanks an expression more recently sent to Scheme
323 324
@@ -475,8 +476,8 @@ with no args, if that value is non-nil.
475 (scheme-interaction-mode-initialize) 476 (scheme-interaction-mode-initialize)
476 (scheme-interaction-mode t))))) 477 (scheme-interaction-mode t)))))
477 478
478(fset 'advertised-xscheme-send-previous-expression 479(define-obsolete-function-alias 'advertised-xscheme-send-previous-expression
479 'xscheme-send-previous-expression) 480 'xscheme-send-previous-expression "23.2")
480 481
481;;;; Debugger Mode 482;;;; Debugger Mode
482 483
diff --git a/lisp/simple.el b/lisp/simple.el
index c3e7c49e194..f318d496776 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1610,7 +1610,7 @@ Go to the history element by the absolute history position HIST-POS."
1610 1610
1611 1611
1612;Put this on C-x u, so we can force that rather than C-_ into startup msg 1612;Put this on C-x u, so we can force that rather than C-_ into startup msg
1613(defalias 'advertised-undo 'undo) 1613(define-obsolete-function-alias 'advertised-undo 'undo "23.2")
1614 1614
1615(defconst undo-equiv-table (make-hash-table :test 'eq :weakness t) 1615(defconst undo-equiv-table (make-hash-table :test 'eq :weakness t)
1616 "Table mapping redo records to the corresponding undo one. 1616 "Table mapping redo records to the corresponding undo one.
diff --git a/lisp/startup.el b/lisp/startup.el
index a260cd7c579..5802b33b643 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1841,7 +1841,7 @@ To quit a partially entered command, type Control-g.\n")
1841 'action (lambda (button) (help-with-tutorial)) 1841 'action (lambda (button) (help-with-tutorial))
1842 'follow-link t) 1842 'follow-link t)
1843 (insert (substitute-command-keys 1843 (insert (substitute-command-keys
1844 "\t \\[help-with-tutorial]\tUndo changes\t \\[advertised-undo]\n")) 1844 "\t \\[help-with-tutorial]\tUndo changes\t \\[undo]\n"))
1845 (insert-button "Buy manuals" 1845 (insert-button "Buy manuals"
1846 'action (lambda (button) (view-order-manuals)) 1846 'action (lambda (button) (view-order-manuals))
1847 'follow-link t) 1847 'follow-link t)
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 92412eccd10..378c2e668b9 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -719,7 +719,7 @@ You can manipulate rectangles with these commands:
719 Insert rectangle from named register: \\[picture-yank-rectangle-from-register] 719 Insert rectangle from named register: \\[picture-yank-rectangle-from-register]
720 Draw a rectangular box around mark and point: \\[picture-draw-rectangle] 720 Draw a rectangular box around mark and point: \\[picture-draw-rectangle]
721 Copies a rectangle to a register: \\[copy-rectangle-to-register] 721 Copies a rectangle to a register: \\[copy-rectangle-to-register]
722 Undo effects of rectangle overlay commands: \\[advertised-undo] 722 Undo effects of rectangle overlay commands: \\[undo]
723 723
724You can return to the previous mode with \\[picture-mode-exit], which 724You can return to the previous mode with \\[picture-mode-exit], which
725also strips trailing whitespace from every line. Stripping is suppressed 725also strips trailing whitespace from every line. Stripping is suppressed
diff --git a/lisp/tutorial.el b/lisp/tutorial.el
index 7d6bf1c7c72..3290d67a99a 100644
--- a/lisp/tutorial.el
+++ b/lisp/tutorial.el
@@ -264,8 +264,7 @@ LEFT and RIGHT are the elements to compare."
264 (yank-pop [?\M-y]) 264 (yank-pop [?\M-y])
265 265
266 ;; * UNDO 266 ;; * UNDO
267 (advertised-undo [?\C-x ?u]) 267 (undo [?\C-x ?u])
268 (advertised-undo [?\C-x ?u])
269 268
270 ;; * FILES 269 ;; * FILES
271 (find-file [?\C-x ?\C-f]) 270 (find-file [?\C-x ?\C-f])
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index e9156e729db..5a22b371db0 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -857,14 +857,16 @@ button end points."
857;; This alias exists only so that one can choose in doc-strings (e.g. 857;; This alias exists only so that one can choose in doc-strings (e.g.
858;; Custom-mode) which key-binding of widget-keymap one wants to refer to. 858;; Custom-mode) which key-binding of widget-keymap one wants to refer to.
859;; http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00480.html 859;; http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00480.html
860(defalias 'advertised-widget-backward 'widget-backward) 860(define-obsolete-function-alias 'advertised-widget-backward
861 'widget-backward "23.2")
861 862
862;;;###autoload 863;;;###autoload
863(defvar widget-keymap 864(defvar widget-keymap
864 (let ((map (make-sparse-keymap))) 865 (let ((map (make-sparse-keymap)))
865 (define-key map "\t" 'widget-forward) 866 (define-key map "\t" 'widget-forward)
866 (define-key map "\e\t" 'widget-backward) 867 (define-key map "\e\t" 'widget-backward)
867 (define-key map [(shift tab)] 'advertised-widget-backward) 868 (define-key map [(shift tab)] 'widget-backward)
869 (put 'widget-backward :advertised-binding [(shift tab)])
868 (define-key map [backtab] 'widget-backward) 870 (define-key map [backtab] 'widget-backward)
869 (define-key map [down-mouse-2] 'widget-button-click) 871 (define-key map [down-mouse-2] 'widget-button-click)
870 (define-key map [down-mouse-1] 'widget-button-click) 872 (define-key map [down-mouse-1] 'widget-button-click)