diff options
| author | Michael Heerdegen | 2018-10-27 01:48:35 +0200 |
|---|---|---|
| committer | Michael Heerdegen | 2018-10-30 16:17:45 +0100 |
| commit | 049bd5d267bc0d66cc0ba3b70c8773fed95694da (patch) | |
| tree | 80978595066509f385dab41664e7eb319e2330b0 | |
| parent | 607cc2901bab0be64d08aff0394a4676a81da40b (diff) | |
| download | emacs-049bd5d267bc0d66cc0ba3b70c8773fed95694da.tar.gz emacs-049bd5d267bc0d66cc0ba3b70c8773fed95694da.zip | |
Don't quote self-quoting pcase patterns
* admin/bzrmerge.el:
* lisp/char-fold.el:
* lisp/dired.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/easy-mmode.el:
* lisp/emacs-lisp/easymenu.el:
* lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/smie.el:
* lisp/faces.el:
* lisp/filesets.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/perl-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/server.el:
* lisp/subr.el:
* lisp/textmodes/css-mode.el:
* test/lisp/emacs-lisp/pcase-tests.el: Don't quote self-quoting
'pcase' patterns.
| -rw-r--r-- | admin/bzrmerge.el | 6 | ||||
| -rw-r--r-- | lisp/char-fold.el | 2 | ||||
| -rw-r--r-- | lisp/dired.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 8 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 62 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easymenu.el | 28 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-core.el | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 22 | ||||
| -rw-r--r-- | lisp/emacs-lisp/smie.el | 4 | ||||
| -rw-r--r-- | lisp/faces.el | 22 | ||||
| -rw-r--r-- | lisp/filesets.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/modula2.el | 22 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 36 | ||||
| -rw-r--r-- | lisp/progmodes/opascal.el | 14 | ||||
| -rw-r--r-- | lisp/progmodes/perl-mode.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/prolog.el | 14 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 18 | ||||
| -rw-r--r-- | lisp/progmodes/sh-script.el | 18 | ||||
| -rw-r--r-- | lisp/server.el | 32 | ||||
| -rw-r--r-- | lisp/subr.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/css-mode.el | 2 | ||||
| -rw-r--r-- | test/lisp/emacs-lisp/pcase-tests.el | 2 |
22 files changed, 167 insertions, 167 deletions
diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el index cedb625fb0d..d54ba330f96 100644 --- a/admin/bzrmerge.el +++ b/admin/bzrmerge.el | |||
| @@ -150,12 +150,12 @@ Type `y' to skip this revision, | |||
| 150 | (format "%s: Skip (y/n/N/q/%s)? " str | 150 | (format "%s: Skip (y/n/N/q/%s)? " str |
| 151 | (key-description (vector help-char))) | 151 | (key-description (vector help-char))) |
| 152 | '(?y ?n ?N ?q))) | 152 | '(?y ?n ?N ?q))) |
| 153 | (`?y (setq skip t)) | 153 | (?y (setq skip t)) |
| 154 | (`?q (keyboard-quit)) | 154 | (?q (keyboard-quit)) |
| 155 | ;; A single log entry can match skip-regexp multiple | 155 | ;; A single log entry can match skip-regexp multiple |
| 156 | ;; times. If you are sure you don't want to skip it, | 156 | ;; times. If you are sure you don't want to skip it, |
| 157 | ;; you don't want to be asked multiple times. | 157 | ;; you don't want to be asked multiple times. |
| 158 | (`?N (setq skip 'no)))))) | 158 | (?N (setq skip 'no)))))) |
| 159 | (if (eq skip t) | 159 | (if (eq skip t) |
| 160 | (push revno skipped) | 160 | (push revno skipped) |
| 161 | (push revno revnos))))) | 161 | (push revno revnos))))) |
diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 86bd6038e36..907d49e4f2e 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el | |||
| @@ -170,7 +170,7 @@ from which to start." | |||
| 170 | ;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)". | 170 | ;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)". |
| 171 | (while (< i end) | 171 | (while (< i end) |
| 172 | (pcase (aref string i) | 172 | (pcase (aref string i) |
| 173 | (`?\s (setq spaces (1+ spaces))) | 173 | (?\s (setq spaces (1+ spaces))) |
| 174 | (c (when (> spaces 0) | 174 | (c (when (> spaces 0) |
| 175 | (push (char-fold--make-space-string spaces) out) | 175 | (push (char-fold--make-space-string spaces) out) |
| 176 | (setq spaces 0)) | 176 | (setq spaces 0)) |
diff --git a/lisp/dired.el b/lisp/dired.el index 5c7bb9599c5..f2f2b76eb77 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3046,10 +3046,10 @@ TRASH non-nil means to trash the file instead of deleting, provided | |||
| 3046 | ("no" ?n "skip to next") | 3046 | ("no" ?n "skip to next") |
| 3047 | ("all" ?! "delete all remaining directories with no more questions") | 3047 | ("all" ?! "delete all remaining directories with no more questions") |
| 3048 | ("quit" ?q "exit"))) | 3048 | ("quit" ?q "exit"))) |
| 3049 | ('"all" (setq recursive 'always dired-recursive-deletes recursive)) | 3049 | ("all" (setq recursive 'always dired-recursive-deletes recursive)) |
| 3050 | ('"yes" (if (eq recursive 'top) (setq recursive 'always))) | 3050 | ("yes" (if (eq recursive 'top) (setq recursive 'always))) |
| 3051 | ('"no" (setq recursive nil)) | 3051 | ("no" (setq recursive nil)) |
| 3052 | ('"quit" (keyboard-quit)) | 3052 | ("quit" (keyboard-quit)) |
| 3053 | (_ (keyboard-quit))))) ; catch all unknown answers | 3053 | (_ (keyboard-quit))))) ; catch all unknown answers |
| 3054 | (setq recursive nil)) ; Empty dir or recursive is nil. | 3054 | (setq recursive nil)) ; Empty dir or recursive is nil. |
| 3055 | (delete-directory file recursive trash)))) | 3055 | (delete-directory file recursive trash)))) |
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 6b47ffea07a..483d6fbfa4a 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el | |||
| @@ -193,10 +193,10 @@ See Info node `(elisp)Derived Modes' for more details." | |||
| 193 | ;; Process the keyword args. | 193 | ;; Process the keyword args. |
| 194 | (while (keywordp (car body)) | 194 | (while (keywordp (car body)) |
| 195 | (pcase (pop body) | 195 | (pcase (pop body) |
| 196 | (`:group (setq group (pop body))) | 196 | (:group (setq group (pop body))) |
| 197 | (`:abbrev-table (setq abbrev (pop body)) (setq declare-abbrev nil)) | 197 | (:abbrev-table (setq abbrev (pop body)) (setq declare-abbrev nil)) |
| 198 | (`:syntax-table (setq syntax (pop body)) (setq declare-syntax nil)) | 198 | (:syntax-table (setq syntax (pop body)) (setq declare-syntax nil)) |
| 199 | (`:after-hook (setq after-hook (pop body))) | 199 | (:after-hook (setq after-hook (pop body))) |
| 200 | (_ (pop body)))) | 200 | (_ (pop body)))) |
| 201 | 201 | ||
| 202 | (setq docstring (derived-mode-make-docstring | 202 | (setq docstring (derived-mode-make-docstring |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 4d8a5020267..d74c3ddb97b 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -217,30 +217,30 @@ For example, you could write | |||
| 217 | (while (keywordp (setq keyw (car body))) | 217 | (while (keywordp (setq keyw (car body))) |
| 218 | (setq body (cdr body)) | 218 | (setq body (cdr body)) |
| 219 | (pcase keyw | 219 | (pcase keyw |
| 220 | (`:init-value (setq init-value (pop body))) | 220 | (:init-value (setq init-value (pop body))) |
| 221 | (`:lighter (setq lighter (purecopy (pop body)))) | 221 | (:lighter (setq lighter (purecopy (pop body)))) |
| 222 | (`:global (setq globalp (pop body)) | 222 | (:global (setq globalp (pop body)) |
| 223 | (when (and globalp (symbolp mode)) | 223 | (when (and globalp (symbolp mode)) |
| 224 | (setq setter `(setq-default ,mode)) | 224 | (setq setter `(setq-default ,mode)) |
| 225 | (setq getter `(default-value ',mode)))) | 225 | (setq getter `(default-value ',mode)))) |
| 226 | (`:extra-args (setq extra-args (pop body))) | 226 | (:extra-args (setq extra-args (pop body))) |
| 227 | (`:set (setq set (list :set (pop body)))) | 227 | (:set (setq set (list :set (pop body)))) |
| 228 | (`:initialize (setq initialize (list :initialize (pop body)))) | 228 | (:initialize (setq initialize (list :initialize (pop body)))) |
| 229 | (`:group (setq group (nconc group (list :group (pop body))))) | 229 | (:group (setq group (nconc group (list :group (pop body))))) |
| 230 | (`:type (setq type (list :type (pop body)))) | 230 | (:type (setq type (list :type (pop body)))) |
| 231 | (`:require (setq require (pop body))) | 231 | (:require (setq require (pop body))) |
| 232 | (`:keymap (setq keymap (pop body))) | 232 | (:keymap (setq keymap (pop body))) |
| 233 | (`:variable (setq variable (pop body)) | 233 | (:variable (setq variable (pop body)) |
| 234 | (if (not (and (setq tmp (cdr-safe variable)) | 234 | (if (not (and (setq tmp (cdr-safe variable)) |
| 235 | (or (symbolp tmp) | 235 | (or (symbolp tmp) |
| 236 | (functionp tmp)))) | 236 | (functionp tmp)))) |
| 237 | ;; PLACE is not of the form (GET . SET). | 237 | ;; PLACE is not of the form (GET . SET). |
| 238 | (progn | 238 | (progn |
| 239 | (setq setter `(setf ,variable)) | 239 | (setq setter `(setf ,variable)) |
| 240 | (setq getter variable)) | 240 | (setq getter variable)) |
| 241 | (setq getter (car variable)) | 241 | (setq getter (car variable)) |
| 242 | (setq setter `(funcall #',(cdr variable))))) | 242 | (setq setter `(funcall #',(cdr variable))))) |
| 243 | (`:after-hook (setq after-hook (pop body))) | 243 | (:after-hook (setq after-hook (pop body))) |
| 244 | (_ (push keyw extra-keywords) (push (pop body) extra-keywords)))) | 244 | (_ (push keyw extra-keywords) (push (pop body) extra-keywords)))) |
| 245 | 245 | ||
| 246 | (setq keymap-sym (if (and keymap (symbolp keymap)) keymap | 246 | (setq keymap-sym (if (and keymap (symbolp keymap)) keymap |
| @@ -407,8 +407,8 @@ on if the hook has explicitly disabled it." | |||
| 407 | (while (keywordp (setq keyw (car keys))) | 407 | (while (keywordp (setq keyw (car keys))) |
| 408 | (setq keys (cdr keys)) | 408 | (setq keys (cdr keys)) |
| 409 | (pcase keyw | 409 | (pcase keyw |
| 410 | (`:group (setq group (nconc group (list :group (pop keys))))) | 410 | (:group (setq group (nconc group (list :group (pop keys))))) |
| 411 | (`:global (setq keys (cdr keys))) | 411 | (:global (setq keys (cdr keys))) |
| 412 | (_ (push keyw extra-keywords) (push (pop keys) extra-keywords)))) | 412 | (_ (push keyw extra-keywords) (push (pop keys) extra-keywords)))) |
| 413 | 413 | ||
| 414 | (unless group | 414 | (unless group |
| @@ -533,11 +533,11 @@ Valid keywords and arguments are: | |||
| 533 | (let ((key (pop args)) | 533 | (let ((key (pop args)) |
| 534 | (val (pop args))) | 534 | (val (pop args))) |
| 535 | (pcase key | 535 | (pcase key |
| 536 | (`:name (setq name val)) | 536 | (:name (setq name val)) |
| 537 | (`:dense (setq dense val)) | 537 | (:dense (setq dense val)) |
| 538 | (`:inherit (setq inherit val)) | 538 | (:inherit (setq inherit val)) |
| 539 | (`:suppress (setq suppress val)) | 539 | (:suppress (setq suppress val)) |
| 540 | (`:group) | 540 | (:group) |
| 541 | (_ (message "Unknown argument %s in defmap" key))))) | 541 | (_ (message "Unknown argument %s in defmap" key))))) |
| 542 | (unless (keymapp m) | 542 | (unless (keymapp m) |
| 543 | (setq bs (append m bs)) | 543 | (setq bs (append m bs)) |
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el index 94d035f3744..403829ac466 100644 --- a/lisp/emacs-lisp/easymenu.el +++ b/lisp/emacs-lisp/easymenu.el | |||
| @@ -226,14 +226,14 @@ possibly preceded by keyword pairs as described in `easy-menu-define'." | |||
| 226 | (let ((arg (cadr menu-items))) | 226 | (let ((arg (cadr menu-items))) |
| 227 | (setq menu-items (cddr menu-items)) | 227 | (setq menu-items (cddr menu-items)) |
| 228 | (pcase keyword | 228 | (pcase keyword |
| 229 | (`:filter | 229 | (:filter |
| 230 | (setq filter (lambda (menu) | 230 | (setq filter (lambda (menu) |
| 231 | (easy-menu-filter-return (funcall arg menu) | 231 | (easy-menu-filter-return (funcall arg menu) |
| 232 | menu-name)))) | 232 | menu-name)))) |
| 233 | ((or `:enable `:active) (setq enable (or arg ''nil))) | 233 | ((or :enable :active) (setq enable (or arg ''nil))) |
| 234 | (`:label (setq label arg)) | 234 | (:label (setq label arg)) |
| 235 | (`:help (setq help arg)) | 235 | (:help (setq help arg)) |
| 236 | ((or `:included `:visible) (setq visible (or arg ''nil)))))) | 236 | ((or :included :visible) (setq visible (or arg ''nil)))))) |
| 237 | (if (equal visible ''nil) | 237 | (if (equal visible ''nil) |
| 238 | nil ; Invisible menu entry, return nil. | 238 | nil ; Invisible menu entry, return nil. |
| 239 | (if (and visible (not (easy-menu-always-true-p visible))) | 239 | (if (and visible (not (easy-menu-always-true-p visible))) |
| @@ -325,15 +325,15 @@ ITEM defines an item as in `easy-menu-define'." | |||
| 325 | (setq arg (aref item (1+ count))) | 325 | (setq arg (aref item (1+ count))) |
| 326 | (setq count (+ 2 count)) | 326 | (setq count (+ 2 count)) |
| 327 | (pcase keyword | 327 | (pcase keyword |
| 328 | ((or `:included `:visible) (setq visible (or arg ''nil))) | 328 | ((or :included :visible) (setq visible (or arg ''nil))) |
| 329 | (`:key-sequence (setq cache arg cache-specified t)) | 329 | (:key-sequence (setq cache arg cache-specified t)) |
| 330 | (`:keys (setq keys arg no-name nil)) | 330 | (:keys (setq keys arg no-name nil)) |
| 331 | (`:label (setq label arg)) | 331 | (:label (setq label arg)) |
| 332 | ((or `:active `:enable) (setq active (or arg ''nil))) | 332 | ((or :active :enable) (setq active (or arg ''nil))) |
| 333 | (`:help (setq prop (cons :help (cons arg prop)))) | 333 | (:help (setq prop (cons :help (cons arg prop)))) |
| 334 | (`:suffix (setq suffix arg)) | 334 | (:suffix (setq suffix arg)) |
| 335 | (`:style (setq style arg)) | 335 | (:style (setq style arg)) |
| 336 | (`:selected (setq selected (or arg ''nil))))) | 336 | (:selected (setq selected (or arg ''nil))))) |
| 337 | (if suffix | 337 | (if suffix |
| 338 | (setq label | 338 | (setq label |
| 339 | (if (stringp suffix) | 339 | (if (stringp suffix) |
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index e5ea33c0032..e5c4f198f5b 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el | |||
| @@ -388,9 +388,9 @@ See `defclass' for more information." | |||
| 388 | ;; Clean up the meaning of protection. | 388 | ;; Clean up the meaning of protection. |
| 389 | (setq prot | 389 | (setq prot |
| 390 | (pcase prot | 390 | (pcase prot |
| 391 | ((or 'nil 'public ':public) nil) | 391 | ((or 'nil 'public :public) nil) |
| 392 | ((or 'protected ':protected) 'protected) | 392 | ((or 'protected :protected) 'protected) |
| 393 | ((or 'private ':private) 'private) | 393 | ((or 'private :private) 'private) |
| 394 | (_ (signal 'invalid-slot-type (list :protection prot))))) | 394 | (_ (signal 'invalid-slot-type (list :protection prot))))) |
| 395 | 395 | ||
| 396 | ;; The default type specifier is supposed to be t, meaning anything. | 396 | ;; The default type specifier is supposed to be t, meaning anything. |
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 9c4c3e9fe7a..f2ffef8da7a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -2911,17 +2911,17 @@ PKG is a `package-desc' object. | |||
| 2911 | Return (PKG-DESC [NAME VERSION STATUS DOC])." | 2911 | Return (PKG-DESC [NAME VERSION STATUS DOC])." |
| 2912 | (let* ((status (package-desc-status pkg)) | 2912 | (let* ((status (package-desc-status pkg)) |
| 2913 | (face (pcase status | 2913 | (face (pcase status |
| 2914 | (`"built-in" 'package-status-built-in) | 2914 | ("built-in" 'package-status-built-in) |
| 2915 | (`"external" 'package-status-external) | 2915 | ("external" 'package-status-external) |
| 2916 | (`"available" 'package-status-available) | 2916 | ("available" 'package-status-available) |
| 2917 | (`"avail-obso" 'package-status-avail-obso) | 2917 | ("avail-obso" 'package-status-avail-obso) |
| 2918 | (`"new" 'package-status-new) | 2918 | ("new" 'package-status-new) |
| 2919 | (`"held" 'package-status-held) | 2919 | ("held" 'package-status-held) |
| 2920 | (`"disabled" 'package-status-disabled) | 2920 | ("disabled" 'package-status-disabled) |
| 2921 | (`"installed" 'package-status-installed) | 2921 | ("installed" 'package-status-installed) |
| 2922 | (`"dependency" 'package-status-dependency) | 2922 | ("dependency" 'package-status-dependency) |
| 2923 | (`"unsigned" 'package-status-unsigned) | 2923 | ("unsigned" 'package-status-unsigned) |
| 2924 | (`"incompat" 'package-status-incompat) | 2924 | ("incompat" 'package-status-incompat) |
| 2925 | (_ 'font-lock-warning-face)))) ; obsolete. | 2925 | (_ 'font-lock-warning-face)))) ; obsolete. |
| 2926 | (list pkg | 2926 | (list pkg |
| 2927 | `[(,(symbol-name (package-desc-name pkg)) | 2927 | `[(,(symbol-name (package-desc-name pkg)) |
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index c01a40172b5..4b821729840 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el | |||
| @@ -1856,9 +1856,9 @@ KEYWORDS are additional arguments, which can use the following keywords: | |||
| 1856 | (let ((k (pop keywords)) | 1856 | (let ((k (pop keywords)) |
| 1857 | (v (pop keywords))) | 1857 | (v (pop keywords))) |
| 1858 | (pcase k | 1858 | (pcase k |
| 1859 | (`:forward-token | 1859 | (:forward-token |
| 1860 | (set (make-local-variable 'smie-forward-token-function) v)) | 1860 | (set (make-local-variable 'smie-forward-token-function) v)) |
| 1861 | (`:backward-token | 1861 | (:backward-token |
| 1862 | (set (make-local-variable 'smie-backward-token-function) v)) | 1862 | (set (make-local-variable 'smie-backward-token-function) v)) |
| 1863 | (_ (message "smie-setup: ignoring unknown keyword %s" k))))) | 1863 | (_ (message "smie-setup: ignoring unknown keyword %s" k))))) |
| 1864 | (let ((ca (cdr (assq :smie-closer-alist grammar)))) | 1864 | (let ((ca (cdr (assq :smie-closer-alist grammar)))) |
diff --git a/lisp/faces.el b/lisp/faces.el index 18b821a0b69..a8c1546d5a3 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1084,27 +1084,27 @@ of a set of discrete values. Value is `integerp' if ATTRIBUTE expects | |||
| 1084 | an integer value." | 1084 | an integer value." |
| 1085 | (let ((valid | 1085 | (let ((valid |
| 1086 | (pcase attribute | 1086 | (pcase attribute |
| 1087 | (`:family | 1087 | (:family |
| 1088 | (if (window-system frame) | 1088 | (if (window-system frame) |
| 1089 | (mapcar (lambda (x) (cons x x)) | 1089 | (mapcar (lambda (x) (cons x x)) |
| 1090 | (font-family-list)) | 1090 | (font-family-list)) |
| 1091 | ;; Only one font on TTYs. | 1091 | ;; Only one font on TTYs. |
| 1092 | (list (cons "default" "default")))) | 1092 | (list (cons "default" "default")))) |
| 1093 | (`:foundry | 1093 | (:foundry |
| 1094 | (list nil)) | 1094 | (list nil)) |
| 1095 | (`:width | 1095 | (:width |
| 1096 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) | 1096 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) |
| 1097 | font-width-table)) | 1097 | font-width-table)) |
| 1098 | (`:weight | 1098 | (:weight |
| 1099 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) | 1099 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) |
| 1100 | font-weight-table)) | 1100 | font-weight-table)) |
| 1101 | (`:slant | 1101 | (:slant |
| 1102 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) | 1102 | (mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1))) |
| 1103 | font-slant-table)) | 1103 | font-slant-table)) |
| 1104 | (`:inverse-video | 1104 | (:inverse-video |
| 1105 | (mapcar #'(lambda (x) (cons (symbol-name x) x)) | 1105 | (mapcar #'(lambda (x) (cons (symbol-name x) x)) |
| 1106 | (internal-lisp-face-attribute-values attribute))) | 1106 | (internal-lisp-face-attribute-values attribute))) |
| 1107 | ((or `:underline `:overline `:strike-through `:box) | 1107 | ((or :underline :overline :strike-through :box) |
| 1108 | (if (window-system frame) | 1108 | (if (window-system frame) |
| 1109 | (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x)) | 1109 | (nconc (mapcar #'(lambda (x) (cons (symbol-name x) x)) |
| 1110 | (internal-lisp-face-attribute-values attribute)) | 1110 | (internal-lisp-face-attribute-values attribute)) |
| @@ -1112,12 +1112,12 @@ an integer value." | |||
| 1112 | (defined-colors frame))) | 1112 | (defined-colors frame))) |
| 1113 | (mapcar #'(lambda (x) (cons (symbol-name x) x)) | 1113 | (mapcar #'(lambda (x) (cons (symbol-name x) x)) |
| 1114 | (internal-lisp-face-attribute-values attribute)))) | 1114 | (internal-lisp-face-attribute-values attribute)))) |
| 1115 | ((or `:foreground `:background) | 1115 | ((or :foreground :background) |
| 1116 | (mapcar #'(lambda (c) (cons c c)) | 1116 | (mapcar #'(lambda (c) (cons c c)) |
| 1117 | (defined-colors frame))) | 1117 | (defined-colors frame))) |
| 1118 | (`:height | 1118 | (:height |
| 1119 | 'integerp) | 1119 | 'integerp) |
| 1120 | (`:stipple | 1120 | (:stipple |
| 1121 | (and (memq (window-system frame) '(x ns)) ; No stipple on w32 | 1121 | (and (memq (window-system frame) '(x ns)) ; No stipple on w32 |
| 1122 | (mapcar #'list | 1122 | (mapcar #'list |
| 1123 | (apply #'nconc | 1123 | (apply #'nconc |
| @@ -1126,7 +1126,7 @@ an integer value." | |||
| 1126 | (file-directory-p dir) | 1126 | (file-directory-p dir) |
| 1127 | (directory-files dir))) | 1127 | (directory-files dir))) |
| 1128 | x-bitmap-file-path))))) | 1128 | x-bitmap-file-path))))) |
| 1129 | (`:inherit | 1129 | (:inherit |
| 1130 | (cons '("none" . nil) | 1130 | (cons '("none" . nil) |
| 1131 | (mapcar #'(lambda (c) (cons (symbol-name c) c)) | 1131 | (mapcar #'(lambda (c) (cons (symbol-name c) c)) |
| 1132 | (face-list)))) | 1132 | (face-list)))) |
diff --git a/lisp/filesets.el b/lisp/filesets.el index c1e6ef10d5d..8ccfa570e3a 100644 --- a/lisp/filesets.el +++ b/lisp/filesets.el | |||
| @@ -1559,7 +1559,7 @@ SAVE-FUNCTION takes no argument, but works on the current buffer." | |||
| 1559 | (defun filesets-get-fileset-from-name (name &optional mode) | 1559 | (defun filesets-get-fileset-from-name (name &optional mode) |
| 1560 | "Get fileset definition for NAME." | 1560 | "Get fileset definition for NAME." |
| 1561 | (pcase mode | 1561 | (pcase mode |
| 1562 | ((or `:ingroup `:tree) name) | 1562 | ((or :ingroup :tree) name) |
| 1563 | (_ (assoc name filesets-data)))) | 1563 | (_ (assoc name filesets-data)))) |
| 1564 | 1564 | ||
| 1565 | 1565 | ||
diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 582e495a2bf..ef12352457e 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el | |||
| @@ -232,11 +232,11 @@ | |||
| 232 | ;; FIXME: "^." are two tokens, not one. | 232 | ;; FIXME: "^." are two tokens, not one. |
| 233 | (defun m2-smie-forward-token () | 233 | (defun m2-smie-forward-token () |
| 234 | (pcase (smie-default-forward-token) | 234 | (pcase (smie-default-forward-token) |
| 235 | (`"VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg")) | 235 | ("VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg")) |
| 236 | (`"CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg")) | 236 | ("CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg")) |
| 237 | (`";" (save-excursion (m2-smie-refine-semi))) | 237 | (";" (save-excursion (m2-smie-refine-semi))) |
| 238 | (`"OF" (save-excursion (forward-char -2) (m2-smie-refine-of))) | 238 | ("OF" (save-excursion (forward-char -2) (m2-smie-refine-of))) |
| 239 | (`":" (save-excursion (forward-char -1) (m2-smie-refine-colon))) | 239 | (":" (save-excursion (forward-char -1) (m2-smie-refine-colon))) |
| 240 | ;; (`"END" (if (and (looking-at "[ \t\n]*\\(\\(?:\\sw\\|\\s_\\)+\\)") | 240 | ;; (`"END" (if (and (looking-at "[ \t\n]*\\(\\(?:\\sw\\|\\s_\\)+\\)") |
| 241 | ;; (not (assoc (match-string 1) m2-smie-grammar))) | 241 | ;; (not (assoc (match-string 1) m2-smie-grammar))) |
| 242 | ;; "END-proc" "END")) | 242 | ;; "END-proc" "END")) |
| @@ -244,11 +244,11 @@ | |||
| 244 | 244 | ||
| 245 | (defun m2-smie-backward-token () | 245 | (defun m2-smie-backward-token () |
| 246 | (pcase (smie-default-backward-token) | 246 | (pcase (smie-default-backward-token) |
| 247 | (`"VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg")) | 247 | ("VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg")) |
| 248 | (`"CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg")) | 248 | ("CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg")) |
| 249 | (`";" (save-excursion (forward-char 1) (m2-smie-refine-semi))) | 249 | (";" (save-excursion (forward-char 1) (m2-smie-refine-semi))) |
| 250 | (`"OF" (save-excursion (m2-smie-refine-of))) | 250 | ("OF" (save-excursion (m2-smie-refine-of))) |
| 251 | (`":" (save-excursion (m2-smie-refine-colon))) | 251 | (":" (save-excursion (m2-smie-refine-colon))) |
| 252 | ;; (`"END" (if (and (looking-at "\\sw+[ \t\n]+\\(\\(?:\\sw\\|\\s_\\)+\\)") | 252 | ;; (`"END" (if (and (looking-at "\\sw+[ \t\n]+\\(\\(?:\\sw\\|\\s_\\)+\\)") |
| 253 | ;; (not (assoc (match-string 1) m2-smie-grammar))) | 253 | ;; (not (assoc (match-string 1) m2-smie-grammar))) |
| 254 | ;; "END-proc" "END")) | 254 | ;; "END-proc" "END")) |
| @@ -272,7 +272,7 @@ | |||
| 272 | (pcase (cons kind token) | 272 | (pcase (cons kind token) |
| 273 | (`(:elem . basic) m2-indent) | 273 | (`(:elem . basic) m2-indent) |
| 274 | (`(:after . ":=") (or m2-indent smie-indent-basic)) | 274 | (`(:after . ":=") (or m2-indent smie-indent-basic)) |
| 275 | (`(:after . ,(or `"CONST" `"VAR" `"TYPE")) | 275 | (`(:after . ,(or "CONST" "VAR" "TYPE")) |
| 276 | (or m2-indent smie-indent-basic)) | 276 | (or m2-indent smie-indent-basic)) |
| 277 | ;; (`(:before . ,(or `"VAR" `"TYPE" `"CONST")) | 277 | ;; (`(:before . ,(or `"VAR" `"TYPE" `"CONST")) |
| 278 | ;; (if (smie-rule-parent-p "PROCEDURE") 0)) | 278 | ;; (if (smie-rule-parent-p "PROCEDURE") 0)) |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 13510eef805..cce5e17e79e 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1065,8 +1065,8 @@ directory and makes this the current buffer's default directory." | |||
| 1065 | (unless found (goto-char orig)) | 1065 | (unless found (goto-char orig)) |
| 1066 | found)))) | 1066 | found)))) |
| 1067 | (pcase (and buffer-file-name (file-name-extension buffer-file-name)) | 1067 | (pcase (and buffer-file-name (file-name-extension buffer-file-name)) |
| 1068 | (`"cc" (funcall search | 1068 | ("cc" (funcall search |
| 1069 | "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) | 1069 | "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) |
| 1070 | (_ (funcall search octave-function-header-regexp 3))))) | 1070 | (_ (funcall search octave-function-header-regexp 3))))) |
| 1071 | 1071 | ||
| 1072 | (defun octave-function-file-p () | 1072 | (defun octave-function-file-p () |
| @@ -1135,19 +1135,19 @@ q: Don't fix\n" func file)) | |||
| 1135 | (read-char-choice | 1135 | (read-char-choice |
| 1136 | "Which name to use? (a/b/q) " '(?a ?b ?q)))))) | 1136 | "Which name to use? (a/b/q) " '(?a ?b ?q)))))) |
| 1137 | (pcase c | 1137 | (pcase c |
| 1138 | (`?a (let ((newname (expand-file-name | 1138 | (?a (let ((newname (expand-file-name |
| 1139 | (concat func (file-name-extension | 1139 | (concat func (file-name-extension |
| 1140 | buffer-file-name t))))) | 1140 | buffer-file-name t))))) |
| 1141 | (when (or (not (file-exists-p newname)) | 1141 | (when (or (not (file-exists-p newname)) |
| 1142 | (yes-or-no-p | 1142 | (yes-or-no-p |
| 1143 | (format "Target file %s exists; proceed? " newname))) | 1143 | (format "Target file %s exists; proceed? " newname))) |
| 1144 | (when (file-exists-p buffer-file-name) | 1144 | (when (file-exists-p buffer-file-name) |
| 1145 | (rename-file buffer-file-name newname t)) | 1145 | (rename-file buffer-file-name newname t)) |
| 1146 | (set-visited-file-name newname)))) | 1146 | (set-visited-file-name newname)))) |
| 1147 | (`?b (save-excursion | 1147 | (?b (save-excursion |
| 1148 | (goto-char name-start) | 1148 | (goto-char name-start) |
| 1149 | (delete-region name-start name-end) | 1149 | (delete-region name-start name-end) |
| 1150 | (insert file))))))))) | 1150 | (insert file))))))))) |
| 1151 | 1151 | ||
| 1152 | (defun octave-update-function-file-comment (beg end) | 1152 | (defun octave-update-function-file-comment (beg end) |
| 1153 | "Query replace function names in function file comment." | 1153 | "Query replace function names in function file comment." |
| @@ -1801,19 +1801,19 @@ If the environment variable OCTAVE_SRCDIR is set, it is searched first." | |||
| 1801 | (defun octave-find-definition-default-filename (name) | 1801 | (defun octave-find-definition-default-filename (name) |
| 1802 | "Default value for `octave-find-definition-filename-function'." | 1802 | "Default value for `octave-find-definition-filename-function'." |
| 1803 | (pcase (file-name-extension name) | 1803 | (pcase (file-name-extension name) |
| 1804 | (`"oct" | 1804 | ("oct" |
| 1805 | (octave-find-definition-default-filename | 1805 | (octave-find-definition-default-filename |
| 1806 | (concat "libinterp/dldfcn/" | 1806 | (concat "libinterp/dldfcn/" |
| 1807 | (file-name-sans-extension (file-name-nondirectory name)) | 1807 | (file-name-sans-extension (file-name-nondirectory name)) |
| 1808 | ".cc"))) | 1808 | ".cc"))) |
| 1809 | (`"cc" | 1809 | ("cc" |
| 1810 | (let ((file (or (locate-file name (octave-source-directories)) | 1810 | (let ((file (or (locate-file name (octave-source-directories)) |
| 1811 | (locate-file (file-name-nondirectory name) | 1811 | (locate-file (file-name-nondirectory name) |
| 1812 | (octave-source-directories))))) | 1812 | (octave-source-directories))))) |
| 1813 | (or (and file (file-exists-p file)) | 1813 | (or (and file (file-exists-p file)) |
| 1814 | (error "File `%s' not found" name)) | 1814 | (error "File `%s' not found" name)) |
| 1815 | file)) | 1815 | file)) |
| 1816 | (`"mex" | 1816 | ("mex" |
| 1817 | (if (yes-or-no-p (format-message "File `%s' may be binary; open? " | 1817 | (if (yes-or-no-p (format-message "File `%s' may be binary; open? " |
| 1818 | (file-name-nondirectory name))) | 1818 | (file-name-nondirectory name))) |
| 1819 | name | 1819 | name |
diff --git a/lisp/progmodes/opascal.el b/lisp/progmodes/opascal.el index 46066219518..7d055b735d6 100644 --- a/lisp/progmodes/opascal.el +++ b/lisp/progmodes/opascal.el | |||
| @@ -393,17 +393,17 @@ routine.") | |||
| 393 | (if (null (nth 8 ppss)) | 393 | (if (null (nth 8 ppss)) |
| 394 | (when (looking-at opascal--literal-start-re) | 394 | (when (looking-at opascal--literal-start-re) |
| 395 | (pcase (char-after) | 395 | (pcase (char-after) |
| 396 | (`?/ 'comment-single-line) | 396 | (?/ 'comment-single-line) |
| 397 | (`?\{ 'comment-multi-line-1) | 397 | (?\{ 'comment-multi-line-1) |
| 398 | (`?\( 'comment-multi-line-2) | 398 | (?\( 'comment-multi-line-2) |
| 399 | (`?\' 'string) | 399 | (?\' 'string) |
| 400 | (`?\" 'double-quoted-string))) | 400 | (?\" 'double-quoted-string))) |
| 401 | (if (nth 3 ppss) ;String. | 401 | (if (nth 3 ppss) ;String. |
| 402 | (if (eq (nth 3 ppss) ?\") | 402 | (if (eq (nth 3 ppss) ?\") |
| 403 | 'double-quoted-string 'string) | 403 | 'double-quoted-string 'string) |
| 404 | (pcase (nth 7 ppss) | 404 | (pcase (nth 7 ppss) |
| 405 | (`2 'comment-single-line) | 405 | (2 'comment-single-line) |
| 406 | (`1 'comment-multi-line-2) | 406 | (1 'comment-multi-line-2) |
| 407 | (_ 'comment-multi-line-1)))))))) | 407 | (_ 'comment-multi-line-1)))))))) |
| 408 | 408 | ||
| 409 | (defun opascal-literal-start-pattern (literal-kind) | 409 | (defun opascal-literal-start-pattern (literal-kind) |
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index b96aad7a6ef..a61d1adcb79 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el | |||
| @@ -323,8 +323,8 @@ | |||
| 323 | (cons (car (string-to-syntax "< c")) | 323 | (cons (car (string-to-syntax "< c")) |
| 324 | ;; Remember the names of heredocs found on this line. | 324 | ;; Remember the names of heredocs found on this line. |
| 325 | (cons (cons (pcase (aref name 0) | 325 | (cons (cons (pcase (aref name 0) |
| 326 | (`?\\ (substring name 1)) | 326 | (?\\ (substring name 1)) |
| 327 | ((or `?\" `?\' `?\`) (substring name 1 -1)) | 327 | ((or ?\" ?\' ?\`) (substring name 1 -1)) |
| 328 | (_ name)) | 328 | (_ name)) |
| 329 | indented) | 329 | indented) |
| 330 | (cdr st))))))) | 330 | (cdr st))))))) |
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 3bcc9bebcda..b530c61f974 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el | |||
| @@ -954,9 +954,9 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24." | |||
| 954 | ;; -> thenrule | 954 | ;; -> thenrule |
| 955 | ;; ; elserule | 955 | ;; ; elserule |
| 956 | ;; ) | 956 | ;; ) |
| 957 | (`(:before . ,(or `"->" `";")) | 957 | (`(:before . ,(or "->" ";")) |
| 958 | (and (smie-rule-bolp) (smie-rule-parent-p "(") (smie-rule-parent 0))) | 958 | (and (smie-rule-bolp) (smie-rule-parent-p "(") (smie-rule-parent 0))) |
| 959 | (`(:after . ,(or `"->" `"*->")) | 959 | (`(:after . ,(or "->" "*->")) |
| 960 | ;; We distinguish | 960 | ;; We distinguish |
| 961 | ;; | 961 | ;; |
| 962 | ;; (a -> | 962 | ;; (a -> |
| @@ -3247,11 +3247,11 @@ the following comma and whitespace, if any." | |||
| 3247 | 3247 | ||
| 3248 | (defun prolog-post-self-insert () | 3248 | (defun prolog-post-self-insert () |
| 3249 | (pcase last-command-event | 3249 | (pcase last-command-event |
| 3250 | (`?_ (prolog-electric--underscore)) | 3250 | (?_ (prolog-electric--underscore)) |
| 3251 | (`?- (prolog-electric--dash)) | 3251 | (?- (prolog-electric--dash)) |
| 3252 | (`?: (prolog-electric--colon)) | 3252 | (?: (prolog-electric--colon)) |
| 3253 | ((or `?\( `?\; `?>) (prolog-electric--if-then-else)) | 3253 | ((or ?\( ?\; ?>) (prolog-electric--if-then-else)) |
| 3254 | (`?. (prolog-electric--dot)))) | 3254 | (?. (prolog-electric--dot)))) |
| 3255 | 3255 | ||
| 3256 | (defun prolog-find-term (functor arity &optional prefix) | 3256 | (defun prolog-find-term (functor arity &optional prefix) |
| 3257 | "Go to the position at the start of the next occurrence of a term. | 3257 | "Go to the position at the start of the next occurrence of a term. |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index fad7bc1fb8b..32130cee8e1 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -612,7 +612,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 612 | ;; For (invalid) code between switch and case. | 612 | ;; For (invalid) code between switch and case. |
| 613 | ;; (if (smie-parent-p "switch") 4) | 613 | ;; (if (smie-parent-p "switch") 4) |
| 614 | )) | 614 | )) |
| 615 | (`(:before . ,(or `"(" `"[" `"{")) | 615 | (`(:before . ,(or "(" "[" "{")) |
| 616 | (cond | 616 | (cond |
| 617 | ((and (equal token "{") | 617 | ((and (equal token "{") |
| 618 | (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";")) | 618 | (not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";")) |
| @@ -639,7 +639,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 639 | (forward-char -1)) | 639 | (forward-char -1)) |
| 640 | (smie-indent-virtual)) | 640 | (smie-indent-virtual)) |
| 641 | (t (smie-rule-parent)))))) | 641 | (t (smie-rule-parent)))))) |
| 642 | (`(:after . ,(or `"(" "[" "{")) | 642 | (`(:after . ,(or "(" "[" "{")) |
| 643 | ;; FIXME: Shouldn't this be the default behavior of | 643 | ;; FIXME: Shouldn't this be the default behavior of |
| 644 | ;; `smie-indent-after-keyword'? | 644 | ;; `smie-indent-after-keyword'? |
| 645 | (save-excursion | 645 | (save-excursion |
| @@ -660,7 +660,7 @@ It is used when `ruby-encoding-magic-comment-style' is set to `custom'." | |||
| 660 | (smie-backward-sexp ".") | 660 | (smie-backward-sexp ".") |
| 661 | (cons 'column (+ (current-column) | 661 | (cons 'column (+ (current-column) |
| 662 | ruby-indent-level)))) | 662 | ruby-indent-level)))) |
| 663 | (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure")) | 663 | (`(:before . ,(or "else" "then" "elsif" "rescue" "ensure")) |
| 664 | (smie-rule-parent)) | 664 | (smie-rule-parent)) |
| 665 | (`(:before . "when") | 665 | (`(:before . "when") |
| 666 | ;; Align to the previous `when', but look up the virtual | 666 | ;; Align to the previous `when', but look up the virtual |
| @@ -1544,8 +1544,8 @@ With ARG, do it many times. Negative ARG means move forward." | |||
| 1544 | (cond ((looking-at "\\s)") | 1544 | (cond ((looking-at "\\s)") |
| 1545 | (goto-char (scan-sexps (1+ (point)) -1)) | 1545 | (goto-char (scan-sexps (1+ (point)) -1)) |
| 1546 | (pcase (char-before) | 1546 | (pcase (char-before) |
| 1547 | (`?% (forward-char -1)) | 1547 | (?% (forward-char -1)) |
| 1548 | ((or `?q `?Q `?w `?W `?r `?x) | 1548 | ((or ?q ?Q ?w ?W ?r ?x) |
| 1549 | (if (eq (char-before (1- (point))) ?%) | 1549 | (if (eq (char-before (1- (point))) ?%) |
| 1550 | (forward-char -2)))) | 1550 | (forward-char -2)))) |
| 1551 | nil) | 1551 | nil) |
| @@ -1562,13 +1562,13 @@ With ARG, do it many times. Negative ARG means move forward." | |||
| 1562 | (forward-char 1) | 1562 | (forward-char 1) |
| 1563 | (while (progn (forward-word-strictly -1) | 1563 | (while (progn (forward-word-strictly -1) |
| 1564 | (pcase (char-before) | 1564 | (pcase (char-before) |
| 1565 | (`?_ t) | 1565 | (?_ t) |
| 1566 | (`?. (forward-char -1) t) | 1566 | (?. (forward-char -1) t) |
| 1567 | ((or `?$ `?@) | 1567 | ((or ?$ ?@) |
| 1568 | (forward-char -1) | 1568 | (forward-char -1) |
| 1569 | (and (eq (char-before) (char-after)) | 1569 | (and (eq (char-before) (char-after)) |
| 1570 | (forward-char -1))) | 1570 | (forward-char -1))) |
| 1571 | (`?: | 1571 | (?: |
| 1572 | (forward-char -1) | 1572 | (forward-char -1) |
| 1573 | (eq (char-before) :))))) | 1573 | (eq (char-before) :))))) |
| 1574 | (if (looking-at ruby-block-end-re) | 1574 | (if (looking-at ruby-block-end-re) |
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index aaa86b5816f..46c9e6ee659 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el | |||
| @@ -959,8 +959,8 @@ See `sh-feature'.") | |||
| 959 | ;; ((...)) or $((...)) or $[...] or ${...}. Nested | 959 | ;; ((...)) or $((...)) or $[...] or ${...}. Nested |
| 960 | ;; parenthesis can occur inside the first of these forms, so | 960 | ;; parenthesis can occur inside the first of these forms, so |
| 961 | ;; parse backward recursively. | 961 | ;; parse backward recursively. |
| 962 | (`?\( (eq ?\( (char-before))) | 962 | (?\( (eq ?\( (char-before))) |
| 963 | ((or `?\{ `?\[) (eq ?\$ (char-before)))) | 963 | ((or ?\{ ?\[) (eq ?\$ (char-before)))) |
| 964 | (sh--inside-noncommand-expression (1- (point)))))))) | 964 | (sh--inside-noncommand-expression (1- (point)))))))) |
| 965 | 965 | ||
| 966 | (defun sh-font-lock-open-heredoc (start string eol) | 966 | (defun sh-font-lock-open-heredoc (start string eol) |
| @@ -2038,7 +2038,7 @@ May return nil if the line should not be treated as continued." | |||
| 2038 | (`(:elem . basic) sh-basic-offset) | 2038 | (`(:elem . basic) sh-basic-offset) |
| 2039 | (`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt) | 2039 | (`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt) |
| 2040 | (sh-var-value 'sh-indent-for-case-label))) | 2040 | (sh-var-value 'sh-indent-for-case-label))) |
| 2041 | (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case")) | 2041 | (`(:before . ,(or "(" "{" "[" "while" "if" "for" "case")) |
| 2042 | (if (not (smie-rule-prev-p "&&" "||" "|")) | 2042 | (if (not (smie-rule-prev-p "&&" "||" "|")) |
| 2043 | (when (smie-rule-hanging-p) | 2043 | (when (smie-rule-hanging-p) |
| 2044 | (smie-rule-parent)) | 2044 | (smie-rule-parent)) |
| @@ -2047,11 +2047,11 @@ May return nil if the line should not be treated as continued." | |||
| 2047 | `(column . ,(smie-indent-virtual))))) | 2047 | `(column . ,(smie-indent-virtual))))) |
| 2048 | ;; FIXME: Maybe this handling of ;; should be made into | 2048 | ;; FIXME: Maybe this handling of ;; should be made into |
| 2049 | ;; a smie-rule-terminator function that takes the substitute ";" as arg. | 2049 | ;; a smie-rule-terminator function that takes the substitute ";" as arg. |
| 2050 | (`(:before . ,(or `";;" `";&" `";;&")) | 2050 | (`(:before . ,(or ";;" ";&" ";;&")) |
| 2051 | (if (and (smie-rule-bolp) (looking-at ";;?&?[ \t]*\\(#\\|$\\)")) | 2051 | (if (and (smie-rule-bolp) (looking-at ";;?&?[ \t]*\\(#\\|$\\)")) |
| 2052 | (cons 'column (smie-indent-keyword ";")) | 2052 | (cons 'column (smie-indent-keyword ";")) |
| 2053 | (smie-rule-separator kind))) | 2053 | (smie-rule-separator kind))) |
| 2054 | (`(:after . ,(or `";;" `";&" `";;&")) | 2054 | (`(:after . ,(or ";;" ";&" ";;&")) |
| 2055 | (with-demoted-errors | 2055 | (with-demoted-errors |
| 2056 | (smie-backward-sexp token) | 2056 | (smie-backward-sexp token) |
| 2057 | (cons 'column | 2057 | (cons 'column |
| @@ -2062,7 +2062,7 @@ May return nil if the line should not be treated as continued." | |||
| 2062 | (smie-rule-bolp)))) | 2062 | (smie-rule-bolp)))) |
| 2063 | (current-column) | 2063 | (current-column) |
| 2064 | (smie-indent-calculate))))) | 2064 | (smie-indent-calculate))))) |
| 2065 | (`(:before . ,(or `"|" `"&&" `"||")) | 2065 | (`(:before . ,(or "|" "&&" "||")) |
| 2066 | (unless (smie-rule-parent-p token) | 2066 | (unless (smie-rule-parent-p token) |
| 2067 | (smie-backward-sexp token) | 2067 | (smie-backward-sexp token) |
| 2068 | `(column . ,(+ (funcall smie-rules-function :elem 'basic) | 2068 | `(column . ,(+ (funcall smie-rules-function :elem 'basic) |
| @@ -2081,7 +2081,7 @@ May return nil if the line should not be treated as continued." | |||
| 2081 | ;; sh-indent-after-done: aligned completely differently. | 2081 | ;; sh-indent-after-done: aligned completely differently. |
| 2082 | (`(:after . "in") (sh-var-value 'sh-indent-for-case-label)) | 2082 | (`(:after . "in") (sh-var-value 'sh-indent-for-case-label)) |
| 2083 | ;; sh-indent-for-continuation: Line continuations are handled differently. | 2083 | ;; sh-indent-for-continuation: Line continuations are handled differently. |
| 2084 | (`(:after . ,(or `"(" `"{" `"[")) | 2084 | (`(:after . ,(or "(" "{" "[")) |
| 2085 | (if (not (looking-at ".[ \t]*[^\n \t#]")) | 2085 | (if (not (looking-at ".[ \t]*[^\n \t#]")) |
| 2086 | (sh-var-value 'sh-indent-after-open) | 2086 | (sh-var-value 'sh-indent-after-open) |
| 2087 | (goto-char (1- (match-end 0))) | 2087 | (goto-char (1- (match-end 0))) |
| @@ -2253,7 +2253,7 @@ Point should be before the newline." | |||
| 2253 | (save-excursion | 2253 | (save-excursion |
| 2254 | (when (sh-smie--rc-after-special-arg-p) | 2254 | (when (sh-smie--rc-after-special-arg-p) |
| 2255 | `(column . ,(current-column))))) | 2255 | `(column . ,(current-column))))) |
| 2256 | (`(:before . ,(or `"(" `"{" `"[")) | 2256 | (`(:before . ,(or "(" "{" "[")) |
| 2257 | (if (smie-rule-hanging-p) (smie-rule-parent))) | 2257 | (if (smie-rule-hanging-p) (smie-rule-parent))) |
| 2258 | ;; FIXME: SMIE parses "if (exp) cmd" as "(if ((exp) cmd))" so "cmd" is | 2258 | ;; FIXME: SMIE parses "if (exp) cmd" as "(if ((exp) cmd))" so "cmd" is |
| 2259 | ;; treated as an arg to (exp) by default, which indents it all wrong. | 2259 | ;; treated as an arg to (exp) by default, which indents it all wrong. |
| @@ -2262,7 +2262,7 @@ Point should be before the newline." | |||
| 2262 | ;; rule we have is the :list-intro hack, which we use here to align "cmd" | 2262 | ;; rule we have is the :list-intro hack, which we use here to align "cmd" |
| 2263 | ;; with "(exp)", which is rarely the right thing to do, but is better | 2263 | ;; with "(exp)", which is rarely the right thing to do, but is better |
| 2264 | ;; than nothing. | 2264 | ;; than nothing. |
| 2265 | (`(:list-intro . ,(or `"for" `"if" `"while")) t) | 2265 | (`(:list-intro . ,(or "for" "if" "while")) t) |
| 2266 | ;; sh-indent-after-switch: handled implicitly by the default { rule. | 2266 | ;; sh-indent-after-switch: handled implicitly by the default { rule. |
| 2267 | )) | 2267 | )) |
| 2268 | 2268 | ||
diff --git a/lisp/server.el b/lisp/server.el index 50684a20aaa..d0a8ca313e3 100644 --- a/lisp/server.el +++ b/lisp/server.el | |||
| @@ -1112,16 +1112,16 @@ The following commands are accepted by the client: | |||
| 1112 | (while args-left | 1112 | (while args-left |
| 1113 | (pcase (pop args-left) | 1113 | (pcase (pop args-left) |
| 1114 | ;; -version CLIENT-VERSION: obsolete at birth. | 1114 | ;; -version CLIENT-VERSION: obsolete at birth. |
| 1115 | (`"-version" (pop args-left)) | 1115 | ("-version" (pop args-left)) |
| 1116 | 1116 | ||
| 1117 | ;; -nowait: Emacsclient won't wait for a result. | 1117 | ;; -nowait: Emacsclient won't wait for a result. |
| 1118 | (`"-nowait" (setq nowait t)) | 1118 | ("-nowait" (setq nowait t)) |
| 1119 | 1119 | ||
| 1120 | ;; -current-frame: Don't create frames. | 1120 | ;; -current-frame: Don't create frames. |
| 1121 | (`"-current-frame" (setq use-current-frame t)) | 1121 | ("-current-frame" (setq use-current-frame t)) |
| 1122 | 1122 | ||
| 1123 | ;; -frame-parameters: Set frame parameters | 1123 | ;; -frame-parameters: Set frame parameters |
| 1124 | (`"-frame-parameters" | 1124 | ("-frame-parameters" |
| 1125 | (let ((alist (pop args-left))) | 1125 | (let ((alist (pop args-left))) |
| 1126 | (if coding-system | 1126 | (if coding-system |
| 1127 | (setq alist (decode-coding-string alist coding-system))) | 1127 | (setq alist (decode-coding-string alist coding-system))) |
| @@ -1129,24 +1129,24 @@ The following commands are accepted by the client: | |||
| 1129 | 1129 | ||
| 1130 | ;; -display DISPLAY: | 1130 | ;; -display DISPLAY: |
| 1131 | ;; Open X frames on the given display instead of the default. | 1131 | ;; Open X frames on the given display instead of the default. |
| 1132 | (`"-display" | 1132 | ("-display" |
| 1133 | (setq display (pop args-left)) | 1133 | (setq display (pop args-left)) |
| 1134 | (if (zerop (length display)) (setq display nil))) | 1134 | (if (zerop (length display)) (setq display nil))) |
| 1135 | 1135 | ||
| 1136 | ;; -parent-id ID: | 1136 | ;; -parent-id ID: |
| 1137 | ;; Open X frame within window ID, via XEmbed. | 1137 | ;; Open X frame within window ID, via XEmbed. |
| 1138 | (`"-parent-id" | 1138 | ("-parent-id" |
| 1139 | (setq parent-id (pop args-left)) | 1139 | (setq parent-id (pop args-left)) |
| 1140 | (if (zerop (length parent-id)) (setq parent-id nil))) | 1140 | (if (zerop (length parent-id)) (setq parent-id nil))) |
| 1141 | 1141 | ||
| 1142 | ;; -window-system: Open a new X frame. | 1142 | ;; -window-system: Open a new X frame. |
| 1143 | (`"-window-system" | 1143 | ("-window-system" |
| 1144 | (if (fboundp 'x-create-frame) | 1144 | (if (fboundp 'x-create-frame) |
| 1145 | (setq dontkill t | 1145 | (setq dontkill t |
| 1146 | tty-name 'window-system))) | 1146 | tty-name 'window-system))) |
| 1147 | 1147 | ||
| 1148 | ;; -resume: Resume a suspended tty frame. | 1148 | ;; -resume: Resume a suspended tty frame. |
| 1149 | (`"-resume" | 1149 | ("-resume" |
| 1150 | (let ((terminal (process-get proc 'terminal))) | 1150 | (let ((terminal (process-get proc 'terminal))) |
| 1151 | (setq dontkill t) | 1151 | (setq dontkill t) |
| 1152 | (push (lambda () | 1152 | (push (lambda () |
| @@ -1157,7 +1157,7 @@ The following commands are accepted by the client: | |||
| 1157 | ;; -suspend: Suspend the client's frame. (In case we | 1157 | ;; -suspend: Suspend the client's frame. (In case we |
| 1158 | ;; get out of sync, and a C-z sends a SIGTSTP to | 1158 | ;; get out of sync, and a C-z sends a SIGTSTP to |
| 1159 | ;; emacsclient.) | 1159 | ;; emacsclient.) |
| 1160 | (`"-suspend" | 1160 | ("-suspend" |
| 1161 | (let ((terminal (process-get proc 'terminal))) | 1161 | (let ((terminal (process-get proc 'terminal))) |
| 1162 | (setq dontkill t) | 1162 | (setq dontkill t) |
| 1163 | (push (lambda () | 1163 | (push (lambda () |
| @@ -1167,13 +1167,13 @@ The following commands are accepted by the client: | |||
| 1167 | 1167 | ||
| 1168 | ;; -ignore COMMENT: Noop; useful for debugging emacsclient. | 1168 | ;; -ignore COMMENT: Noop; useful for debugging emacsclient. |
| 1169 | ;; (The given comment appears in the server log.) | 1169 | ;; (The given comment appears in the server log.) |
| 1170 | (`"-ignore" | 1170 | ("-ignore" |
| 1171 | (setq dontkill t) | 1171 | (setq dontkill t) |
| 1172 | (pop args-left)) | 1172 | (pop args-left)) |
| 1173 | 1173 | ||
| 1174 | ;; -tty DEVICE-NAME TYPE: Open a new tty frame. | 1174 | ;; -tty DEVICE-NAME TYPE: Open a new tty frame. |
| 1175 | ;; (But if we see -window-system later, use that.) | 1175 | ;; (But if we see -window-system later, use that.) |
| 1176 | (`"-tty" | 1176 | ("-tty" |
| 1177 | (setq tty-name (pop args-left) | 1177 | (setq tty-name (pop args-left) |
| 1178 | tty-type (pop args-left) | 1178 | tty-type (pop args-left) |
| 1179 | dontkill (or dontkill | 1179 | dontkill (or dontkill |
| @@ -1192,7 +1192,7 @@ The following commands are accepted by the client: | |||
| 1192 | 1192 | ||
| 1193 | ;; -position LINE[:COLUMN]: Set point to the given | 1193 | ;; -position LINE[:COLUMN]: Set point to the given |
| 1194 | ;; position in the next file. | 1194 | ;; position in the next file. |
| 1195 | (`"-position" | 1195 | ("-position" |
| 1196 | (if (not (string-match "\\+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?" | 1196 | (if (not (string-match "\\+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?" |
| 1197 | (car args-left))) | 1197 | (car args-left))) |
| 1198 | (error "Invalid -position command in client args")) | 1198 | (error "Invalid -position command in client args")) |
| @@ -1203,7 +1203,7 @@ The following commands are accepted by the client: | |||
| 1203 | "")))))) | 1203 | "")))))) |
| 1204 | 1204 | ||
| 1205 | ;; -file FILENAME: Load the given file. | 1205 | ;; -file FILENAME: Load the given file. |
| 1206 | (`"-file" | 1206 | ("-file" |
| 1207 | (let ((file (pop args-left))) | 1207 | (let ((file (pop args-left))) |
| 1208 | (if coding-system | 1208 | (if coding-system |
| 1209 | (setq file (decode-coding-string file coding-system))) | 1209 | (setq file (decode-coding-string file coding-system))) |
| @@ -1221,7 +1221,7 @@ The following commands are accepted by the client: | |||
| 1221 | (setq filepos nil)) | 1221 | (setq filepos nil)) |
| 1222 | 1222 | ||
| 1223 | ;; -eval EXPR: Evaluate a Lisp expression. | 1223 | ;; -eval EXPR: Evaluate a Lisp expression. |
| 1224 | (`"-eval" | 1224 | ("-eval" |
| 1225 | (if use-current-frame | 1225 | (if use-current-frame |
| 1226 | (setq use-current-frame 'always)) | 1226 | (setq use-current-frame 'always)) |
| 1227 | (let ((expr (pop args-left))) | 1227 | (let ((expr (pop args-left))) |
| @@ -1232,14 +1232,14 @@ The following commands are accepted by the client: | |||
| 1232 | (setq filepos nil))) | 1232 | (setq filepos nil))) |
| 1233 | 1233 | ||
| 1234 | ;; -env NAME=VALUE: An environment variable. | 1234 | ;; -env NAME=VALUE: An environment variable. |
| 1235 | (`"-env" | 1235 | ("-env" |
| 1236 | (let ((var (pop args-left))) | 1236 | (let ((var (pop args-left))) |
| 1237 | ;; XXX Variables should be encoded as in getenv/setenv. | 1237 | ;; XXX Variables should be encoded as in getenv/setenv. |
| 1238 | (process-put proc 'env | 1238 | (process-put proc 'env |
| 1239 | (cons var (process-get proc 'env))))) | 1239 | (cons var (process-get proc 'env))))) |
| 1240 | 1240 | ||
| 1241 | ;; -dir DIRNAME: The cwd of the emacsclient process. | 1241 | ;; -dir DIRNAME: The cwd of the emacsclient process. |
| 1242 | (`"-dir" | 1242 | ("-dir" |
| 1243 | (setq dir (pop args-left)) | 1243 | (setq dir (pop args-left)) |
| 1244 | (if coding-system | 1244 | (if coding-system |
| 1245 | (setq dir (decode-coding-string dir coding-system))) | 1245 | (setq dir (decode-coding-string dir coding-system))) |
diff --git a/lisp/subr.el b/lisp/subr.el index 41dc9aa45f5..aaf8909e0c1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -4815,7 +4815,7 @@ command is called from a keyboard macro?" | |||
| 4815 | i frame nextframe))) | 4815 | i frame nextframe))) |
| 4816 | (pcase skip | 4816 | (pcase skip |
| 4817 | (`nil nil) | 4817 | (`nil nil) |
| 4818 | (`0 t) | 4818 | (0 t) |
| 4819 | (_ (setq i (+ i skip -1)) (funcall get-next-frame))))))) | 4819 | (_ (setq i (+ i skip -1)) (funcall get-next-frame))))))) |
| 4820 | ;; Now `frame' should be "the function from which we were called". | 4820 | ;; Now `frame' should be "the function from which we were called". |
| 4821 | (pcase (cons frame nextframe) | 4821 | (pcase (cons frame nextframe) |
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 31ce638b316..63c86317ee1 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -1219,7 +1219,7 @@ for determining whether point is within a selector." | |||
| 1219 | (`(:elem . basic) css-indent-offset) | 1219 | (`(:elem . basic) css-indent-offset) |
| 1220 | (`(:elem . arg) 0) | 1220 | (`(:elem . arg) 0) |
| 1221 | ;; "" stands for BOB (bug#15467). | 1221 | ;; "" stands for BOB (bug#15467). |
| 1222 | (`(:list-intro . ,(or `";" `"" `":-property")) t) | 1222 | (`(:list-intro . ,(or ";" "" ":-property")) t) |
| 1223 | (`(:before . "{") | 1223 | (`(:before . "{") |
| 1224 | (when (or (smie-rule-hanging-p) (smie-rule-bolp)) | 1224 | (when (or (smie-rule-hanging-p) (smie-rule-bolp)) |
| 1225 | (smie-backward-sexp ";") | 1225 | (smie-backward-sexp ";") |
diff --git a/test/lisp/emacs-lisp/pcase-tests.el b/test/lisp/emacs-lisp/pcase-tests.el index 774a488255d..c706c1051e3 100644 --- a/test/lisp/emacs-lisp/pcase-tests.el +++ b/test/lisp/emacs-lisp/pcase-tests.el | |||
| @@ -53,7 +53,7 @@ | |||
| 53 | (should (pcase-tests-grep | 53 | (should (pcase-tests-grep |
| 54 | 'memq (macroexpand-all '(pcase x ((or 1 2 3) body))))) | 54 | 'memq (macroexpand-all '(pcase x ((or 1 2 3) body))))) |
| 55 | (should (pcase-tests-grep | 55 | (should (pcase-tests-grep |
| 56 | 'member (macroexpand-all '(pcase x ((or '"a" '2 '3) body))))) | 56 | 'member (macroexpand-all '(pcase x ((or "a" 2 3) body))))) |
| 57 | (should-not (pcase-tests-grep | 57 | (should-not (pcase-tests-grep |
| 58 | 'memq (macroexpand-all '(pcase x ((or "a" 2 3) body))))) | 58 | 'memq (macroexpand-all '(pcase x ((or "a" 2 3) body))))) |
| 59 | (let ((exp (macroexpand-all | 59 | (let ((exp (macroexpand-all |