From 79d585c2befb81ac5480a9577eaeb6e8915cae23 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 22 Feb 2021 16:54:59 -0500 Subject: * lisp/obsolete: Use lexical-binding Use lexical-binding in all the lisp/obsolete/*.el files. While at it, removed redundant :group arguments and used #' to quote functions. Commented out the key bindings which the #' revealed to lead to non-existing commands, and replaced those revealed to be obsolete. * lisp/obsolete/cl-compat.el: Use cl-lib. * lisp/obsolete/cust-print.el: Assume `defalias` exists. (with-custom-print): Use `declare`. * lisp/obsolete/iswitchb.el (iswitchb-init-XEmacs-trick) (iswitchb-xemacs-backspacekey): Remove functions. * lisp/obsolete/landmark.el (landmark, landmark-nslify-wts): Prefer `apply` to `eval`. * lisp/obsolete/longlines.el (longlines-mode): Don't use `add-to-list` on a hook. * lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region): Use `clear-string`. * lisp/obsolete/pgg-pgp.el (pgg-pgp-encrypt-region): Remove oddly unused var `passphrase`. (pgg-pgp-verify-region): Declare var `jam-zcat-filename-list`. * lisp/obsolete/pgg-pgp5.el (pgg-pgp5-encrypt-region): Remove oddly unused var `passphrase`. (pgg-pgp5-verify-region): Declare var `jam-zcat-filename-list`. * lisp/obsolete/pgg.el: Remove some XEmacs compatibility code. (pgg-run-at-time, pgg-cancel-timer, pgg-clear-string): Remove functions. Use their core equivalent instead. * lisp/obsolete/rcompile.el (remote-compile): Remove unused vars `l`, `l-host`, `l-user`, and `localname`. * lisp/obsolete/starttls.el (starttls-any-program-available): Use `define-obsolete-function-alias`. * lisp/obsolete/tls.el (tls-format-message): Delete function, use `format-message` instead. * lisp/obsolete/url-ns.el (url-ns-prefs): Use `with-current-buffer` and `dlet`. * lisp/obsolete/vip.el (vip-escape-to-emacs): Remove unused var `key`. (vip-command-argument, vip-read-string, ex-delete, ex-line): Remove unused var `conditions`. (ex-map): Use a closure instead of `eval`. (ex-set): Make it an alias of `set-variable`. (ex-substitute): Remove unused var `cont`. * lisp/obsolete/abbrevlist.el: * lisp/obsolete/bruce.el: * lisp/obsolete/cc-compat.el: * lisp/obsolete/cl-compat.el: * lisp/obsolete/cl.el: * lisp/obsolete/complete.el: * lisp/obsolete/crisp.el: * lisp/obsolete/cust-print.el: * lisp/obsolete/erc-compat.el: * lisp/obsolete/erc-hecomplete.el: * lisp/obsolete/eudcb-ph.el: * lisp/obsolete/fast-lock.el: * lisp/obsolete/gs.el: * lisp/obsolete/gulp.el: * lisp/obsolete/html2text.el: * lisp/obsolete/info-edit.el: * lisp/obsolete/iswitchb.el: * lisp/obsolete/landmark.el: * lisp/obsolete/lazy-lock.el: * lisp/obsolete/longlines.el: * lisp/obsolete/mailpost.el: * lisp/obsolete/mantemp.el: * lisp/obsolete/meese.el: * lisp/obsolete/messcompat.el: * lisp/obsolete/metamail.el: * lisp/obsolete/mouse-sel.el: * lisp/obsolete/nnir.el: * lisp/obsolete/old-emacs-lock.el: * lisp/obsolete/otodo-mode.el: * lisp/obsolete/patcomp.el: * lisp/obsolete/pc-mode.el: * lisp/obsolete/pc-select.el: * lisp/obsolete/pgg-def.el: * lisp/obsolete/pgg-gpg.el: * lisp/obsolete/pgg-parse.el: * lisp/obsolete/pgg-pgp.el: * lisp/obsolete/pgg-pgp5.el: * lisp/obsolete/pgg.el: * lisp/obsolete/rcompile.el: * lisp/obsolete/s-region.el: * lisp/obsolete/sb-image.el: * lisp/obsolete/sregex.el: * lisp/obsolete/starttls.el: * lisp/obsolete/sup-mouse.el: * lisp/obsolete/terminal.el: * lisp/obsolete/tls.el: * lisp/obsolete/tpu-edt.el: * lisp/obsolete/tpu-extras.el: * lisp/obsolete/tpu-mapper.el: * lisp/obsolete/url-ns.el: * lisp/obsolete/vc-arch.el: * lisp/obsolete/vi.el: * lisp/obsolete/vip.el: * lisp/obsolete/ws-mode.el: * lisp/obsolete/yow.el: Use lexical-binding. --- lisp/obsolete/iswitchb.el | 163 +++++++++++++++------------------------------- 1 file changed, 54 insertions(+), 109 deletions(-) (limited to 'lisp/obsolete/iswitchb.el') diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 58cada13747..a7fd6ccb5f5 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -1,4 +1,4 @@ -;;; iswitchb.el --- switch between buffers using substrings +;;; iswitchb.el --- switch between buffers using substrings -*- lexical-binding: t; -*- ;; Copyright (C) 1996-1997, 2000-2021 Free Software Foundation, Inc. @@ -258,8 +258,7 @@ "Non-nil if searching of buffer names should ignore case. If this is non-nil but the user input has any upper case letters, matching is temporarily case sensitive." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-buffer-ignore '("^ ") @@ -267,8 +266,7 @@ is temporarily case sensitive." For example, traditional behavior is not to list buffers whose names begin with a space, for which the regexp is `^ '. See the source file for example functions that filter buffer names." - :type '(repeat (choice regexp function)) - :group 'iswitchb) + :type '(repeat (choice regexp function))) (put 'iswitchb-buffer-ignore 'risky-local-variable t) (defcustom iswitchb-max-to-show nil @@ -277,8 +275,7 @@ If this value is N, and N is greater than the number of matching buffers, the first N/2 and the last N/2 matching buffers are shown. This can greatly speed up iswitchb if you have a multitude of buffers open." - :type '(choice (const :tag "Show all" nil) integer) - :group 'iswitchb) + :type '(choice (const :tag "Show all" nil) integer)) (defcustom iswitchb-use-virtual-buffers nil "If non-nil, refer to past buffers when none match. @@ -289,8 +286,7 @@ enabled if this variable is configured to a non-nil value." :set (function (lambda (sym value) (if value (recentf-mode 1)) - (set sym value))) - :group 'iswitchb) + (set sym value)))) (defvar iswitchb-virtual-buffers nil) @@ -299,8 +295,7 @@ enabled if this variable is configured to a non-nil value." The most useful values are `iswitchb-completion-help', which pops up a window with completion alternatives, or `iswitchb-next-match' or `iswitchb-prev-match', which cycle the buffer list." - :type 'hook - :group 'iswitchb) + :type 'hook) ;; Examples for setting the value of iswitchb-buffer-ignore ;;(defun iswitchb-ignore-c-mode (name) @@ -328,46 +323,38 @@ Possible values: (const display) (const otherframe) (const maybe-frame) - (const always-frame)) - :group 'iswitchb) + (const always-frame))) (defcustom iswitchb-regexp nil "Non-nil means that `iswitchb' will do regexp matching. Value can be toggled within `iswitchb' using `iswitchb-toggle-regexp'." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-newbuffer t "Non-nil means create new buffer if no buffer matches substring. See also `iswitchb-prompt-newbuffer'." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-prompt-newbuffer t "Non-nil means prompt user to confirm before creating new buffer. See also `iswitchb-newbuffer'." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-use-faces t "Non-nil means use font-lock faces for showing first match." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-use-frame-buffer-list nil "Non-nil means use the currently selected frame's buffer list." - :type 'boolean - :group 'iswitchb) + :type 'boolean) (defcustom iswitchb-make-buflist-hook nil "Hook to run when list of matching buffers is created." - :type 'hook - :group 'iswitchb) + :type 'hook) (defcustom iswitchb-delim "," "Delimiter to put between buffer names when displaying results." - :type 'string - :group 'iswitchb) + :type 'string) (defcustom iswitchb-all-frames 'visible "Argument to pass to `walk-windows' when iswitchb is finding buffers. @@ -375,8 +362,7 @@ See documentation of `walk-windows' for useful values." :type '(choice (const :tag "Selected frame only" nil) (const :tag "All existing frames" t) (const :tag "All visible frames" visible) - (const :tag "All frames on this terminal" 0)) - :group 'iswitchb) + (const :tag "All frames on this terminal" 0))) (defcustom iswitchb-minibuffer-setup-hook nil "Iswitchb-specific customization of minibuffer setup. @@ -387,37 +373,32 @@ For instance: \\='\(lambda () (set (make-local-variable \\='max-mini-window-height) 3))) will constrain the minibuffer to a maximum height of 3 lines when iswitchb is running." - :type 'hook - :group 'iswitchb) + :type 'hook) (defface iswitchb-single-match '((t (:inherit font-lock-comment-face))) "Iswitchb face for single matching buffer name." - :version "22.1" - :group 'iswitchb) + :version "22.1") (defface iswitchb-current-match '((t (:inherit font-lock-function-name-face))) "Iswitchb face for current matching buffer name." - :version "22.1" - :group 'iswitchb) + :version "22.1") (defface iswitchb-virtual-matches '((t (:inherit font-lock-builtin-face))) "Iswitchb face for matching virtual buffer names. See also `iswitchb-use-virtual-buffers'." - :version "22.1" - :group 'iswitchb) + :version "22.1") (defface iswitchb-invalid-regexp '((t (:inherit font-lock-warning-face))) "Iswitchb face for indicating invalid regexp. " - :version "22.1" - :group 'iswitchb) + :version "22.1") ;; Do we need the variable iswitchb-use-mycompletion? @@ -465,18 +446,18 @@ interfere with other minibuffer usage.") (defvar iswitchb-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) - (define-key map "?" 'iswitchb-completion-help) - (define-key map "\C-s" 'iswitchb-next-match) - (define-key map "\C-r" 'iswitchb-prev-match) - (define-key map [?\C-.] 'iswitchb-next-match) - (define-key map [?\C-,] 'iswitchb-prev-match) - (define-key map "\t" 'iswitchb-complete) - (define-key map "\C-j" 'iswitchb-select-buffer-text) - (define-key map "\C-t" 'iswitchb-toggle-regexp) - (define-key map "\C-x\C-f" 'iswitchb-find-file) - (define-key map "\C-c" 'iswitchb-toggle-case) - (define-key map "\C-k" 'iswitchb-kill-buffer) - (define-key map "\C-m" 'iswitchb-exit-minibuffer) + (define-key map "?" #'iswitchb-completion-help) + (define-key map "\C-s" #'iswitchb-next-match) + (define-key map "\C-r" #'iswitchb-prev-match) + (define-key map [?\C-.] #'iswitchb-next-match) + (define-key map [?\C-,] #'iswitchb-prev-match) + (define-key map "\t" #'iswitchb-complete) + (define-key map "\C-j" #'iswitchb-select-buffer-text) + (define-key map "\C-t" #'iswitchb-toggle-regexp) + (define-key map "\C-x\C-f" #'iswitchb-find-file) + (define-key map "\C-c" #'iswitchb-toggle-case) + (define-key map "\C-k" #'iswitchb-kill-buffer) + (define-key map "\C-m" #'iswitchb-exit-minibuffer) map) "Minibuffer keymap for `iswitchb-buffer'.") @@ -596,17 +577,17 @@ the selection process begins. Used by isearchb.el." (let ((map (copy-keymap minibuffer-local-map)) buf-sel iswitchb-final-text icomplete-mode) ; prevent icomplete starting up - (define-key map "?" 'iswitchb-completion-help) - (define-key map "\C-s" 'iswitchb-next-match) - (define-key map "\C-r" 'iswitchb-prev-match) - (define-key map "\t" 'iswitchb-complete) - (define-key map "\C-j" 'iswitchb-select-buffer-text) - (define-key map "\C-t" 'iswitchb-toggle-regexp) - (define-key map "\C-x\C-f" 'iswitchb-find-file) - (define-key map "\C-n" 'iswitchb-toggle-ignore) - (define-key map "\C-c" 'iswitchb-toggle-case) - (define-key map "\C-k" 'iswitchb-kill-buffer) - (define-key map "\C-m" 'iswitchb-exit-minibuffer) + (define-key map "?" #'iswitchb-completion-help) + (define-key map "\C-s" #'iswitchb-next-match) + (define-key map "\C-r" #'iswitchb-prev-match) + (define-key map "\t" #'iswitchb-complete) + (define-key map "\C-j" #'iswitchb-select-buffer-text) + (define-key map "\C-t" #'iswitchb-toggle-regexp) + (define-key map "\C-x\C-f" #'iswitchb-find-file) + (define-key map "\C-n" #'iswitchb-toggle-ignore) + (define-key map "\C-c" #'iswitchb-toggle-case) + (define-key map "\C-k" #'iswitchb-kill-buffer) + (define-key map "\C-m" #'iswitchb-exit-minibuffer) (setq iswitchb-mode-map map) (run-hooks 'iswitchb-define-mode-map-hook) @@ -946,9 +927,9 @@ If `iswitchb-change-word-sub' cannot be found in WORD, return nil." (if iswitchb-regexp subs (regexp-quote subs))) - (setq res (mapcar 'iswitchb-word-matching-substring lis)) + (setq res (mapcar #'iswitchb-word-matching-substring lis)) (setq res (delq nil res)) ;; remove any nil elements (shouldn't happen) - (setq alist (mapcar 'iswitchb-makealist res)) ;; could use an OBARRAY + (setq alist (mapcar #'iswitchb-makealist res)) ;; could use an OBARRAY ;; try-completion returns t if there is an exact match. (let ((completion-ignore-case (iswitchb-case))) @@ -1148,43 +1129,6 @@ For details of keybindings, do `\\[describe-function] iswitchb'." (setq iswitchb-method 'otherframe) (iswitchb)) -;;; XEmacs hack for showing default buffer - -;; The first time we enter the minibuffer, Emacs puts up the default -;; buffer to switch to, but XEmacs doesn't -- presumably there is a -;; subtle difference in the two versions of post-command-hook. The -;; default is shown for both whenever we delete all of our text -;; though, indicating its just a problem the first time we enter the -;; function. To solve this, we use another entry hook for emacs to -;; show the default the first time we enter the minibuffer. - -(defun iswitchb-init-XEmacs-trick () - "Display default buffer when first entering minibuffer. -This is a hack for XEmacs, and should really be handled by `iswitchb-exhibit'." - (if (iswitchb-entryfn-p) - (progn - (iswitchb-exhibit) - (goto-char (point-min))))) - -;; add this hook for XEmacs only. -(if (featurep 'xemacs) - (add-hook 'iswitchb-minibuffer-setup-hook - 'iswitchb-init-XEmacs-trick)) - -;;; XEmacs / backspace key -;; For some reason, if the backspace key is pressed in XEmacs, the -;; line gets confused, so I've added a simple key definition to make -;; backspace act like the normal delete key. - -(defun iswitchb-xemacs-backspacekey () - "Bind backspace to `backward-delete-char'." - (define-key iswitchb-mode-map '[backspace] 'backward-delete-char) - (define-key iswitchb-mode-map '[(meta backspace)] 'backward-kill-word)) - -(if (featurep 'xemacs) - (add-hook 'iswitchb-define-mode-map-hook - 'iswitchb-xemacs-backspacekey)) - ;;; ICOMPLETE TYPE CODE (defun iswitchb-exhibit () @@ -1273,7 +1217,7 @@ Modified from `icomplete-completions'." iswitchb-virtual-buffers))) (setq head (cdr head))) (setq iswitchb-virtual-buffers (nreverse iswitchb-virtual-buffers) - comps (mapcar 'car iswitchb-virtual-buffers)) + comps (mapcar #'car iswitchb-virtual-buffers)) (let ((comp comps)) (while comp (put-text-property 0 (length (car comp)) @@ -1323,8 +1267,9 @@ Modified from `icomplete-completions'." (most-len (length most)) most-is-exact (alternatives - (mapconcat (if most 'iswitchb-output-completion - 'identity) comps iswitchb-delim))) + (mapconcat (if most #'iswitchb-output-completion + #'identity) + comps iswitchb-delim))) (concat @@ -1356,8 +1301,8 @@ Modified from `icomplete-completions'." Copied from `icomplete-minibuffer-setup-hook'." (when (iswitchb-entryfn-p) (set (make-local-variable 'iswitchb-use-mycompletion) t) - (add-hook 'pre-command-hook 'iswitchb-pre-command nil t) - (add-hook 'post-command-hook 'iswitchb-post-command nil t) + (add-hook 'pre-command-hook #'iswitchb-pre-command nil t) + (add-hook 'post-command-hook #'iswitchb-post-command nil t) (run-hooks 'iswitchb-minibuffer-setup-hook))) (defun iswitchb-pre-command () @@ -1416,10 +1361,10 @@ See the variable `iswitchb-case' for details." Iswitchb mode is a global minor mode that enables switching between buffers using substrings. See `iswitchb' for details." - nil nil iswitchb-global-map :global t :group 'iswitchb + nil nil iswitchb-global-map :global t (if iswitchb-mode - (add-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup) - (remove-hook 'minibuffer-setup-hook 'iswitchb-minibuffer-setup))) + (add-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup) + (remove-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup))) (provide 'iswitchb) -- cgit v1.2.3 From 5926f0c02402acb9de6c44f0b4155456aebdc981 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 11 Mar 2021 13:10:13 -0500 Subject: * lisp/obsolete/iswitchb.el: Remove dead code (most-len, most-is-exact): Delete vars. (iswitchb-output-completion): Delete function. (iswitchb-completions): Delete dead code consequence of `most` being nil. --- lisp/obsolete/iswitchb.el | 33 ++++----------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'lisp/obsolete/iswitchb.el') diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index a7fd6ccb5f5..a9bc6ef0711 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -1158,18 +1158,6 @@ Copied from `icomplete-exhibit' with two changes: (insert (iswitchb-completions contents)))))) -(defvar most-len) -(defvar most-is-exact) - -(defun iswitchb-output-completion (com) - (if (= (length com) most-len) - ;; Most is one exact match, - ;; note that and leave out - ;; for later indication: - (ignore - (setq most-is-exact t)) - (substring com most-len))) - (defun iswitchb-completions (name) "Return the string that is displayed after the user's text. Modified from `icomplete-completions'." @@ -1260,16 +1248,11 @@ Modified from `icomplete-completions'." (nreverse res)) (list "...") (nthcdr (- (length comps) - (/ iswitchb-max-to-show 2)) comps)))) + (/ iswitchb-max-to-show 2)) + comps)))) (let* ( - ;;(most (try-completion name candidates predicate)) - (most nil) - (most-len (length most)) - most-is-exact (alternatives - (mapconcat (if most #'iswitchb-output-completion - #'identity) - comps iswitchb-delim))) + (mapconcat #'identity comps iswitchb-delim))) (concat @@ -1283,17 +1266,9 @@ Modified from `icomplete-completions'." close-bracket-determined)) ;; end of partial matches... - ;; think this bit can be ignored. - (and (> most-len (length name)) - (concat open-bracket-determined - (substring most (length name)) - close-bracket-determined)) - ;; list all alternatives open-bracket-prospects - (if most-is-exact - (concat iswitchb-delim alternatives) - alternatives) + alternatives close-bracket-prospects)))))) (defun iswitchb-minibuffer-setup () -- cgit v1.2.3 From a0854f939ce3a1de2c8cbc5e38b106a8df4480f6 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Fri, 12 Mar 2021 12:11:17 +0100 Subject: ; Fix typos in doc strings --- lisp/calculator.el | 2 +- lisp/cedet/semantic/grammar.el | 2 +- lisp/emacs-lisp/edebug.el | 2 +- lisp/emulation/cua-rect.el | 2 +- lisp/international/quail.el | 2 +- lisp/jit-lock.el | 2 +- lisp/mail/smtpmail.el | 2 +- lisp/net/dictionary.el | 2 +- lisp/obsolete/iswitchb.el | 2 +- lisp/org/ol.el | 2 +- lisp/org/org-tempo.el | 2 +- lisp/org/org.el | 2 +- lisp/textmodes/reftex-vars.el | 2 +- test/lisp/kmacro-tests.el | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) (limited to 'lisp/obsolete/iswitchb.el') diff --git a/lisp/calculator.el b/lisp/calculator.el index 00883989b29..6dd8d9a7ec1 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -291,7 +291,7 @@ user-defined operators, use `calculator-user-operators' instead.") 5. The function's precedence -- should be in the range of 1 (lowest) to 9 (highest) (optional, defaults to 1); -It it possible have a unary prefix version of a binary operator if it +It is possible have a unary prefix version of a binary operator if it comes later in this list. If the list begins with the symbol `nobind', then no key binding will take place -- this is only used for predefined keys. diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index ca7c273febc..8d8faac9c49 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1740,7 +1740,7 @@ If it is a macro name, return a description of the associated expander function parameter list. If it is a function name, return a description of this function parameter list. -It it is a variable name, return a brief (one-line) documentation +If it is a variable name, return a brief (one-line) documentation string for the variable. If a default description of the current context can be obtained, return it. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 6f3c7d66881..f1455ffe73b 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -3508,7 +3508,7 @@ canceled the first time the function is entered." (defun edebug-cancel-on-entry (function) "Cause Edebug to not stop when FUNCTION is called. -The removes the effect of `edebug-on-entry'. If FUNCTION is is +The removes the effect of `edebug-on-entry'. If FUNCTION is nil, remove `edebug-on-entry' on all functions." (interactive (list (let ((name (completing-read diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index e66050b7136..0039092fd6e 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -46,7 +46,7 @@ A cua-rectangle definition is a vector used for all actions in TOP is the upper-left corner point. -BOTTOM is the point at the end of line after the the lower-right +BOTTOM is the point at the end of line after the lower-right corner point. LEFT and RIGHT are column numbers. diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f52747084b2..87a905045d4 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1075,7 +1075,7 @@ The installed decode map can be referred by the function `quail-decode-map'." KEY is a string meaning a sequence of keystrokes to be translated. TRANSLATION is a character, a string, a vector, a Quail map, a function, or a cons. -It it is a character, it is the sole translation of KEY. +If it is a character, it is the sole translation of KEY. If it is a string, each character is a candidate for the translation. If it is a vector, each element (string or character) is a candidate for the translation. diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index d169e40b817..a1287926eb9 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -105,7 +105,7 @@ This means those subsequent lines are refontified to reflect their new syntactic context, after `jit-lock-context-time' seconds. If any other value, e.g., `syntax-driven', it means refontification of subsequent lines to reflect their new syntactic context may or may not -occur after `jit-lock-context-time', depending on the the font-lock +occur after `jit-lock-context-time', depending on the font-lock definitions of the buffer. Specifically, if `font-lock-keywords-only' is nil in a buffer, which generally means the syntactic fontification is done using the buffer mode's syntax table, the syntactic diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 5c7ffd99897..ac5e8c3b6fb 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -186,7 +186,7 @@ mean \"try again\"." (defvar smtpmail-auth-supported '(cram-md5 plain login) "List of supported SMTP AUTH mechanisms. The list is in preference order. -Every element should have a matching `cl-defmethod' for +Every element should have a matching `cl-defmethod' for `smtpmail-try-auth-method'.") (defvar smtpmail-mail-address nil diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el index 5148a66724b..5938b8146ef 100644 --- a/lisp/net/dictionary.el +++ b/lisp/net/dictionary.el @@ -829,7 +829,7 @@ The DICTIONARY is only used for decoding the bytes to display the DESCRIPTION." (defun dictionary-display-word-definition (reply word dictionary) "Insert the definition in REPLY for the current WORD from DICTIONARY. It will replace links which are found in the REPLY and replace -them with buttons to perform a a new search." +them with buttons to perform a new search." (let ((start (point))) (insert (dictionary-decode-charset reply dictionary)) (insert "\n\n") diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index a9bc6ef0711..7ffee762eb2 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -313,7 +313,7 @@ Possible values: `otherwindow' Show new buffer in another window (same frame) `display' Display buffer in another window without switching to it `otherframe' Show new buffer in another frame -`maybe-frame' If a buffer is visible in another frame, prompt to ask if you +`maybe-frame' If a buffer is visible in another frame, prompt to ask if you want to see the buffer in the same window of the current frame or in the other frame. `always-frame' If a buffer is visible in another frame, raise that diff --git a/lisp/org/ol.el b/lisp/org/ol.el index 9ed6ab954ef..38e2dd6a02c 100644 --- a/lisp/org/ol.el +++ b/lisp/org/ol.el @@ -591,7 +591,7 @@ handle this as a special case. When the function does handle the link, it must return a non-nil value. If it decides that it is not responsible for this link, it must return -nil to indicate that that Org can continue with other options like +nil to indicate that Org can continue with other options like exact and fuzzy text search.") diff --git a/lisp/org/org-tempo.el b/lisp/org/org-tempo.el index 36b8614fe1c..c121b8e7aca 100644 --- a/lisp/org/org-tempo.el +++ b/lisp/org/org-tempo.el @@ -65,7 +65,7 @@ just like `org-structure-template-alist'. The tempo snippet \" \\cite[Chapter 1]{Jones} \\cite[see][]{Jones} -> \\cite[see][]{Jones} \\cite[see][Chapter 1]{Jones} -> \\cite{Jones} -Is is possible that other packages have other conventions about which +It is possible that other packages have other conventions about which optional argument is interpreted how - that is why this cleaning up can be turned off." :group 'reftex-citation-support diff --git a/test/lisp/kmacro-tests.el b/test/lisp/kmacro-tests.el index c8910720763..8736f7fd2dc 100644 --- a/test/lisp/kmacro-tests.el +++ b/test/lisp/kmacro-tests.el @@ -519,7 +519,7 @@ This is a regression test for: Bug#3412, Bug#11817." (should (eq saved-binding (key-binding "\C-a"))))) (kmacro-tests-deftest kmacro-tests-name-or-bind-to-key-when-no-macro () - "Bind to key, symbol or register fails when when no macro exists." + "Bind to key, symbol or register fails when no macro exists." (should-error (kmacro-bind-to-key nil)) (should-error (kmacro-name-last-macro 'kmacro-tests-symbol-for-test)) (should-error (kmacro-to-register))) -- cgit v1.2.3 From c45bfd3c4abbfa585c9199f4866b6b8046945117 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 11 Apr 2021 23:47:14 -0400 Subject: * lisp/**/*.el: Avoid positional args to `define-minor-mode` Back in Emacs-21.1, `define-minor-mode` grew keywords arguments to replace its old positional arguments. Let's make sure we don't use the old-style any more. * lisp/org/ox-beamer.el (org-beamer-mode-map): Move initialization into declaration. (org-beamer-mode): * lisp/textmodes/tildify.el (tildify-mode): * lisp/textmodes/sgml-mode.el (html-autoview-mode): * lisp/textmodes/rst.el (rst-minor-mode): * lisp/textmodes/remember.el (remember-notes-mode): * lisp/textmodes/ispell.el (ispell-minor-mode): * lisp/tar-mode.el (tar-subfile-mode): * lisp/strokes.el (strokes-mode): * lisp/so-long.el (so-long-minor-mode): * lisp/shell.el (shell-dirtrack-mode): * lisp/scroll-all.el (scroll-all-mode): * lisp/ruler-mode.el (ruler-mode): * lisp/rect.el (rectangle-mark-mode): * lisp/progmodes/sh-script.el (sh-electric-here-document-mode): * lisp/outline.el (outline-minor-mode): * lisp/org/org.el (org-cdlatex-mode): * lisp/org/org-table.el (org-table-header-line-mode) (org-table-follow-field-mode, orgtbl-mode): * lisp/org/org-src.el (org-src-mode): * lisp/org/org-list.el (org-list-checkbox-radio-mode): * lisp/org/org-indent.el (org-indent-mode): * lisp/org/org-capture.el (org-capture-mode): * lisp/obsolete/pc-select.el (pc-selection-mode): * lisp/obsolete/iswitchb.el (iswitchb-mode): * lisp/net/rcirc.el (rcirc-omit-mode, rcirc-multiline-minor-mode) (rcirc-track-minor-mode): * lisp/net/goto-addr.el (goto-address-mode, goto-address-prog-mode): * lisp/image-mode.el (image-minor-mode): * lisp/ibuf-ext.el (ibuffer-auto-mode): * lisp/gnus/gnus-cite.el (gnus-message-citation-mode): * lisp/font-core.el (font-lock-mode): * lisp/erc/erc.el (define-erc-module): * lisp/erc/erc-track.el (erc-track-minor-mode): * lisp/erc/erc-fill.el (erc-fill-mode): * lisp/epa-mail.el (epa-mail-mode): * lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode): * lisp/dirtrack.el (dirtrack-mode, dirtrack-debug-mode): * lisp/dired-aux.el (dired-isearch-filenames-mode): * lisp/cedet/semantic/idle.el (semantic-idle-scheduler-mode): * lisp/cedet/semantic/decorate/mode.el (semantic-decoration-mode): * lisp/autoarg.el (autoarg-mode, autoarg-kp-mode): * lisp/vc/pcvs.el (cvs-minor-mode): Avoid old-style positional args to `define-minor-mode`. --- lisp/autoarg.el | 4 ++-- lisp/cedet/semantic/decorate/mode.el | 2 +- lisp/cedet/semantic/idle.el | 3 ++- lisp/dired-aux.el | 2 +- lisp/dirtrack.el | 4 ++-- lisp/emacs-lisp/checkdoc.el | 2 +- lisp/emacs-lisp/macroexp.el | 3 ++- lisp/epa-mail.el | 2 +- lisp/erc/erc-fill.el | 1 - lisp/erc/erc-track.el | 3 --- lisp/erc/erc.el | 1 - lisp/font-core.el | 1 - lisp/gnus/gnus-cite.el | 4 +--- lisp/ibuf-ext.el | 2 +- lisp/image-mode.el | 3 +-- lisp/net/goto-addr.el | 8 ++------ lisp/net/rcirc.el | 7 +------ lisp/obsolete/iswitchb.el | 2 +- lisp/obsolete/pc-select.el | 2 -- lisp/org/org-capture.el | 2 +- lisp/org/org-indent.el | 2 +- lisp/org/org-list.el | 2 +- lisp/org/org-src.el | 2 +- lisp/org/org-table.el | 6 +++--- lisp/org/org.el | 2 +- lisp/org/ox-beamer.el | 8 +++++--- lisp/outline.el | 5 +++-- lisp/progmodes/sh-script.el | 2 +- lisp/rect.el | 2 +- lisp/ruler-mode.el | 2 -- lisp/scroll-all.el | 2 +- lisp/shell.el | 2 +- lisp/so-long.el | 2 +- lisp/strokes.el | 2 +- lisp/tar-mode.el | 2 +- lisp/textmodes/ispell.el | 2 +- lisp/textmodes/remember.el | 2 +- lisp/textmodes/rst.el | 12 +++++------- lisp/textmodes/sgml-mode.el | 2 +- lisp/textmodes/tildify.el | 2 +- lisp/vc/pcvs.el | 2 +- 41 files changed, 52 insertions(+), 71 deletions(-) (limited to 'lisp/obsolete/iswitchb.el') diff --git a/lisp/autoarg.el b/lisp/autoarg.el index c2cb0c7051c..7c2c6f1030d 100644 --- a/lisp/autoarg.el +++ b/lisp/autoarg.el @@ -107,7 +107,7 @@ then invokes the normal binding of \\[autoarg-terminate]. `C-u \\[autoarg-terminate]' invokes the normal binding of \\[autoarg-terminate] four times. \\{autoarg-mode-map}" - nil " Aarg" autoarg-mode-map :global t :group 'keyboard) + :lighter" Aarg" :global t :group 'keyboard) ;;;###autoload (define-minor-mode autoarg-kp-mode @@ -118,7 +118,7 @@ This is similar to `autoarg-mode' but rebinds the keypad keys `kp-1' etc. to supply digit arguments. \\{autoarg-kp-mode-map}" - nil " Aakp" autoarg-kp-mode-map :global t :group 'keyboard + :lighter " Aakp" :global t :group 'keyboard (if autoarg-kp-mode (dotimes (i 10) (let ((sym (intern (format "kp-%d" i)))) diff --git a/lisp/cedet/semantic/decorate/mode.el b/lisp/cedet/semantic/decorate/mode.el index 78950159199..c6bf15205fd 100644 --- a/lisp/cedet/semantic/decorate/mode.el +++ b/lisp/cedet/semantic/decorate/mode.el @@ -254,7 +254,7 @@ available and the current buffer was set up for parsing. Return non-nil if the minor mode is enabled." ;; ;;\\{semantic-decoration-map}" - nil nil nil + :lighter nil (if semantic-decoration-mode (if (not (and (featurep 'semantic) (semantic-active-p))) (progn diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 420a457b0ea..b883573a30f 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -171,7 +171,8 @@ date, and reparses while the user is idle (not typing.) The minor mode can be turned on only if semantic feature is available and the current buffer was set up for parsing. Return -non-nil if the minor mode is enabled." nil nil nil +non-nil if the minor mode is enabled." + :lighter nil (if semantic-idle-scheduler-mode (if (not (and (featurep 'semantic) (semantic-active-p))) (progn diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d5f49108767..8fe612fa0b1 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -2980,7 +2980,7 @@ a file name. Otherwise, it searches the whole buffer without restrictions." When on, Isearch skips matches outside file names using the predicate `dired-isearch-filter-filenames' that matches only at file names. When off, it uses the original predicate." - nil nil nil + :lighter nil (if dired-isearch-filenames-mode (add-function :before-while (local 'isearch-filter-predicate) #'dired-isearch-filter-filenames diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el index 7f76ef6653a..be8db75c967 100644 --- a/lisp/dirtrack.el +++ b/lisp/dirtrack.el @@ -184,7 +184,7 @@ working directory at all times, and that you set the variable This is an alternative to `shell-dirtrack-mode', which works by tracking `cd' and similar commands which change the shell working directory." - nil nil nil + :lighter nil (if dirtrack-mode (add-hook 'comint-preoutput-filter-functions 'dirtrack nil t) (remove-hook 'comint-preoutput-filter-functions 'dirtrack t))) @@ -192,7 +192,7 @@ directory." (define-minor-mode dirtrack-debug-mode "Toggle Dirtrack debugging." - nil nil nil + :lighter nil (if dirtrack-debug-mode (display-buffer (get-buffer-create dirtrack-debug-buffer)))) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 96b16f7ed45..00cc7777e1a 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1242,7 +1242,7 @@ bound to \\\\[checkdoc-eval-defun] and `checkdoc-eval-c checking of documentation strings. \\{checkdoc-minor-mode-map}" - nil checkdoc-minor-mode-string nil + :lighter checkdoc-minor-mode-string :group 'checkdoc) ;;; Subst utils diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 59ada5ec35a..df864464b77 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -394,7 +394,8 @@ Assumes the caller has bound `macroexpand-all-environment'." ;; Record which arguments expect functions, so we can warn when those ;; are accidentally quoted with ' rather than with #' -(dolist (f '(funcall apply mapcar mapatoms mapconcat mapc cl-mapcar maphash)) +(dolist (f '( funcall apply mapcar mapatoms mapconcat mapc cl-mapcar maphash + map-char-table map-keymap map-keymap-internal)) (put f 'funarg-positions '(1))) (dolist (f '( add-hook remove-hook advice-remove advice--remove-function defalias fset global-set-key run-after-idle-timeout diff --git a/lisp/epa-mail.el b/lisp/epa-mail.el index 7e100569b0f..7eac1f89986 100644 --- a/lisp/epa-mail.el +++ b/lisp/epa-mail.el @@ -59,7 +59,7 @@ Otherwise, signal an error." ;;;###autoload (define-minor-mode epa-mail-mode "A minor-mode for composing encrypted/clearsigned mails." - nil " epa-mail" epa-mail-mode-map) + :lighter " epa-mail") ;;; Utilities diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index 0312d221ece..41256682c00 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el @@ -46,7 +46,6 @@ the mode if ARG is omitted or nil. ERC fill mode is a global minor mode. When enabled, messages in the channel buffers are filled." - nil nil nil :global t (if erc-fill-mode (erc-fill-enable) diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 9985b6a02f0..2364d45d6f3 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -464,9 +464,6 @@ ERC Track minor mode is a global minor mode. It exists for the sole purpose of providing the C-c C-SPC and C-c C-@ keybindings. Make sure that you have enabled the track module, otherwise the keybindings will not do anything useful." - :init-value nil - :lighter "" - :keymap erc-track-minor-mode-map :global t) (defun erc-track-minor-mode-maybe (&optional buffer) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index f0144de8446..e20aa8057de 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1289,7 +1289,6 @@ With a prefix argument ARG, enable %s if ARG is positive, and disable it otherwise. If called from Lisp, enable the mode if ARG is omitted or nil. %s" name name doc) - nil nil nil ;; FIXME: We don't know if this group exists, so this `:group' may ;; actually just silence a valid warning about the fact that the var ;; is not associated with any group. diff --git a/lisp/font-core.el b/lisp/font-core.el index 4b695424977..db06a607660 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -126,7 +126,6 @@ buffer local value for `font-lock-defaults', via its mode hook. The above is the default behavior of `font-lock-mode'; you may specify your own function which is called when `font-lock-mode' is toggled via `font-lock-function'." - nil nil nil :after-hook (font-lock-initial-fontify) ;; Don't turn on Font Lock mode if we don't have a display (we're running a ;; batch job) or if the buffer is invisible (the name starts with a space). diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 4249b50b9ff..34947cece89 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -1134,9 +1134,7 @@ Returns nil if there is no such line before LIMIT, t otherwise." (define-minor-mode gnus-message-citation-mode "Minor mode providing more font-lock support for nested citations. When enabled, it automatically turns on `font-lock-mode'." - nil ;; init-value - "" ;; lighter - nil ;; keymap + :lighter "" (when (derived-mode-p 'message-mode) ;; FIXME: Use font-lock-add-keywords! (let ((defaults (car font-lock-defaults)) diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 48f9e8a990d..1dc8acbe1f3 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -402,7 +402,7 @@ format. See `ibuffer-update-saved-filters-format' and ;;;###autoload (define-minor-mode ibuffer-auto-mode "Toggle use of Ibuffer's auto-update facility (Ibuffer Auto mode)." - nil nil nil + :lighter nil (unless (derived-mode-p 'ibuffer-mode) (error "This buffer is not in Ibuffer mode")) (cond (ibuffer-auto-mode diff --git a/lisp/image-mode.el b/lisp/image-mode.el index f4ff35f9c41..69ef7015cce 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -713,8 +713,7 @@ Key bindings: Image minor mode provides the key \\\\[image-toggle-display], to switch back to `image-mode' and display an image file as the actual image." - nil (:eval (if image-type (format " Image[%s]" image-type) " Image")) - image-minor-mode-map + :lighter (:eval (if image-type (format " Image[%s]" image-type) " Image")) :group 'image :version "22.1" (if image-minor-mode diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index af12f6970a6..8992ef736a6 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -263,9 +263,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and ;;;###autoload (define-minor-mode goto-address-mode "Minor mode to buttonize URLs and e-mail addresses in the current buffer." - nil - "" - nil + :lighter "" (if goto-address-mode (jit-lock-register #'goto-address-fontify-region) (jit-lock-unregister #'goto-address-fontify-region) @@ -285,9 +283,7 @@ Also fontifies the buffer appropriately (see `goto-address-fontify-p' and ;;;###autoload (define-minor-mode goto-address-prog-mode "Like `goto-address-mode', but only for comments and strings." - nil - "" - nil + :lighter "" (if goto-address-prog-mode (jit-lock-register #'goto-address-fontify-region) (jit-lock-unregister #'goto-address-fontify-region) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 938fadfed74..7bb8ca671cf 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -196,7 +196,7 @@ If nil, no maximum is applied." Uninteresting lines are those whose responses are listed in `rcirc-omit-responses'." - nil " Omit" nil + :lighter " Omit" (if rcirc-omit-mode (progn (add-to-invisibility-spec '(rcirc-omit . nil)) @@ -1359,9 +1359,7 @@ Create the buffer if it doesn't exist." (define-minor-mode rcirc-multiline-minor-mode "Minor mode for editing multiple lines in rcirc." - :init-value nil :lighter " rcirc-mline" - :keymap rcirc-multiline-minor-mode-map :global nil (setq fill-column rcirc-max-message-length)) @@ -1863,9 +1861,6 @@ This function does not alter the INPUT string." ;;;###autoload (define-minor-mode rcirc-track-minor-mode "Global minor mode for tracking activity in rcirc buffers." - :init-value nil - :lighter "" - :keymap rcirc-track-minor-mode-map :global t (or global-mode-string (setq global-mode-string '(""))) ;; toggle the mode-line channel indicator diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index 7ffee762eb2..a630baf3543 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -1336,7 +1336,7 @@ See the variable `iswitchb-case' for details." Iswitchb mode is a global minor mode that enables switching between buffers using substrings. See `iswitchb' for details." - nil nil iswitchb-global-map :global t + :keymap iswitchb-global-map :global t (if iswitchb-mode (add-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup) (remove-hook 'minibuffer-setup-hook #'iswitchb-minibuffer-setup))) diff --git a/lisp/obsolete/pc-select.el b/lisp/obsolete/pc-select.el index 59828759e66..f999f507972 100644 --- a/lisp/obsolete/pc-select.el +++ b/lisp/obsolete/pc-select.el @@ -314,8 +314,6 @@ but before calling PC Selection mode): C-BACKSPACE backward-kill-word M-BACKSPACE undo" ;; FIXME: bring pc-bindings-mode here ? - nil nil nil - :global t (if pc-selection-mode diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index f40f2b335ef..7ae8fae3aab 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -521,7 +521,7 @@ for a capture buffer.") "Minor mode for special key bindings in a capture buffer. Turning on this mode runs the normal hook `org-capture-mode-hook'." - nil " Cap" org-capture-mode-map + :lighter " Cap" (setq-local header-line-format (substitute-command-keys diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index c6bf416564e..3475cadc42d 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el @@ -167,7 +167,7 @@ properties, after each buffer modification, on the modified zone. The process is synchronous. Though, initial indentation of buffer, which can take a few seconds on large buffers, is done during idle time." - nil " Ind" nil + :lighter " Ind" (cond (org-indent-mode ;; mode was turned on. diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index 39122e7ce41..f97164ee33b 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el @@ -2304,7 +2304,7 @@ is an integer, 0 means `-', 1 means `+' etc. If WHICH is ;;;###autoload (define-minor-mode org-list-checkbox-radio-mode "When turned on, use list checkboxes as radio buttons." - nil " CheckBoxRadio" nil + :lighter " CheckBoxRadio" (unless (eq major-mode 'org-mode) (user-error "Cannot turn this mode outside org-mode buffers"))) diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index 20acee4e662..cabedecb689 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el @@ -682,7 +682,7 @@ This minor mode is turned on in two situations: \\{org-src-mode-map} See also `org-src-mode-hook'." - nil " OrgSrc" nil + :lighter " OrgSrc" (when org-edit-src-persistent-message (setq header-line-format (substitute-command-keys diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 1248efabc15..0e93fb271f3 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -495,7 +495,7 @@ This may be useful when columns have been shrunk." ;;;###autoload (define-minor-mode org-table-header-line-mode "Display the first row of the table at point in the header line." - nil " TblHeader" nil + :lighter " TblHeader" (unless (eq major-mode 'org-mode) (user-error "Cannot turn org table header mode outside org-mode buffers")) (if org-table-header-line-mode @@ -1976,7 +1976,7 @@ lines." When this mode is active, the field editor window will always show the current field. The mode exits automatically when the cursor leaves the table (but see `org-table-exit-follow-field-mode-when-leaving-table')." - nil " TblFollow" nil + :lighter " TblFollow" (if org-table-follow-field-mode (add-hook 'post-command-hook 'org-table-follow-fields-with-editor 'append 'local) @@ -5149,7 +5149,7 @@ When LOCAL is non-nil, show references for the table at point." ;;;###autoload (define-minor-mode orgtbl-mode "The Org mode table editor as a minor mode for use in other modes." - :lighter " OrgTbl" :keymap orgtbl-mode-map + :lighter " OrgTbl" (org-load-modules-maybe) (cond ((derived-mode-p 'org-mode) diff --git a/lisp/org/org.el b/lisp/org/org.el index cebe1735bed..f560c65dc4f 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -15584,7 +15584,7 @@ When a buffer is unmodified, it is just killed. When modified, it is saved This mode supports entering LaTeX environment and math in LaTeX fragments in Org mode. \\{org-cdlatex-mode-map}" - nil " OCDL" nil + :lighter " OCDL" (when org-cdlatex-mode (require 'cdlatex) (run-hooks 'cdlatex-mode-hook) diff --git a/lisp/org/ox-beamer.el b/lisp/org/ox-beamer.el index 1a1732b6836..6ed95e84d6b 100644 --- a/lisp/org/ox-beamer.el +++ b/lisp/org/ox-beamer.el @@ -895,14 +895,16 @@ holding export options." ;;; Minor Mode -(defvar org-beamer-mode-map (make-sparse-keymap) +(defvar org-beamer-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-b" 'org-beamer-select-environment) + map) "The keymap for `org-beamer-mode'.") -(define-key org-beamer-mode-map "\C-c\C-b" 'org-beamer-select-environment) ;;;###autoload (define-minor-mode org-beamer-mode "Support for editing Beamer oriented Org mode files." - nil " Bm" 'org-beamer-mode-map) + :lighter " Bm") (when (fboundp 'font-lock-add-keywords) (font-lock-add-keywords diff --git a/lisp/outline.el b/lisp/outline.el index 79029a6e5e7..bce9c6b9e4d 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -374,8 +374,9 @@ faces to major mode's faces." "Toggle Outline minor mode. See the command `outline-mode' for more information on this mode." - nil " Outl" (list (cons [menu-bar] outline-minor-mode-menu-bar-map) - (cons outline-minor-mode-prefix outline-mode-prefix-map)) + :lighter " Outl" + :keymap (list (cons [menu-bar] outline-minor-mode-menu-bar-map) + (cons outline-minor-mode-prefix outline-mode-prefix-map)) (if outline-minor-mode (progn (when (or outline-minor-mode-cycle outline-minor-mode-highlight) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index ba59f9c6616..c6bd32a4a4b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -2967,7 +2967,7 @@ The document is bounded by `sh-here-document-word'." (define-minor-mode sh-electric-here-document-mode "Make << insert a here document skeleton." - nil nil nil + :lighter nil (if sh-electric-here-document-mode (add-hook 'post-self-insert-hook #'sh--maybe-here-document nil t) (remove-hook 'post-self-insert-hook #'sh--maybe-here-document t))) diff --git a/lisp/rect.el b/lisp/rect.el index cb941b46009..504be41b673 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -652,7 +652,7 @@ with a prefix argument, prompt for START-AT and FORMAT." "Toggle the region as rectangular. Activates the region if needed. Only lasts until the region is deactivated." - nil nil nil + :lighter nil (rectangle--reset-crutches) (when rectangle-mark-mode (add-hook 'deactivate-mark-hook diff --git a/lisp/ruler-mode.el b/lisp/ruler-mode.el index 11226fda020..a0d4f6e96c2 100644 --- a/lisp/ruler-mode.el +++ b/lisp/ruler-mode.el @@ -568,8 +568,6 @@ format first." ;;;###autoload (define-minor-mode ruler-mode "Toggle display of ruler in header line (Ruler mode)." - nil nil - ruler-mode-map :group 'ruler-mode :variable (ruler-mode . (lambda (enable) diff --git a/lisp/scroll-all.el b/lisp/scroll-all.el index 8ba0cc9e032..415244f9e92 100644 --- a/lisp/scroll-all.el +++ b/lisp/scroll-all.el @@ -108,7 +108,7 @@ ARG is like in `end-of-buffer'." When Scroll-All mode is enabled, scrolling commands invoked in one window apply to all visible windows in the same frame." - nil " *SL*" nil + :lighter " *SL*" :global t :group 'windows (if scroll-all-mode diff --git a/lisp/shell.el b/lisp/shell.el index cd99b008776..3098d3a14da 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -980,7 +980,7 @@ Environment variables are expanded, see function `substitute-in-file-name'." The `dirtrack' package provides an alternative implementation of this feature; see the function `dirtrack-mode'." - nil nil nil + :lighter nil (setq list-buffers-directory (if shell-dirtrack-mode default-directory)) (if shell-dirtrack-mode (add-hook 'comint-input-filter-functions #'shell-directory-tracker nil t) diff --git a/lisp/so-long.el b/lisp/so-long.el index f44d41dc5eb..f916b61b60f 100644 --- a/lisp/so-long.el +++ b/lisp/so-long.el @@ -1185,7 +1185,7 @@ current buffer, and buffer-local values are assigned to variables in accordance with `so-long-variable-overrides'. This minor mode is a standard `so-long-action' option." - nil nil nil + :lighter nil (if so-long-minor-mode ;; We are enabling the mode. (progn ;; Housekeeping. `so-long-minor-mode' might be invoked directly rather diff --git a/lisp/strokes.el b/lisp/strokes.el index 4b682e99feb..4a018ff1993 100644 --- a/lisp/strokes.el +++ b/lisp/strokes.el @@ -1393,7 +1393,7 @@ Encode/decode your strokes with \\[strokes-encode-buffer], \\[strokes-decode-buffer]. \\{strokes-mode-map}" - nil strokes-lighter strokes-mode-map :global t + :ligher strokes-lighter :global t (cond ((not (display-mouse-p)) (error "Can't use Strokes without a mouse")) (strokes-mode ; turn on strokes diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index fa9b47556f7..d9b2d421932 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el @@ -751,7 +751,7 @@ into the tar-file buffer that it came from. The changes will actually appear on disk when you save the tar-file's buffer." ;; Don't do this, because it is redundant and wastes mode line space. ;; :lighter " TarFile" - nil nil nil + :lighter nil (or (and (boundp 'tar-superior-buffer) tar-superior-buffer) (error "This buffer is not an element of a tar file")) (cond (tar-subfile-mode diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index eb521134dc4..932308ee59d 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -3744,7 +3744,7 @@ SPC. For spell-checking \"on the fly\", not just after typing SPC or RET, use `flyspell-mode'." - nil " Spell" ispell-minor-keymap) + :lighter " Spell" :keymap ispell-minor-keymap) (defun ispell-minor-check () "Check previous word, then continue with the normal binding of this key. diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el index cd76bf80f19..8a0436afc64 100644 --- a/lisp/textmodes/remember.el +++ b/lisp/textmodes/remember.el @@ -607,7 +607,7 @@ This sets `buffer-save-without-query' so that `save-some-buffers' will save the notes buffer without asking. \\{remember-notes-mode-map}" - nil nil nil + :lighter nil (cond (remember-notes-mode (add-hook 'kill-buffer-query-functions diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 56cca840047..1471be0ecd6 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -1408,13 +1408,11 @@ highlighting. When ReST minor mode is enabled, the ReST mode keybindings are installed on top of the major mode bindings. Use this for modes derived from Text mode, like Mail mode." - ;; The initial value. - nil - ;; The indicator for the mode line. - " ReST" - ;; The minor mode bindings. - rst-mode-map - :group 'rst) + ;; The indicator for the mode line. + :lighter " ReST" + ;; The minor mode bindings. + :keymap rst-mode-map + :group 'rst) ;; FIXME: can I somehow install these too? ;; :abbrev-table rst-mode-abbrev-table diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index 6958ab8f658..67f731917e2 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -2440,7 +2440,7 @@ The third `match-string' will be the used in the menu.") HTML Autoview mode is a buffer-local minor mode for use with `html-mode'. If enabled, saving the file automatically runs `browse-url-of-buffer' to view it." - nil nil nil + :lighter nil (if html-autoview-mode (add-hook 'after-save-hook #'browse-url-of-buffer nil t) (remove-hook 'after-save-hook #'browse-url-of-buffer t))) diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index 069c8e3f443..163978b4315 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -486,7 +486,7 @@ that space character is replaced by a hard space specified by When `tildify-mode' is enabled, if `tildify-string-alist' specifies a hard space representation for current major mode, the `tildify-space-string' buffer-local variable will be set to the representation." - nil " ~" nil + :lighter " ~" (when tildify-mode (let ((space (with-suppressed-warnings ((obsolete tildify--pick-alist-entry)) diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el index 6e039cc6256..42f531e4f75 100644 --- a/lisp/vc/pcvs.el +++ b/lisp/vc/pcvs.el @@ -331,7 +331,7 @@ the primary since reading the primary can deactivate it." "This mode is used for buffers related to a main *cvs* buffer. All the `cvs-mode' buffer operations are simply rebound under the \\[cvs-mode-map] prefix." - nil " CVS" + :lighter " CVS" :group 'pcl-cvs) (put 'cvs-minor-mode 'permanent-local t) -- cgit v1.2.3