aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMichael Heerdegen2018-10-27 01:48:35 +0200
committerMichael Heerdegen2018-10-30 16:17:45 +0100
commit049bd5d267bc0d66cc0ba3b70c8773fed95694da (patch)
tree80978595066509f385dab41664e7eb319e2330b0 /lisp/progmodes
parent607cc2901bab0be64d08aff0394a4676a81da40b (diff)
downloademacs-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.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/modula2.el22
-rw-r--r--lisp/progmodes/octave.el36
-rw-r--r--lisp/progmodes/opascal.el14
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/prolog.el14
-rw-r--r--lisp/progmodes/ruby-mode.el18
-rw-r--r--lisp/progmodes/sh-script.el18
7 files changed, 63 insertions, 63 deletions
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