diff options
Diffstat (limited to 'lisp')
52 files changed, 302 insertions, 233 deletions
diff --git a/lisp/calculator.el b/lisp/calculator.el index 55229bc03fb..49d47a0519b 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -191,7 +191,7 @@ Each element in this list is a list of a character and a number that will be stored in that character's register. For example, use this to define the golden ratio number: - (setq calculator-user-registers '((?g . 1.61803398875))) + (setq calculator-user-registers \\='((?g . 1.61803398875))) before you load calculator." :type '(repeat (cons character number)) :set (lambda (_ val) @@ -214,7 +214,7 @@ Examples: t as a prefix key: (setq calculator-user-operators - '((\"tf\" cl-to-fr (+ 32 (/ (* X 9) 5)) 1) + \\='((\"tf\" cl-to-fr (+ 32 (/ (* X 9) 5)) 1) (\"tc\" fr-to-cl (/ (* (- X 32) 5) 9) 1) (\"tp\" kg-to-lb (/ X 0.453592) 1) (\"tk\" lb-to-kg (* X 0.453592) 1) @@ -226,8 +226,8 @@ Examples: version of `X' and `F' for a recursive call. Here is a [very inefficient] Fibonacci number calculation: - (add-to-list 'calculator-user-operators - '(\"F\" fib + (add-to-list \\='calculator-user-operators + \\='(\"F\" fib (if (<= TX 1) 1 (+ (F (- TX 1)) (F (- TX 2)))))) Note that this will be either postfix or prefix, according to diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index e8d6077b165..a0d0def61a5 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -82,7 +82,7 @@ list and for correcting times of day in the solar and lunar calculations. For example, if daylight saving time ends on the last Sunday in October: - '(calendar-nth-named-day -1 0 10 year) + (calendar-nth-named-day -1 0 10 year) If the locale never uses daylight saving time, set this to nil." :type 'sexp diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index c35bd38bb64..07977afc397 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -550,12 +550,12 @@ For example, to display the ISO week numbers: (setq calendar-week-start-day 1 calendar-intermonth-text - '(propertize + \\='(propertize (format \"%2d\" (car (calendar-iso-from-absolute (calendar-absolute-from-gregorian (list month day year))))) - 'font-lock-face 'font-lock-function-name-face)) + \\='font-lock-face \\='font-lock-function-name-face)) See also `calendar-intermonth-header'." :group 'calendar diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el index 225caa599fb..95d9d846466 100644 --- a/lisp/cedet/semantic/idle.el +++ b/lisp/cedet/semantic/idle.el @@ -716,8 +716,8 @@ It might be useful to override this variable to add comment faces specific to a major mode. For example, in jde mode: \(defvar-mode-local jde-mode semantic-idle-summary-out-of-context-faces - (append (default-value 'semantic-idle-summary-out-of-context-faces) - '(jde-java-font-lock-doc-tag-face + (append (default-value \\='semantic-idle-summary-out-of-context-faces) + \\='(jde-java-font-lock-doc-tag-face jde-java-font-lock-link-face jde-java-font-lock-bold-face jde-java-font-lock-underline-face diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 70308334183..08c1acdae86 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1189,8 +1189,8 @@ and `defface'. For example, the MH-E package updates this alist as follows: - (add-to-list 'customize-package-emacs-version-alist - '(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\") + (add-to-list \\='customize-package-emacs-version-alist + \\='(MH-E (\"6.0\" . \"22.1\") (\"6.1\" . \"22.1\") (\"7.0\" . \"22.1\") (\"7.1\" . \"22.1\") (\"7.2\" . \"22.1\") (\"7.3\" . \"22.1\") (\"7.4\" . \"22.1\") (\"8.0\" . \"22.1\"))) diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 38deeaeaaa9..ba50680e8b9 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -568,7 +568,7 @@ may be bound to temporary variables which are introduced automatically to preserve proper execution order of the arguments. For example: - (defsetf nth (n x) (v) `(setcar (nthcdr ,n ,x) ,v)) + (defsetf nth (n x) (v) \\=`(setcar (nthcdr ,n ,x) ,v)) You can replace this form with `gv-define-setter'. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 84c07d96c8d..ad178c3a2c2 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -683,12 +683,12 @@ This class is not stored in the `parent' slot of a class vector." "Make a new instance of CLASS based on INITARGS. For example: - (make-instance 'foo) + (make-instance \\='foo) INITARGS is a property list with keywords based on the `:initarg' for each slot. For example: - (make-instance 'foo :slot1 value1 :slotN valueN)") + (make-instance \\='foo :slot1 value1 :slotN valueN)") (define-obsolete-function-alias 'constructor #'make-instance "25.1") diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index feffd5470c4..2dae86ebc95 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -337,8 +337,8 @@ and the face `eldoc-highlight-function-argument', if they are to have any effect. Major modes should modify this variable using `add-function', for example: - (add-function :before-until (local 'eldoc-documentation-function) - #'foo-mode-eldoc-function) + (add-function :before-until (local \\='eldoc-documentation-function) + #\\='foo-mode-eldoc-function) so that the global documentation function (i.e. the default value of the variable) is taken into account if the major mode specific function does not return any documentation.") diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index bed9024e037..67609820a33 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -218,7 +218,7 @@ return a Lisp form that does the assignment. The first arg in ARGLIST (the one that receives VAL) receives an expression which can do arbitrary things, whereas the other arguments are all guaranteed to be pure and copyable. Example use: - (gv-define-setter aref (v a i) `(aset ,a ,i ,v))" + (gv-define-setter aref (v a i) \\=`(aset ,a ,i ,v))" (declare (indent 2) (debug (&define name sexp body))) `(gv-define-expander ,name (lambda (do &rest args) diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index e91ce80bbe2..52e1647ede7 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -685,7 +685,7 @@ a cons (TYPE . COLOR), then both properties are affected." (defvar cua--prefix-override-timer nil) (defvar cua--prefix-override-length nil) -(defun cua--prefix-override-replay (arg repeat) +(defun cua--prefix-override-replay (repeat) (let* ((keys (this-command-keys)) (i (length keys)) (key (aref keys (1- i)))) @@ -705,21 +705,23 @@ a cons (TYPE . COLOR), then both properties are affected." ;; Don't record this command (setq this-command last-command) ;; Restore the prefix arg - (setq prefix-arg arg) - (reset-this-command-lengths) + ;; This should make it so that exchange-point-and-mark gets the prefix when + ;; you do C-u C-x C-x C-x work (where the C-u is properly passed to the C-x + ;; C-x binding after the first C-x C-x was rewritten to just C-x). + (prefix-command-preserve-state) ;; Push the key back on the event queue (setq unread-command-events (cons key unread-command-events)))) -(defun cua--prefix-override-handler (arg) +(defun cua--prefix-override-handler () "Start timer waiting for prefix key to be followed by another key. Repeating prefix key when region is active works as a single prefix key." - (interactive "P") - (cua--prefix-override-replay arg 0)) + (interactive) + (cua--prefix-override-replay 0)) -(defun cua--prefix-repeat-handler (arg) +(defun cua--prefix-repeat-handler () "Repeating prefix key when region is active works as a single prefix key." - (interactive "P") - (cua--prefix-override-replay arg 1)) + (interactive) + (cua--prefix-override-replay 1)) (defun cua--prefix-copy-handler (arg) "Copy region/rectangle, then replay last key." @@ -742,7 +744,8 @@ Repeating prefix key when region is active works as a single prefix key." (when (= (length (this-command-keys)) cua--prefix-override-length) (setq unread-command-events (cons 'timeout unread-command-events)) (if prefix-arg - (reset-this-command-lengths) + nil + ;; FIXME: Why? (setq overriding-terminal-local-map nil)) (cua--select-keymaps))) @@ -755,8 +758,9 @@ Repeating prefix key when region is active works as a single prefix key." (call-interactively this-command)) (defun cua--keep-active () - (setq mark-active t - deactivate-mark nil)) + (when (mark t) + (setq mark-active t + deactivate-mark nil))) (defun cua--deactivate (&optional now) (if (not now) @@ -944,7 +948,7 @@ See also `exchange-point-and-mark'." (cond ((null cua-enable-cua-keys) (exchange-point-and-mark arg)) (arg - (setq mark-active t)) + (when (mark t) (setq mark-active t))) (t (let (mark-active) (exchange-point-and-mark) @@ -1212,25 +1216,28 @@ If ARG is the atom `-', scroll upward by nearly full screen." (defvar cua--keymaps-initialized nil) -(defun cua--shift-control-prefix (prefix arg) +(defun cua--shift-control-prefix (prefix) ;; handle S-C-x and S-C-c by emulating the fast double prefix function. ;; Don't record this command (setq this-command last-command) ;; Restore the prefix arg - (setq prefix-arg arg) - (reset-this-command-lengths) + ;; This should make it so that exchange-point-and-mark gets the prefix when + ;; you do C-u S-C-x C-x work (where the C-u is properly passed to the C-x + ;; C-x binding after the first S-C-x was rewritten to just C-x). + (prefix-command-preserve-state) ;; Activate the cua--prefix-repeat-keymap (setq cua--prefix-override-timer 'shift) ;; Push duplicate keys back on the event queue - (setq unread-command-events (cons prefix (cons prefix unread-command-events)))) + (setq unread-command-events + (cons prefix (cons prefix unread-command-events)))) -(defun cua--shift-control-c-prefix (arg) - (interactive "P") - (cua--shift-control-prefix ?\C-c arg)) +(defun cua--shift-control-c-prefix () + (interactive) + (cua--shift-control-prefix ?\C-c)) -(defun cua--shift-control-x-prefix (arg) - (interactive "P") - (cua--shift-control-prefix ?\C-x arg)) +(defun cua--shift-control-x-prefix () + (interactive) + (cua--shift-control-prefix ?\C-x)) (defun cua--init-keymaps () ;; Cache actual rectangle modifier key. diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index db5f6a63519..eec69256db6 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -1082,7 +1082,7 @@ As an example: Would expand to: (prog2 - (defvar erc-server-311-functions 'erc-server-311 + (defvar erc-server-311-functions \\='erc-server-311 \"Some non-generic variable documentation. Hook called upon receiving a 311 server response. diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 9de9b257c10..441663f3b3b 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -782,9 +782,9 @@ PORTS should be a list of either: numbers between LOW and HIGH (inclusive) is returned. As an example: - (erc-ports-list '(1)) => (1) - (erc-ports-list '((1 5))) => (1 2 3 4 5) - (erc-ports-list '(1 (3 5))) => (1 3 4 5)" + (erc-ports-list \\='(1)) => (1) + (erc-ports-list \\='((1 5))) => (1 2 3 4 5) + (erc-ports-list \\='(1 (3 5))) => (1 3 4 5)" (let (result) (dolist (p ports) (cond ((numberp p) @@ -866,4 +866,3 @@ VALUE is the options value.") ;; indent-tabs-mode: t ;; tab-width: 8 ;; End: - diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 07a4274dcb6..2d2fa6230c3 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -172,7 +172,7 @@ You can also use M-x erc-nickserv-identify-mode to change modes." Example of use: (setq erc-nickserv-passwords - '((freenode ((\"nick-one\" . \"password\") + \\='((freenode ((\"nick-one\" . \"password\") (\"nick-two\" . \"password\"))) (DALnet ((\"nick\" . \"password\")))))" :group 'erc-services diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index f2821798103..726e9ed9a21 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -927,7 +927,7 @@ If no elements match, then the empty string is used. As an example: (setq erc-quit-reason-various-alist - '((\"xmms\" dme:now-playing) + \\='((\"xmms\" dme:now-playing) (\"version\" erc-quit-reason-normal) (\"home\" \"Gone home !\") (\"^$\" \"Default Reason\"))) @@ -950,7 +950,7 @@ If no elements match, then the empty string is used. As an example: (setq erc-part-reason-various-alist - '((\"xmms\" dme:now-playing) + \\='((\"xmms\" dme:now-playing) (\"version\" erc-part-reason-normal) (\"home\" \"Gone home !\") (\"^$\" \"Default Reason\"))) diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 2e929b05f49..4d28208b234 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el @@ -82,7 +82,7 @@ and `eshell-stringify-list'. For example, OPTIONS might look like: - '((?C nil nil multi-column \"multi-column display\") + ((?C nil nil multi-column \"multi-column display\") (nil \"help\" nil nil \"show this usage display\") (?r \"reverse\" nil reverse-list \"reverse order while sorting\") :external \"ls\" diff --git a/lisp/filesets.el b/lisp/filesets.el index 8e2b145d04c..c098879d49d 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el @@ -951,7 +951,7 @@ variable will take effect after rebuilding the menu. Caveat: Fileset names have to be unique. Example definition: - '\(\(\"My Wiki\" + \\='\(\(\"My Wiki\" \(:ingroup \"~/Etc/My-Wiki/WikiContents\")) \(\"My Homepage\" \(:pattern \"~/public_html/\" \"^.+\\\\.html$\") diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 5f12c6c129f..b74b60341bd 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -683,9 +683,9 @@ end of the current highlighting list. For example: - (font-lock-add-keywords 'c-mode - '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 'font-lock-warning-face prepend) - (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . 'font-lock-keyword-face))) + (font-lock-add-keywords \\='c-mode + \\='((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 \\='font-lock-warning-face prepend) + (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" . \\='font-lock-keyword-face))) adds two fontification patterns for C mode, to fontify `FIXME:' words, even in comments, and to fontify `and', `or' and `not' words as keywords. diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b4a2f6a1773..01eb6c5cd48 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -330,7 +330,7 @@ to match a mail address in the From: header, BANNER is one of a symbol If ADDRESS matches author's mail address, it will remove things like advertisements. For example: -\((\"@yoo-hoo\\\\.co\\\\.jp\\\\'\" . \"\\n_+\\nDo You Yoo-hoo!\\\\?\\n.*\\n.*\\n\")) +\((\"@yoo-hoo\\\\.co\\\\.jp\\\\\\='\" . \"\\n_+\\nDo You Yoo-hoo!\\\\?\\n.*\\n.*\\n\")) " :type '(repeat (cons @@ -886,12 +886,12 @@ Here are examples: ;; Specify the altitude of Face images in the From header. \(setq gnus-face-properties-alist - '((pbm . (:face gnus-x-face :ascent 80)) + \\='((pbm . (:face gnus-x-face :ascent 80)) (png . (:ascent 80)))) ;; Show Face images as pressed buttons. \(setq gnus-face-properties-alist - '((pbm . (:face gnus-x-face :relief -2)) + \\='((pbm . (:face gnus-x-face :relief -2)) (png . (:relief -2)))) See the manual for the valid properties for various image types. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 447bd5d56f2..6b90204beb6 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1656,7 +1656,7 @@ while still allowing them to affect operations done in other buffers. For example: \(setq gnus-newsgroup-variables - '(message-use-followup-to + \\='(message-use-followup-to (gnus-visible-headers . \"^From:\\\\|^Newsgroups:\\\\|^Subject:\\\\|^Date:\\\\|^To:\"))) ") diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index 54cf099e078..215eac88aef 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el @@ -1974,10 +1974,10 @@ to case differences." (string-equal (downcase str1) (downcase prefix)) (string-equal str1 prefix)))))) -(if (fboundp 'format-message) - (defalias 'gnus-format-message 'format-message) - ;; for Emacs < 25, and XEmacs, don't worry about quote translation. - (defalias 'gnus-format-message 'format)) +(defalias 'gnus-format-message + (if (fboundp 'format-message) 'format-message + ;; for Emacs < 25, and XEmacs, don't worry about quote translation. + 'format)) ;; Simple check: can be a macro but this way, although slow, it's really clear. ;; We don't use `bound-and-true-p' because it's not in XEmacs. diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index 31344382029..a6e75b739dd 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -151,15 +151,15 @@ maximum in the reminder is not that painful, I think. Although this scheme might appear somewhat weird at a first glance, it is very powerful. In order to make this clear, here are some examples: -- '(0 . day): this is the default value of `nndiary-reminders'. It means +- (0 . day): this is the default value of `nndiary-reminders'. It means pop up the appointments of the day each morning at 00:00. -- '(1 . day): this means pop up the appointments the day before, at 00:00. +- (1 . day): this means pop up the appointments the day before, at 00:00. -- '(6 . hour): for an appointment at 18:30, this would pop up the +- (6 . hour): for an appointment at 18:30, this would pop up the appointment message at 12:00. -- '(360 . minute): for an appointment at 18:30 and 15 seconds, this would +- (360 . minute): for an appointment at 18:30 and 15 seconds, this would pop up the appointment message at 12:30." :group 'nndiary :type '(repeat (cons :format "%v\n" diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 2292849ccb1..681116017ba 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -217,7 +217,7 @@ will try to match against both the From and the To header. Example: \(setq nnmail-fancy-expiry-targets - '((to-from \"boss\" \"nnfolder:Work\") + \\='((to-from \"boss\" \"nnfolder:Work\") (\"Subject\" \"IMPORTANT\" \"nnfolder:IMPORTANT.%Y.%b\") (\"from\" \".*\" \"nnfolder:Archive-%Y\"))) @@ -465,7 +465,7 @@ GROUP: Mail will be stored in GROUP (a string). junk: Mail will be deleted. Use with care! Do not submerge in water! Example: (setq nnmail-split-fancy - '(| (\"Subject\" \"MAKE MONEY FAST\" junk) + \\='(| (\"Subject\" \"MAKE MONEY FAST\" junk) ...other.rules.omitted...)) FIELD must match a complete field name. VALUE must match a complete diff --git a/lisp/iimage.el b/lisp/iimage.el index 5852c9497d7..08808b1b4c4 100644 --- a/lisp/iimage.el +++ b/lisp/iimage.el @@ -71,7 +71,7 @@ NUM specifies which parenthesized expression in the regexp. Examples of image filename patterns to match: file://foo.png - `file://foo.png' + \\=`file://foo.png\\=' \\[\\[foo.gif]] <foo.png> foo.JPG diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 9e5a4501357..7caa5d4b30c 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -244,17 +244,17 @@ The functions come in the following groups. (defun deprefixify-iso8859-2-region (start end) (interactive \"*r\") (ogonek-deprefixify-region start end ?/ \"iso8859-2\")) - (global-set-key \"\\C-cd\" 'deprefixify-iso8859-2-region) ; ctrl-c d + (global-set-key \"\\C-cd\" \\='deprefixify-iso8859-2-region) ; ctrl-c d (defun mazovia-to-iso8859-2 (start end) (interactive \"*r\") (ogonek-recode-region start end \"mazovia\" \"iso8859-2\")) - (global-set-key \"\\C-cr\" 'mazovia-to-iso8859-2) ; ctrl-c r + (global-set-key \"\\C-cr\" \\='mazovia-to-iso8859-2) ; ctrl-c r (defun prefixify-iso8859-2-region (start end) (interactive \"*r\") (ogonek-prefixify-region start end \"iso8859-2\" ?/)) - (global-set-key \"\\C-cp\" 'prefixify-iso8859-2-region) ; ctrl-c p + (global-set-key \"\\C-cp\" \\='prefixify-iso8859-2-region) ; ctrl-c p Each recoding operation can be called off using the `undo' command.") diff --git a/lisp/kmacro.el b/lisp/kmacro.el index 9636a36b1e2..ddf3005bab5 100644 --- a/lisp/kmacro.el +++ b/lisp/kmacro.el @@ -941,7 +941,6 @@ without repeating the prefix." (defvar kmacro-step-edit-inserting) ;; inserting into macro (defvar kmacro-step-edit-appending) ;; append to end of macro (defvar kmacro-step-edit-replace) ;; replace orig macro when done -(defvar kmacro-step-edit-prefix-index) ;; index of first prefix arg key (defvar kmacro-step-edit-key-index) ;; index of current key (defvar kmacro-step-edit-action) ;; automatic action on next pre-command hook (defvar kmacro-step-edit-help) ;; kmacro step edit help enabled @@ -976,11 +975,6 @@ This keymap is an extension to the `query-replace-map', allowing the following additional answers: `insert', `insert-1', `replace', `replace-1', `append', `append-end', `act-repeat', `skip-end', `skip-keep'.") -(defvar kmacro-step-edit-prefix-commands - '(universal-argument universal-argument-more universal-argument-minus - digit-argument negative-argument) - "Commands which build up a prefix arg for the current command.") - (defun kmacro-step-edit-prompt (macro index) ;; Show step-edit prompt (let ((keys (and (not kmacro-step-edit-appending) @@ -1084,21 +1078,13 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', ;; Handle prefix arg, or query user (cond (act act) ;; set above - ((memq this-command kmacro-step-edit-prefix-commands) - (unless kmacro-step-edit-prefix-index - (setq kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) - (setq act 'universal-argument)) - ((eq this-command 'universal-argument-other-key) - (setq act 'universal-argument)) (t - (kmacro-step-edit-prompt macro (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (kmacro-step-edit-prompt macro kmacro-step-edit-key-index) (setq act (lookup-key kmacro-step-edit-map (vector (with-current-buffer (current-buffer) (read-event)))))))) ;; Resume macro execution and perform the action (cond - ((eq act 'universal-argument) - nil) ((cond ((eq act 'act) t) @@ -1110,7 +1096,6 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', (setq kmacro-step-edit-active 'ignore) nil) ((eq act 'skip) - (setq kmacro-step-edit-prefix-index nil) nil) ((eq act 'skip-keep) (setq this-command 'ignore) @@ -1123,12 +1108,11 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', (setq act t) t) ((member act '(insert-1 insert)) - (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) (setq kmacro-step-edit-inserting (if (eq act 'insert-1) 1 t)) nil) ((member act '(replace-1 replace)) (setq kmacro-step-edit-inserting (if (eq act 'replace-1) 1 t)) - (setq kmacro-step-edit-prefix-index nil) (if (= executing-kbd-macro-index (length executing-kbd-macro)) (setq executing-kbd-macro (vconcat executing-kbd-macro [nil]) kmacro-step-edit-appending t)) @@ -1148,19 +1132,19 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', (setq act t) t) ((eq act 'help) - (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) (setq kmacro-step-edit-help (not kmacro-step-edit-help)) nil) (t ;; Ignore unknown responses - (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) nil)) - (if (> executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index)) + (if (> executing-kbd-macro-index kmacro-step-edit-key-index) (setq kmacro-step-edit-new-macro (vconcat kmacro-step-edit-new-macro (substring executing-kbd-macro - (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) - (if (eq act t) nil executing-kbd-macro-index))) - kmacro-step-edit-prefix-index nil)) + kmacro-step-edit-key-index + (if (eq act t) nil + executing-kbd-macro-index))))) (if restore-index (setq executing-kbd-macro-index restore-index))) (t @@ -1175,12 +1159,10 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', (executing-kbd-macro nil) (defining-kbd-macro nil) cmd keys next-index) - (setq executing-kbd-macro-index (or kmacro-step-edit-prefix-index kmacro-step-edit-key-index) - kmacro-step-edit-prefix-index nil) + (setq executing-kbd-macro-index kmacro-step-edit-key-index) (kmacro-step-edit-prompt macro nil) ;; Now, we have read a key sequence from the macro, but we don't want ;; to execute it yet. So push it back and read another sequence. - (reset-this-command-lengths) (setq keys (read-key-sequence nil nil nil nil t)) (setq cmd (key-binding keys t nil)) (if (cond @@ -1201,25 +1183,12 @@ following additional answers: `insert', `insert-1', `replace', `replace-1', unread-command-events nil))) (setq cmd 'ignore) nil) - ((memq cmd kmacro-step-edit-prefix-commands) - (reset-this-command-lengths) - nil) - ((eq cmd 'universal-argument-other-key) - (setq kmacro-step-edit-action t) - (reset-this-command-lengths) - (if (numberp kmacro-step-edit-inserting) - (setq kmacro-step-edit-inserting nil)) - nil) ((numberp kmacro-step-edit-inserting) (setq kmacro-step-edit-inserting nil) nil) ((equal keys "\C-j") (setq kmacro-step-edit-inserting nil) (setq kmacro-step-edit-action nil) - ;; Forget any (partial) prefix arg from next command - (setq kmacro-step-edit-prefix-index nil) - (reset-this-command-lengths) - (setq overriding-terminal-local-map nil) (setq next-index kmacro-step-edit-key-index) t) (t nil)) @@ -1278,7 +1247,6 @@ To customize possible responses, change the \"bindings\" in `kmacro-step-edit-ma (kmacro-step-edit-inserting nil) (kmacro-step-edit-appending nil) (kmacro-step-edit-replace t) - (kmacro-step-edit-prefix-index nil) (kmacro-step-edit-key-index 0) (kmacro-step-edit-action nil) (kmacro-step-edit-help nil) diff --git a/lisp/msb.el b/lisp/msb.el index 03b29202efe..b717dcc8cd9 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -777,7 +777,7 @@ SORT-PREDICATE. Example: \(msb--aggregate-alist - '((a . a1) (a . a2) (b . b1) (c . c3) (a . a4) (a . a3) (b . b3) (b . b2)) + \\='((a . a1) (a . a2) (b . b1) (c . c3) (a . a4) (a . a3) (b . b3) (b . b2)) (function string=) (lambda (item1 item2) (string< (symbol-name item1) (symbol-name item2)))) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 8f7754137cb..a7efaf81dbc 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -377,7 +377,7 @@ Example: \(dbus-call-method-asynchronously :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\" - \"org.freedesktop.Hal.Device\" \"GetPropertyString\" 'message + \"org.freedesktop.Hal.Device\" \"GetPropertyString\" \\='message \"system.kernel.machine\") => \(:serial :system 2) @@ -654,7 +654,7 @@ Example: \(dbus-register-signal :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" - \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" 'my-signal-handler) + \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" \\='my-signal-handler) => \(\(:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\") \(\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler)) diff --git a/lisp/net/tls.el b/lisp/net/tls.el index 46891be38e6..544aec5cfda 100644 --- a/lisp/net/tls.el +++ b/lisp/net/tls.el @@ -174,11 +174,10 @@ Used by `tls-certificate-information'." :type 'string :group 'tls) -(eval-and-compile - (if (fboundp 'format-message) - (defalias 'tls-format-message 'format-message) +(defalias 'tls-format-message + (if (fboundp 'format-message) 'format-message ;; for Emacs < 25, and XEmacs, don't worry about quote translation. - (defalias 'tls-format-message 'format))) + 'format)) (defun tls-certificate-information (der) "Parse X.509 certificate in DER format into an assoc list." diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8cae8dc92b9..79b024e8310 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -288,7 +288,10 @@ The string is used in `tramp-methods'.") (add-to-list 'tramp-methods '("sudo" (tramp-login-program "sudo") - (tramp-login-args (("-u" "%u") ("-s") ("-H") ("-p" "Password:"))) + ;; The password template must be masked. Otherwise, it could be + ;; interpreted as password prompt if the remote host echoes the command. + (tramp-login-args (("-u" "%u") ("-s") ("-H") + ("-p" "P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":"))) ;; Local $SHELL could be a nasty one, like zsh or fish. Let's override it. (tramp-login-env (("SHELL") ("/bin/sh"))) (tramp-remote-shell "/bin/sh") @@ -4316,6 +4319,7 @@ with the encoded or decoded results, respectively.") ;; However, I don't know whether all base64 versions do supports ;; this option. (b64 "base64" "base64 -d") + (b64 "openssl enc -base64" "openssl enc -d -base64") (b64 "mimencode -b" "mimencode -u -b") (b64 "mmencode -b" "mmencode -u -b") (b64 "recode data..base64" "recode base64..data") diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index bf3e1c740de..6cec3c55bc9 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1750,7 +1750,7 @@ Example: (tramp-set-completion-function \"ssh\" - '((tramp-parse-sconfig \"/etc/ssh_config\") + \\='((tramp-parse-sconfig \"/etc/ssh_config\") (tramp-parse-sconfig \"~/.ssh/config\")))" (let ((r function-list) @@ -4258,6 +4258,16 @@ Invokes `password-read' if available, `read-passwd' else." ;;;###tramp-autoload (defun tramp-clear-passwd (vec) "Clear password cache for connection related to VEC." + (let ((hop (tramp-file-name-hop vec))) + (when hop + ;; Clear also the passwords of the hops. + (tramp-clear-passwd + (tramp-dissect-file-name + (concat + tramp-prefix-format + (tramp-compat-replace-regexp-in-string + (concat tramp-postfix-hop-regexp "$") + tramp-postfix-host-format hop)))))) (tramp-compat-funcall 'password-cache-remove (tramp-make-tramp-file-name diff --git a/lisp/obsolete/sregex.el b/lisp/obsolete/sregex.el index 0a15f50be28..de0b1d913ba 100644 --- a/lisp/obsolete/sregex.el +++ b/lisp/obsolete/sregex.el @@ -262,15 +262,15 @@ This is exactly like `sregexq' (q.v.) except that it evaluates all its arguments, so literal sregex clauses must be quoted. For example: - (sregex '(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\" + (sregex \\='(or \"Bob\" \"Robert\")) => \"Bob\\\\|Robert\" An argument-evaluating sregex interpreter lets you reuse sregex subexpressions: - (let ((dotstar '(0+ any)) - (whitespace '(1+ (syntax ?-))) - (digits '(1+ (char (?0 . ?9))))) - (sregex 'bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\"" + (let ((dotstar \\='(0+ any)) + (whitespace \\='(1+ (syntax ?-))) + (digits \\='(1+ (char (?0 . ?9))))) + (sregex \\='bol dotstar \":\" whitespace digits)) => \"^.*:\\\\s-+[0-9]+\"" (sregex--sequence exps nil)) (defmacro sregexq (&rest exps) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index a3c8b84bfca..3a87f6bedbd 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1990,8 +1990,8 @@ the lower-case version of all tags." "Alist of characters and custom functions for bulk actions. For example, this value makes those two functions available: - '((?R set-category) - (?C bulk-cut)) + ((?R set-category) + (?C bulk-cut)) With selected entries in an agenda buffer, `B R' will call the custom function `set-category' on the selected entries. @@ -4937,13 +4937,13 @@ the `regexp' or `notregexp' element. `todo' and `nottodo' accept as an argument a list of todo keywords, which may include \"*\" to match any todo keyword. - (org-agenda-skip-entry-if 'todo '(\"TODO\" \"WAITING\")) + (org-agenda-skip-entry-if \\='todo \\='(\"TODO\" \"WAITING\")) would skip all entries with \"TODO\" or \"WAITING\" keywords. Instead of a list, a keyword class may be given. For example: - (org-agenda-skip-entry-if 'nottodo 'done) + (org-agenda-skip-entry-if \\='nottodo \\='done) would skip entries that haven't been marked with any of \"DONE\" keywords. Possible classes are: `todo', `done', `any'. @@ -10005,10 +10005,10 @@ calling the function returns nil. This function takes one argument: an entry from `org-agenda-get-day-entries'. FILTER can also be an alist with the car of each cell being -either 'headline or 'category. For example: +either `headline' or `category'. For example: - '((headline \"IMPORTANT\") - (category \"Work\")) + ((headline \"IMPORTANT\") + (category \"Work\")) will only add headlines containing IMPORTANT or headlines belonging to the \"Work\" category. diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 4d9e79f54ea..ae0f4946832 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -197,7 +197,7 @@ Possible properties are: Example: (setq org-protocol-project-alist - '((\"http://orgmode.org/worg/\" + \\='((\"http://orgmode.org/worg/\" :online-suffix \".php\" :working-suffix \".org\" :base-url \"http://orgmode.org/worg/\" @@ -251,7 +251,7 @@ kill-client - If t, kill the client immediately, once the sub-protocol is Here is an example: (setq org-protocol-protocol-alist - '((\"my-protocol\" + \\='((\"my-protocol\" :protocol \"my-protocol\" :function my-protocol-handler-function) (\"your-protocol\" diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 144b58b9bc8..fc4f574a4c4 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -833,7 +833,7 @@ you can reuse them: For example: \(setq org-html-table-row-tags - (cons '(cond (top-row-p \"<tr class=\\\"tr-top\\\">\") + (cons \\='(cond (top-row-p \"<tr class=\\\"tr-top\\\">\") (bottom-row-p \"<tr class=\\\"tr-bottom\\\">\") (t (if (= (mod row-number 2) 1) \"<tr class=\\\"tr-odd\\\">\" diff --git a/lisp/outline.el b/lisp/outline.el index d9142c5a604..816cd9ae7c9 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -338,7 +338,7 @@ numbered and unnumbered sections), list them set by set and sorted by level within each set. For example in texinfo mode: (setq outline-heading-alist - '((\"@chapter\" . 2) (\"@section\" . 3) (\"@subsection\" . 4) + \\='((\"@chapter\" . 2) (\"@section\" . 3) (\"@subsection\" . 4) (\"@subsubsection\" . 5) (\"@unnumbered\" . 2) (\"@unnumberedsec\" . 3) (\"@unnumberedsubsec\" . 4) (\"@unnumberedsubsubsec\" . 5) diff --git a/lisp/printing.el b/lisp/printing.el index 8ad56f413e2..ae0f3fdbc67 100644 --- a/lisp/printing.el +++ b/lisp/printing.el @@ -1746,14 +1746,14 @@ Examples: * On GNU or Unix system: - '((unix \".\" \"~/bin\" ghostview mpage PATH) + ((unix \".\" \"~/bin\" ghostview mpage PATH) (ghostview \"$HOME/bin/gsview-dir\") (mpage \"$HOME/bin/mpage-dir\") ) * On Windows system: - '((windows \"c:/applications/executables\" PATH ghostview mpage) + ((windows \"c:/applications/executables\" PATH ghostview mpage) (ghostview \"c:/gs/gsview-dir\") (mpage \"c:/mpage-dir\") )" @@ -1810,8 +1810,8 @@ Where: SYMBOL It's a symbol to identify a text printer. It's for setting option `pr-txt-name' and for menu selection. Examples: - 'prt_06a - 'my_printer + prt_06a + my_printer COMMAND Name of the program for printing a text file. On MS-DOS and MS-Windows systems, if the value is an empty string, then Emacs @@ -1838,7 +1838,7 @@ SWITCHES List of sexp's to pass as extra options for text printer instead of including an explicit switch on this list. Example: . for lpr - '(\"-#3\" \"-l\") + (\"-#3\" \"-l\") nil NAME A string that specifies a text printer name. @@ -1869,13 +1869,13 @@ Examples: * On GNU or Unix system: - '((prt_06a \"lpr\" nil \"prt_06a\") + ((prt_06a \"lpr\" nil \"prt_06a\") (prt_07c nil nil \"prt_07c\") ) * On Windows system: - '((prt_06a \"print\" nil \"/D:\\\\\\\\printers\\\\prt_06a\") + ((prt_06a \"print\" nil \"/D:\\\\\\\\printers\\\\prt_06a\") (prt_07c nil nil \"/D:\\\\\\\\printers\\\\prt_07c\") (PRN \"\" nil \"PRN\") (standard \"redpr.exe\" nil \"\") @@ -1961,8 +1961,8 @@ Where: SYMBOL It's a symbol to identify a PostScript printer. It's for setting option `pr-ps-name' and for menu selection. Examples: - 'prt_06a - 'my_printer + prt_06a + my_printer COMMAND Name of the program for printing a PostScript file. On MS-DOS and MS-Windows systems, if the value is an empty string then @@ -1991,11 +1991,11 @@ SWITCHES List of sexp's to pass as extra options for PostScript printer instead of including an explicit switch on this list. Example: . for lpr - '(\"-#3\" \"-l\") + (\"-#3\" \"-l\") nil . for gsprint.exe - '(\"-all\" \"-twoup\") + (\"-all\" \"-twoup\") PRINTER-SWITCH A string that specifies PostScript printer name switch. If it's necessary to have a space between PRINTER-SWITCH and NAME, @@ -2057,9 +2057,9 @@ DEFAULT It's a way to set default values when this entry is selected. which the current setting inherits the context. Take care with circular inheritance. Examples: - '(ps-landscape-mode . nil) - '(ps-spool-duplex . t) - '(pr-gs-device . (my-gs-device t)) + (ps-landscape-mode . nil) + (ps-spool-duplex . t) + (pr-gs-device . (my-gs-device t)) This variable should be modified by customization engine. If this variable is modified by other means (for example, a lisp function), use `pr-update-menus' @@ -2069,14 +2069,14 @@ Examples: * On GNU or Unix system: - '((lps_06b \"lpr\" nil \"-P\" \"lps_06b\") + ((lps_06b \"lpr\" nil \"-P\" \"lps_06b\") (lps_07c \"lpr\" nil nil \"lps_07c\") (lps_08c nil nil nil \"lps_08c\") ) * On Windows system: - '((lps_06a \"print\" nil \"/D:\" \"\\\\\\\\printers\\\\lps_06a\") + ((lps_06a \"print\" nil \"/D:\" \"\\\\\\\\printers\\\\lps_06a\") (lps_06b \"print\" nil nil \"\\\\\\\\printers\\\\lps_06b\") (lps_07c \"print\" nil \"\" \"/D:\\\\\\\\printers\\\\lps_07c\") (lps_08c nil nil nil \"\\\\\\\\printers\\\\lps_08c\") @@ -2102,7 +2102,7 @@ Also the gsprint utility comes together with gsview distribution. As an example of gsprint declaration: (setq pr-ps-printer-alist - '((A \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"lps_015\") + \\='((A \"gsprint\" (\"-all\" \"-twoup\") \"-printer \" \"lps_015\") (B \"gsprint\" (\"-all\" \"-twoup\") nil \"-printer lps_015\") ;; some other printer declaration )) @@ -2594,9 +2594,9 @@ DEFAULT It's a way to set default values when this entry is selected. which the current setting inherits the context. Take care with circular inheritance. Examples: - '(ps-landscape-mode . nil) - '(ps-spool-duplex . t) - '(pr-gs-device . (my-gs-device t))" + (ps-landscape-mode . nil) + (ps-spool-duplex . t) + (pr-gs-device . (my-gs-device t))" :type '(repeat (list :tag "" @@ -2690,8 +2690,8 @@ Where: SYMBOL It's a symbol to identify a PostScript utility. It's for `pr-ps-utility' variable setting and for menu selection. Examples: - 'mpage - 'psnup + mpage + psnup UTILITY Name of utility for processing a PostScript file. See also `pr-path-alist'. @@ -2708,7 +2708,7 @@ MUST-SWITCHES List of sexp's to pass as options to the PostScript utility program and must be placed before any other switches. Example: . for psnup: - '(\"-q\") + (\"-q\") PAPERSIZE It's a format string to specify paper size switch. Example: @@ -2752,7 +2752,7 @@ SWITCHES List of sexp's to pass as extra options to the PostScript utility program. Example: . for psnup - '(\"-q\") + (\"-q\") nil DEFAULT It's a way to set default values when this entry is selected. @@ -2772,9 +2772,9 @@ DEFAULT It's a way to set default values when this entry is selected. which the current setting inherits the context. Take care with circular inheritance. Examples: - '(pr-file-landscape . nil) - '(pr-file-duplex . t) - '(pr-gs-device . (my-gs-device t)) + (pr-file-landscape . nil) + (pr-file-duplex . t) + (pr-gs-device . (my-gs-device t)) This variable should be modified by customization engine. If this variable is modified by other means (for example, a lisp function), use `pr-update-menus' @@ -2787,14 +2787,14 @@ Examples: * On GNU or Unix system: - '((mpage \"mpage\" nil \"-b%s\" \"-%d\" \"-l\" \"-t\" \"-T\" \">\" nil) + ((mpage \"mpage\" nil \"-b%s\" \"-%d\" \"-l\" \"-t\" \"-T\" \">\" nil) (psnup \"psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" nil (pr-file-duplex . nil) (pr-file-tumble . nil)) ) * On Windows system: - '((psnup \"c:/psutils/psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" + ((psnup \"c:/psutils/psnup\" (\"-q\") \"-P%s\" \"-%d\" \"-l\" nil nil \" \" nil (pr-file-duplex . nil) (pr-file-tumble . nil)) ) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 611ba84e25b..d38a7cd7706 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -171,7 +171,7 @@ is the symbol being selected. Example value: - '((\"Emacs Lisp\" Info-goto-emacs-command-node obarray) + ((\"Emacs Lisp\" Info-goto-emacs-command-node obarray) (\"Common Lisp\" common-lisp-hyperspec common-lisp-hyperspec-obarray) (\"SCWM\" scwm-documentation scwm-obarray))" :group 'etags diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index fb4d445b595..845abc09842 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -323,13 +323,13 @@ Hideshow puts a unique overlay on each range of text to be hidden in the buffer. Here is a simple example of how to use this variable: (defun display-code-line-counts (ov) - (when (eq 'code (overlay-get ov 'hs)) - (overlay-put ov 'display + (when (eq \\='code (overlay-get ov \\='hs)) + (overlay-put ov \\='display (format \"... / %d\" (count-lines (overlay-start ov) (overlay-end ov)))))) - (setq hs-set-up-overlay 'display-code-line-counts) + (setq hs-set-up-overlay \\='display-code-line-counts) This example shows how to get information from the overlay as well as how to set its `display' property. See `hs-make-overlay' and diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 18299c7f116..daf919adb2f 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -1571,11 +1571,11 @@ Otherwise, if SELECT is non-nil then only an action is created. Some examples: No spaces before and 1 after a comma - (idlwave-action-and-binding \",\" '(idlwave-surround 0 1)) + (idlwave-action-and-binding \",\" \\='(idlwave-surround 0 1)) A minimum of 1 space before and after `=' (see `idlwave-expand-equal'). - (idlwave-action-and-binding \"=\" '(idlwave-expand-equal -1 -1)) + (idlwave-action-and-binding \"=\" \\='(idlwave-expand-equal -1 -1)) Capitalize system variables - action only - (idlwave-action-and-binding idlwave-sysvar '(capitalize-word 1) t)" + (idlwave-action-and-binding idlwave-sysvar \\='(capitalize-word 1) t)" (if (not (equal select 'noaction)) ;; Add action (let* ((table (if select 'idlwave-indent-action-table diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 18f445ca5cf..f46c8a99b67 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2609,8 +2609,8 @@ of the current highlighting list. For example: - (sql-add-product-keywords 'ms - '((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face))) + (sql-add-product-keywords \\='ms + \\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face))) adds a fontification pattern to fontify identifiers ending in `_t' as data types." diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 76d85c68c99..caae746779e 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -12794,7 +12794,7 @@ Constant signals: is put into the AUTOSENSE list and is not desired, use the AUTO_CONSTANT declaration anywhere in the module (parenthesis are required): - /* AUTO_CONSTANT ( `this_is_really_constant_dont_autosense_it ) */ + /* AUTO_CONSTANT ( \\=`this_is_really_constant_dont_autosense_it ) */ Better yet, use a parameter, which will be understood to be constant automatically. @@ -12810,16 +12810,16 @@ OOps! An example: always @ (/*AS*/) begin - /* AUTO_CONSTANT (`constant) */ - outin = ina | inb | `constant; + /* AUTO_CONSTANT (\\=`constant) */ + outin = ina | inb | \\=`constant; out = outin; end Typing \\[verilog-auto] will make this into: always @ (/*AS*/ina or inb) begin - /* AUTO_CONSTANT (`constant) */ - outin = ina | inb | `constant; + /* AUTO_CONSTANT (\\=`constant) */ + outin = ina | inb | \\=`constant; out = outin; end @@ -12827,7 +12827,7 @@ Note in Verilog 2001, you can often get the same result from the new @* operator. (This was added to the language in part due to AUTOSENSE!) always @* begin - outin = ina | inb | `constant; + outin = ina | inb | \\=`constant; out = outin; end" (save-excursion diff --git a/lisp/ps-print.el b/lisp/ps-print.el index faafe9ce87f..218a02a7f6d 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -1953,7 +1953,7 @@ If you set option `ps-selected-pages', first the pages are filtered by option `ps-selected-pages' and then by `ps-even-or-odd-pages'. For example, if we have: - (setq ps-selected-pages '(1 4 (6 . 10) (12 . 16) 20)) + (setq ps-selected-pages \\='(1 4 (6 . 10) (12 . 16) 20)) Combining with `ps-even-or-odd-pages' and option `ps-n-up-printing', we have: @@ -2249,9 +2249,9 @@ X, Y, XSCALE, YSCALE and ROTATION may be a floating point number, an integer number or a string. If it is a string, the string should contain PostScript programming that returns a float or integer value. -For example, if you wish to print an EPS image on all pages do: +For example, if you wish to print an EPS image on all pages use: - '((\"~/images/EPS-image.ps\"))" + ((\"~/images/EPS-image.ps\"))" :type '(repeat (list (file :tag "EPS File") @@ -2300,9 +2300,9 @@ X, Y, FONTSIZE, GRAY and ROTATION may be a floating point number, an integer number or a string. If it is a string, the string should contain PostScript programming that returns a float or integer value. -For example, if you wish to print text \"Preliminary\" on all pages do: +For example, if you wish to print text \"Preliminary\" on all pages use: - '((\"Preliminary\"))" + ((\"Preliminary\"))" :type '(repeat (list (string :tag "Text") diff --git a/lisp/server.el b/lisp/server.el index 57c16af0cd5..b16a06e79f0 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1649,7 +1649,7 @@ only these files will be asked to be saved." "Contact the Emacs server named SERVER and evaluate FORM there. Returns the result of the evaluation, or signals an error if it cannot contact the specified server. For example: - (server-eval-at \"server\" '(emacs-pid)) + (server-eval-at \"server\" \\='(emacs-pid)) returns the process ID of the Emacs instance running \"server\"." (let* ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)) (server-file (expand-file-name server server-dir)) diff --git a/lisp/ses.el b/lisp/ses.el index 0bc43ec8b58..ec1359bbbcb 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -1491,11 +1491,11 @@ by (ROWINCR,COLINCR)." "Produce a copy of FORMULA where all symbols that refer to cells in row STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR and COLINCR. STARTROW and STARTCOL are 0-based. Example: - (ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1) + (ses-relocate-formula \\='(+ A1 B2 D3) 1 2 1 -1) => (+ A1 B2 C4) If ROWINCR or COLINCR is negative, references to cells being deleted are removed. Example: - (ses-relocate-formula '(+ A1 B2 D3) 0 1 0 -1) + (ses-relocate-formula \\='(+ A1 B2 D3) 0 1 0 -1) => (+ A1 C3) Sets `ses-relocate-return' to 'delete if cell-references were removed." (let (rowcol result) diff --git a/lisp/simple.el b/lisp/simple.el index 6f76d755292..b8d4e741775 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1711,9 +1711,13 @@ The argument SPECIAL, if non-nil, means that this command is executing a special event, so ignore the prefix argument and don't clear it." (setq debug-on-next-call nil) (let ((prefixarg (unless special + ;; FIXME: This should probably be done around + ;; pre-command-hook rather than here! (prog1 prefix-arg (setq current-prefix-arg prefix-arg) - (setq prefix-arg nil))))) + (setq prefix-arg nil) + (when current-prefix-arg + (prefix-command-update)))))) (if (and (symbolp cmd) (get cmd 'disabled) disabled-command-function) @@ -3626,6 +3630,73 @@ see other processes running on the system, use `list-system-processes'." (display-buffer buffer) nil) +;;;; Prefix commands + +(setq prefix-command--needs-update nil) +(setq prefix-command--last-echo nil) + +(defun internal-echo-keystrokes-prefix () + ;; BEWARE: Called directly from the C code. + (if (not prefix-command--needs-update) + prefix-command--last-echo + (setq prefix-command--last-echo + (let ((strs nil)) + (run-hook-wrapped 'prefix-command-echo-keystrokes-functions + (lambda (fun) (push (funcall fun) strs))) + (setq strs (delq nil strs)) + (when strs (mapconcat #'identity strs " ")))))) + +(defvar prefix-command-echo-keystrokes-functions nil + "Abnormal hook which constructs the description of the current prefix state. +Each function is called with no argument, should return a string or nil.") + +(defun prefix-command-update () + "Update state of prefix commands. +Call it whenever you change the \"prefix command state\"." + (setq prefix-command--needs-update t)) + +(defvar prefix-command-preserve-state-hook nil + "Normal hook run when a command needs to preserve the prefix.") + +(defun prefix-command-preserve-state () + "Pass the current prefix command state to the next command. +Should be called by all prefix commands. +Runs `prefix-command-preserve-state-hook'." + (run-hooks 'prefix-command-preserve-state-hook) + ;; If the current command is a prefix command, we don't want the next (real) + ;; command to have `last-command' set to, say, `universal-argument'. + (setq this-command last-command) + (setq real-this-command real-last-command) + (prefix-command-update)) + +(defun reset-this-command-lengths () + (declare (obsolete prefix-command-preserve-state "25.1")) + nil) + +;;;;; The main prefix command. + +;; FIXME: Declaration of `prefix-arg' should be moved here!? + +(add-hook 'prefix-command-echo-keystrokes-functions + #'universal-argument--description) +(defun universal-argument--description () + (when prefix-arg + (concat "C-u" + (pcase prefix-arg + (`(-) " -") + (`(,(and (pred integerp) n)) + (let ((str "")) + (while (and (> n 4) (= (mod n 4) 0)) + (setq str (concat str " C-u")) + (setq n (/ n 4))) + (if (= n 4) str (format " %s" prefix-arg)))) + (_ (format " %s" prefix-arg)))))) + +(add-hook 'prefix-command-preserve-state-hook + #'universal-argument--preserve) +(defun universal-argument--preserve () + (setq prefix-arg current-prefix-arg)) + (defvar universal-argument-map (let ((map (make-sparse-keymap)) (universal-argument-minus @@ -3664,7 +3735,8 @@ see other processes running on the system, use `list-system-processes'." "Keymap used while processing \\[universal-argument].") (defun universal-argument--mode () - (set-transient-map universal-argument-map)) + (prefix-command-update) + (set-transient-map universal-argument-map nil)) (defun universal-argument () "Begin a numeric argument for the following command. @@ -3677,6 +3749,7 @@ For some commands, just \\[universal-argument] by itself serves as a flag which is different in effect from any particular numeric argument. These commands include \\[set-mark-command] and \\[start-kbd-macro]." (interactive) + (prefix-command-preserve-state) (setq prefix-arg (list 4)) (universal-argument--mode)) @@ -3684,6 +3757,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." ;; A subsequent C-u means to multiply the factor by 4 if we've typed ;; nothing but C-u's; otherwise it means to terminate the prefix arg. (interactive "P") + (prefix-command-preserve-state) (setq prefix-arg (if (consp arg) (list (* 4 (car arg))) (if (eq arg '-) @@ -3695,6 +3769,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." "Begin a negative numeric argument for the next command. \\[universal-argument] following digits or minus sign ends the argument." (interactive "P") + (prefix-command-preserve-state) (setq prefix-arg (cond ((integerp arg) (- arg)) ((eq arg '-) nil) (t '-))) @@ -3704,6 +3779,7 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]." "Part of the numeric argument for the next command. \\[universal-argument] following digits or minus sign ends the argument." (interactive "P") + (prefix-command-preserve-state) (let* ((char (if (integerp last-command-event) last-command-event (get last-command-event 'ascii-character))) diff --git a/lisp/startup.el b/lisp/startup.el index 8c63ed263c2..b5e258f56c0 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -803,6 +803,15 @@ to prepare for opening the first frame (e.g. open a connection to an X server)." (defvar server-name) (defvar server-process) +(defun startup--setup-quote-display () + "If curved quotes don't work, display ASCII approximations." + (dolist (char-repl '((?‘ . ?\`) (?’ . ?\') (?“ . ?\") (?” . ?\"))) + (when (not (char-displayable-p (car char-repl))) + (unless standard-display-table + (setq standard-display-table (make-display-table))) + (aset standard-display-table (car char-repl) + (vector (make-glyph-code (cdr char-repl) 'shadow)))))) + (defun command-line () "A subroutine of `normal-top-level'. Amongst another things, it parses the command-line arguments." @@ -1017,13 +1026,9 @@ please check its value") '("no" "off" "false" "0"))))) (setq no-blinking-cursor t)) - ;; If curved quotes don't work, display ASCII approximations. - (dolist (char-repl '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) - (when (not (char-displayable-p (car char-repl))) - (or standard-display-table - (setq standard-display-table (make-display-table))) - (aset standard-display-table (car char-repl) (cdr char-repl)))) - (setq internal--text-quoting-flag t) + (unless noninteractive + (startup--setup-quote-display) + (setq internal--text-quoting-flag t)) ;; Re-evaluate predefined variables whose initial value depends on ;; the runtime context. diff --git a/lisp/term/w32console.el b/lisp/term/w32console.el index 2df137839d0..58856858502 100644 --- a/lisp/term/w32console.el +++ b/lisp/term/w32console.el @@ -68,12 +68,7 @@ (if oem-o-cs-p oem-code-page-output-coding oem-code-page-coding)) ;; Since we changed the terminal encoding, we need to repeat ;; the test for Unicode quotes being displayable. - (dolist (char-repl - '((?‘ . [?\`]) (?’ . [?\']) (?“ . [?\"]) (?” . [?\"]))) - (when (not (char-displayable-p (car char-repl))) - (or standard-display-table - (setq standard-display-table (make-display-table))) - (aset standard-display-table (car char-repl) (cdr char-repl)))))) + (startup--setup-quote-display))) (let* ((colors w32-tty-standard-colors) (color (car colors))) (tty-color-clear) diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el index 93b31d5c86c..9c50eca6419 100644 --- a/lisp/textmodes/table.el +++ b/lisp/textmodes/table.el @@ -3349,17 +3349,17 @@ Example: (progn (table-insert 16 3 5 1) (table-forward-cell 15) - (table-insert-sequence \"D0\" -16 1 1 'center) + (table-insert-sequence \"D0\" -16 1 1 \\='center) (table-forward-cell 16) - (table-insert-sequence \"A[0]\" -16 1 1 'center) + (table-insert-sequence \"A[0]\" -16 1 1 \\='center) (table-forward-cell 1) - (table-insert-sequence \"-\" 16 0 1 'center)) + (table-insert-sequence \"-\" 16 0 1 \\='center)) (progn (table-insert 16 8 5 1) - (table-insert-sequence \"@\" 0 1 2 'right) + (table-insert-sequence \"@\" 0 1 2 \\='right) (table-forward-cell 1) - (table-insert-sequence \"64\" 0 1 2 'left))" + (table-insert-sequence \"64\" 0 1 2 \\='left))" (interactive (progn (barf-if-buffer-read-only) diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el index 4e385a0fbd3..c94e417a7ea 100644 --- a/lisp/textmodes/tildify.el +++ b/lisp/textmodes/tildify.el @@ -291,8 +291,8 @@ BEG argument is ignored. This function is meant to be used to set `tildify-foreach-region-function' variable. For example, for an XML file one might use: (setq-local tildify-foreach-region-function - (apply-partially 'tildify-foreach-ignore-environments - '((\"<! *--\" . \"-- *>\") (\"<\" . \">\"))))" + (apply-partially \\='tildify-foreach-ignore-environments + \\='((\"<! *--\" . \"-- *>\") (\"<\" . \">\"))))" (let ((beg-re (concat "\\(?:" (mapconcat 'car pairs "\\)\\|\\(?:") "\\)")) p end-re) (save-excursion diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 9522328cae8..50c6d96e911 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -248,26 +248,30 @@ matching the resulting Git log output, and KEYWORDS is a list of (vc-git--state-code diff-letter))) (if (vc-git--empty-db-p) 'added 'up-to-date)))) -(defun vc-git-working-revision (file) +(defun vc-git-working-revision (_file) "Git-specific version of `vc-working-revision'." - (let* (process-file-side-effects - (str (vc-git--run-command-string nil "symbolic-ref" "HEAD"))) - (vc-file-setprop file 'vc-git-detached (null str)) - (if str - (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) - (match-string 2 str) - str) - (vc-git--rev-parse "HEAD")))) + (let (process-file-side-effects) + (vc-git--rev-parse "HEAD"))) + +(defun vc-git--symbolic-ref (file) + (or + (vc-file-getprop file 'vc-git-symbolic-ref) + (let* (process-file-side-effects + (str (vc-git--run-command-string nil "symbolic-ref" "HEAD"))) + (vc-file-setprop file 'vc-git-symbolic-ref + (if str + (if (string-match "^\\(refs/heads/\\)?\\(.+\\)$" str) + (match-string 2 str) + str)))))) (defun vc-git-mode-line-string (file) "Return a string for `vc-mode-line' to put in the mode line for FILE." (let* ((rev (vc-working-revision file)) - (detached (vc-file-getprop file 'vc-git-detached)) + (disp-rev (or (vc-git--symbolic-ref file) + (substring rev 0 7))) (def-ml (vc-default-mode-line-string 'Git file)) (help-echo (get-text-property 0 'help-echo def-ml))) - (propertize (if detached - (substring def-ml 0 (- 7 (length rev))) - def-ml) + (propertize (replace-regexp-in-string (concat rev "\\'") disp-rev def-ml t t) 'help-echo (concat help-echo "\nCurrent revision: " rev)))) (cl-defstruct (vc-git-extra-fileinfo diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index bae991936b5..e674f0e4d4e 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -790,8 +790,9 @@ current, and kill the buffer that visits the link." (defun vc-default-find-file-hook (_backend) nil) -(defun vc-find-file-hook () - "Function for `find-file-hook' activating VC mode if appropriate." +(defun vc-refresh-state () + "Activate or deactivate VC mode as appropriate." + (interactive) ;; Recompute whether file is version controlled, ;; if user has killed the buffer and revisited. (when vc-mode @@ -838,18 +839,19 @@ current, and kill the buffer that visits the link." (vc-follow-link) (message "Followed link to %s" buffer-file-name) - (vc-find-file-hook)) + (vc-refresh-state)) (t (if (yes-or-no-p (format "Symbolic link to %s-controlled source file; follow link? " link-type)) (progn (vc-follow-link) (message "Followed link to %s" buffer-file-name) - (vc-find-file-hook)) + (vc-refresh-state)) (message "Warning: editing through the link bypasses version control") ))))))))) -(add-hook 'find-file-hook 'vc-find-file-hook) +(add-hook 'find-file-hook #'vc-refresh-state) +(define-obsolete-function-alias 'vc-find-file-hook 'vc-refresh-state "25.1") (defun vc-kill-buffer-hook () "Discard VC info about a file when we kill its buffer." diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 0c8f4af58e1..b64de4759d7 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -3477,10 +3477,10 @@ themselves. A list, for example, is defined as either nil, or a cons cell whose cdr itself is a list. The obvious way to translate this into a widget type would be - (define-widget 'my-list 'choice + (define-widget \\='my-list \\='choice \"A list of sexps.\" :tag \"Sexp list\" - :args '((const nil) (cons :value (nil) sexp my-list))) + :args \\='((const nil) (cons :value (nil) sexp my-list))) Here we attempt to define my-list as a choice of either the constant nil, or a cons-cell containing a sexp and my-lisp. This will not work @@ -3489,10 +3489,10 @@ because the `choice' widget does not allow recursion. Using the `lazy' widget you can overcome this problem, as in this example: - (define-widget 'sexp-list 'lazy + (define-widget \\='sexp-list \\='lazy \"A list of sexps.\" :tag \"Sexp list\" - :type '(choice (const nil) (cons :value (nil) sexp sexp-list)))" + :type \\='(choice (const nil) (cons :value (nil) sexp sexp-list)))" :format "%{%t%}: %v" ;; We don't convert :type because we want to allow recursive ;; data structures. This is slow, so we should not create speed |