Recommend using 'keymap-global-set' in Commentaries

* lisp/bs.el, lisp/calculator.el, lisp/cedet/data-debug.el:
* lisp/help-at-pt.el, lisp/hilit-chg.el, lisp/mail/mspools.el:
* lisp/mh-e/mh-e.el, lisp/mouse-copy.el, lisp/mouse-drag.el:
* lisp/net/browse-url.el, lisp/net/webjump.el, lisp/printing.el:
* lisp/progmodes/cfengine.el, lisp/progmodes/ebnf2ps.el:
* lisp/ps-print.el, lisp/repeat.el, lisp/term/wyse50.el:
* lisp/term/x-win.el, lisp/vcursor.el, lisp/woman.el:
Recommend using 'keymap-global-set' instead of 'global-set-key'.
This commit is contained in:
Stefan Kangas 2025-03-15 00:09:45 +01:00
parent 2009ae8593
commit 679ad95a67
21 changed files with 75 additions and 75 deletions

View file

@ -73,8 +73,8 @@
;; This package offers two functions for buffer cycling. If you want to cycle
;; through buffer list you can use `bs-cycle-next' or `bs-cycle-previous'.
;; Bind these function to a key like
;; (global-set-key [(f9)] 'bs-cycle-previous)
;; (global-set-key [(f10)] 'bs-cycle-next)
;; (keymap-global-set "<f9>" #'bs-cycle-previous)
;; (keymap-global-set "<f10>" #'bs-cycle-next)
;;
;; Both functions use a special subset of all buffers for cycling to avoid
;; to go through internal buffers like *Messages*.

View file

@ -28,7 +28,7 @@
;;
;; You can bind this to a key by adding this to your Init file:
;;
;; (global-set-key [(control return)] 'calculator)
;; (keymap-global-set "C-<return>" #'calculator)
;;
;; Written by Eli Barzilay, eli@barzilay.org

View file

@ -29,7 +29,7 @@
;;
;; The best way to get started is to bind M-: to 'data-debug-eval-expression.
;;
;; (global-set-key "\M-:" 'data-debug-eval-expression)
;; (keymap-global-set "M-:" 'data-debug-eval-expression)
;;
;; If you write functions with complex output that need debugging, you
;; can make them interactive with data-debug-show-stuff. For example:

View file

@ -40,8 +40,8 @@
;;
;; Suggested key bindings:
;;
;; (global-set-key [C-tab] 'scan-buf-next-region)
;; (global-set-key [C-M-tab] 'scan-buf-previous-region)
;; (keymap-global-set "C-<tab>" #'scan-buf-next-region)
;; (keymap-global-set "C-M-<tab>" #'scan-buf-previous-region)
;;; Code:

View file

@ -113,8 +113,8 @@
;; Possible bindings:
;; (global-set-key '[C-right] #'highlight-changes-next-change)
;; (global-set-key '[C-left] #'highlight-changes-previous-change)
;; (keymap-global-set "C-<right>" #'highlight-changes-next-change)
;; (keymap-global-set "C-<left>" #'highlight-changes-previous-change)
;;
;; Other interactive functions (that could be bound if desired):
;; `highlight-changes-mode'

View file

@ -62,8 +62,8 @@
;; Extras.
;;
;; (global-set-key '[S-f1] 'mspools-show) ;Bind mspools-show to Shift F1.
;; (setq mspools-update t) ;Automatically update buffer.
;; (keymap-global-set "S-<f1>" #'mspools-show) ;Bind mspools-show to Shift F1.
;; (setopt mspools-update t) ;Automatically update buffer.
;; Interface with the mail filter.
;; We assume that the mail filter drops new mail into the spool

View file

@ -42,9 +42,9 @@
;; M-x mh-smail to send mail. From within the mail reader, "s" works, too.
;; Your .emacs might benefit from these bindings:
;; (global-set-key "\C-cr" 'mh-rmail)
;; (global-set-key "\C-xm" 'mh-smail)
;; (global-set-key "\C-x4m" 'mh-smail-other-window)
;; (keymap-global-set "C-c r" #'mh-rmail)
;; (keymap-global-set "C-x m" #'mh-smail)
;; (keymap-global-set "C-x 4 m" #'mh-smail-other-window)
;; Mailing Lists:
;; mh-e-users@lists.sourceforge.net

View file

@ -36,14 +36,15 @@
;; for ``one-click scrolling''.
;;
;; To use mouse-copy, place the following in your init file:
;; (require 'mouse-copy)
;; (global-set-key [M-down-mouse-1] 'mouse-drag-secondary-pasting)
;; (global-set-key [M-S-down-mouse-1] 'mouse-drag-secondary-moving)
;; (autoload 'mouse-drag-secondary-pasting "mouse-copy")
;; (autoload 'mouse-drag-secondary-moving "mouse-copy")
;; (keymap-global-set "M-<down-mouse-1>" #'mouse-drag-secondary-pasting)
;; (keymap-global-set "M-S-<down-mouse-1>" #'mouse-drag-secondary-moving)
;;
;; (These definitions override the old binding of M-mouse-1 to
;; mouse-drag-secondary. I find I don't use that command much so its
;; loss is not important, and it can be made up with a M-mouse-1
;; followed by a M-mouse-3. I personally reserve M-mouse bindings
;; (These definitions override the old binding of `M-<mouse-1>' to
;; `mouse-drag-secondary'. I find I don't use that command much so its
;; loss is not important, and it can be made up with a `M-<mouse-1>'
;; followed by a `M-mouse-3'. I personally reserve M-mouse bindings
;; for my window manager and bind everything to C-mouse.)
;;
;;

View file

@ -48,9 +48,9 @@
;;
;; To use mouse-drag, place the following in your init file:
;; -either-
;; (global-set-key [down-mouse-2] 'mouse-drag-throw)
;; (keymap-global-set "<down-mouse-2>" #'mouse-drag-throw)
;; -or-
;; (global-set-key [down-mouse-2] 'mouse-drag-drag)
;; (keymap-global-set "<down-mouse-2>" #'mouse-drag-drag)
;;
;;
;;

View file

@ -72,7 +72,7 @@
;; M-x browse-url
;; To display a URL by shift-clicking on it, put this in your init file:
;; (global-set-key [S-mouse-2] 'browse-url-at-mouse)
;; (keymap-global-set "S-<mouse-2>" 'browse-url-at-mouse)
;; (Note that using Shift-mouse-1 is not desirable because
;; that event has a standard meaning in Emacs.)

View file

@ -41,13 +41,13 @@
;; You may wish to add something like the following to your init file:
;;
;; (global-set-key "\C-cj" 'webjump)
;; (setq webjump-sites
;; (append '(
;; ("My Home Page" . "www.someisp.net/users/joebobjr/")
;; ("Pop's Site" . "www.joebob-and-son.com/")
;; )
;; webjump-sample-sites))
;; (keymap-global-set "C-c j" #'webjump)
;; (setopt webjump-sites
;; (append '(
;; ("My Home Page" . "www.someisp.net/users/joebobjr/")
;; ("Pop's Site" . "www.joebob-and-son.com/")
;; )
;; webjump-sample-sites))
;;
;; The above loads this package, binds `C-c j' to invoke WebJump, and adds your
;; personal favorite sites to the hotlist.

View file

@ -450,21 +450,21 @@
;;
;; Current global keyboard mapping is:
;;
;; (global-set-key [print] 'pr-ps-fast-fire)
;; (global-set-key [M-print] 'pr-ps-mode-using-ghostscript)
;; (global-set-key [S-print] 'pr-ps-mode-using-ghostscript)
;; (global-set-key [C-print] 'pr-txt-fast-fire)
;; (global-set-key [C-M-print] 'pr-txt-fast-fire)
;; (keymap-global-set "<print>" 'pr-ps-fast-fire)
;; (keymap-global-set "M-<print>" 'pr-ps-mode-using-ghostscript)
;; (keymap-global-set "S-<print>" 'pr-ps-mode-using-ghostscript)
;; (keymap-global-set "C-<print>" 'pr-txt-fast-fire)
;; (keymap-global-set "C-M-<print>" 'pr-txt-fast-fire)
;;
;; As a suggestion of global keyboard mapping for some `printing' commands:
;;
;; (global-set-key "\C-ci" 'pr-interface)
;; (global-set-key "\C-cbp" 'pr-ps-buffer-print)
;; (global-set-key "\C-cbx" 'pr-ps-buffer-preview)
;; (global-set-key "\C-cbb" 'pr-ps-buffer-using-ghostscript)
;; (global-set-key "\C-crp" 'pr-ps-region-print)
;; (global-set-key "\C-crx" 'pr-ps-region-preview)
;; (global-set-key "\C-crr" 'pr-ps-region-using-ghostscript)
;; (keymap-global-set "C-c i" 'pr-interface)
;; (keymap-global-set "C-c b p" 'pr-ps-buffer-print)
;; (keymap-global-set "C-c b x" 'pr-ps-buffer-preview)
;; (keymap-global-set "C-c b b" 'pr-ps-buffer-using-ghostscript)
;; (keymap-global-set "C-c r p" 'pr-ps-region-print)
;; (keymap-global-set "C-c r x" 'pr-ps-region-preview)
;; (keymap-global-set "C-c r r" 'pr-ps-region-using-ghostscript)
;;
;;
;; Options
@ -2969,13 +2969,13 @@ Calls `pr-update-menus' to adjust menus."
(global-set-key [(control meta print)] 'pr-txt-fast-fire)
;;; You can also use something like:
;;;(global-set-key "\C-ci" 'pr-interface)
;;;(global-set-key "\C-cbp" 'pr-ps-buffer-print)
;;;(global-set-key "\C-cbx" 'pr-ps-buffer-preview)
;;;(global-set-key "\C-cbb" 'pr-ps-buffer-using-ghostscript)
;;;(global-set-key "\C-crp" 'pr-ps-region-print)
;;;(global-set-key "\C-crx" 'pr-ps-region-preview)
;;;(global-set-key "\C-crr" 'pr-ps-region-using-ghostscript)
;;;(keymap-global-set "C-c i" 'pr-interface)
;;;(keymap-global-set "C-c b p" 'pr-ps-buffer-print)
;;;(keymap-global-set "C-c b x" 'pr-ps-buffer-preview)
;;;(keymap-global-set "C-c b b" 'pr-ps-buffer-using-ghostscript)
;;;(keymap-global-set "C-c r p" 'pr-ps-region-print)
;;;(keymap-global-set "C-c r x" 'pr-ps-region-preview)
;;;(keymap-global-set "C-c r r" 'pr-ps-region-using-ghostscript)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -52,7 +52,7 @@
;; the policy, it's a quick way to make it more legible without
;; manually reindenting it. For instance:
;; (global-set-key [(control f4)] 'cfengine3-reformat-json-string)
;; (keymap-global-set "C-<f4>" 'cfengine3-reformat-json-string)
;; This is not the same as the mode written by Rolf Ebert
;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does

View file

@ -148,9 +148,9 @@
;;
;; Any of the `ebnf-' commands can be bound to keys. Here are some examples:
;;
;; (global-set-key 'f22 'ebnf-print-buffer) ;f22 is prsc
;; (global-set-key '(shift f22) 'ebnf-print-region)
;; (global-set-key '(control f22) 'ebnf-despool)
;; (keymap-global-set "<f22>" #'ebnf-print-buffer) ;f22 is prsc
;; (keymap-global-set "S-<f22>" #'ebnf-print-region)
;; (keymap-global-set "C-<f22>" #'ebnf-despool)
;;
;;
;; Invoking Ebnf2ps in Batch

View file

@ -145,9 +145,9 @@
;; `ps-spool-buffer-with-faces', `ps-spool-region-with-faces', and
;; `ps-despool'. Here are the bindings I use on my Sun 4 keyboard:
;;
;; (global-set-key 'f22 'ps-spool-buffer-with-faces) ;f22 is prsc
;; (global-set-key '(shift f22) 'ps-spool-region-with-faces)
;; (global-set-key '(control f22) 'ps-despool)
;; (keymap-global-set "<f22>" #'ps-spool-buffer-with-faces) ;f22 is prsc
;; (keymap-global-set "S-<f22>" #'ps-spool-region-with-faces)
;; (keymap-global-set "C-<f22>" #'ps-despool)
;;
;;
;; The Printer Interface

View file

@ -54,8 +54,8 @@
;; correctly if `repeat' is invoked through a rebinding to a single keystroke
;; and the global variable repeat-on-final-keystroke is set to a value
;; that doesn't include that keystroke. For example, the lines
;; (global-set-key "\C-z" 'repeat)
;; (setq repeat-on-final-keystroke "z")
;; (keymap-global-set "C-z" #'repeat)
;; (setopt repeat-on-final-keystroke "z")
;; in your .emacs would allow `edit-kbd-macro' to work correctly when C-z was
;; used in a keyboard macro to invoke `repeat', but would still allow C-x z
;; to be used for `repeat' elsewhere. The real reason for documenting this

View file

@ -145,14 +145,14 @@ M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar"
;; ;; By unsetting C-a and then binding it to a prefix, we
;; ;; allow the rest of the function keys which start with C-a
;; ;; to be recognized.
;; '(("\C-a" nil)
;; ("\C-k" nil)
;; ("\C-j" nil)
;; ("\C-l" nil)
;; ("\C-h" nil)
;; ("\er" nil)))
;; (global-set-key (car key-definition)
;; (nth 1 key-definition)))
;; '(("C-a" nil)
;; ("C-k" nil)
;; ("C-j" nil)
;; ("C-l" nil)
;; ("C-h" nil)
;; ("M-r" nil)))
;; (keymap-global-set (car key-definition)
;; (nth 1 key-definition)))
(fset 'enable-arrow-keys nil))
(provide 'term/wyse50)

View file

@ -1318,7 +1318,7 @@ This returns an error if any Emacs frames are X frames."
;; and turned the Emacs f10 back on.
;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
;; (if (featurep 'motif)
;; (global-set-key [f10] 'ignore))
;; (keymap-global-set "<f10>" 'ignore))
;; Enable CLIPBOARD copy/paste through menu bar commands.
(menu-bar-enable-clipboard)

View file

@ -333,7 +333,7 @@
;;
;; (add-hook 'table-cell-map-hook
;; (lambda ()
;; (local-set-key [<key sequence>] '<function>)))
;; (keymap-local-set "<key sequence>" '<function>)))
;;
;; Adding the above to your init file is a common way to customize a
;; mode specific keymap. However it does not work for this package.

View file

@ -250,7 +250,7 @@
;; In addition to any other bindings, vcursor-map contains key definitions
;; for handling the vcursor. You should assign this to a prefix key
;; in the usual way, e.g.
;; (global-set-key [f14] vcursor-map)
;; (keymap-global-set "<f14>" vcursor-map)
;; and also as usual \C-h in this map will list the key definitions, which
;; are designed to be easy to remember.
;;

View file

@ -124,12 +124,11 @@
;; The variable `woman-use-topic-at-point' can be rebound locally,
;; which may be useful to provide special private key bindings, e.g.
;; (global-set-key "\C-cw"
;; (lambda ()
;; (interactive)
;; (let ((woman-use-topic-at-point t))
;; (woman)))))
;; (keymap-global-set "C-c w"
;; (lambda ()
;; (interactive)
;; (let ((woman-use-topic-at-point t))
;; (woman)))))
;; Customization, Hooks and Imenu
;; ==============================