]> git.eshelyaron.com Git - emacs.git/commitdiff
Simplify code for 'indent-for-tab-command' slightly.
authorPhilipp Stephani <phst@google.com>
Fri, 14 Jan 2022 19:56:03 +0000 (20:56 +0100)
committerPhilipp Stephani <phst@google.com>
Fri, 14 Jan 2022 19:56:03 +0000 (20:56 +0100)
* lisp/indent.el (indent-for-tab-command): Don't use a one-element
list for SYN.

lisp/indent.el

index 40669b384243f32e5b8446647fbe7e16c9058553..8dc4c31f135f97f70cfce4468cad404c35991111 100644 (file)
@@ -170,7 +170,7 @@ prefix argument is ignored."
     (let ((old-tick (buffer-chars-modified-tick))
           (old-point (point))
          (old-indent (current-indentation))
-          (syn `(,(syntax-after (point)))))
+          (syn (syntax-after (point))))
 
       ;; Indent the line.
       (or (not (eq (indent--funcall-widened indent-line-function) 'noindent))
@@ -190,13 +190,13 @@ prefix argument is ignored."
                       (eolp))
                  (and (member tab-first-completion
                               '(word word-or-paren word-or-paren-or-punct))
-                      (not (member 2 syn)))
+                      (not (eql 2 syn)))
                  (and (member tab-first-completion
                               '(word-or-paren word-or-paren-or-punct))
-                      (not (or (member 4 syn)
-                               (member 5 syn))))
+                      (not (or (eql 4 syn)
+                               (eql 5 syn))))
                  (and (equal tab-first-completion 'word-or-paren-or-punct)
-                      (not (member 1 syn)))))
+                      (not (eql 1 syn)))))
         (completion-at-point))
 
        ;; If a prefix argument was given, rigidly indent the following