emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c723401151 1/3: Simplify code for 'indent-for-tab-command' slight


From: Philipp Stephani
Subject: master c723401151 1/3: Simplify code for 'indent-for-tab-command' slightly.
Date: Fri, 14 Jan 2022 15:03:16 -0500 (EST)

branch: master
commit c7234011518133da8b5f585719be511a1dfbcf11
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Simplify code for 'indent-for-tab-command' slightly.
    
    * lisp/indent.el (indent-for-tab-command): Don't use a one-element
    list for SYN.
---
 lisp/indent.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/indent.el b/lisp/indent.el
index 40669b3842..8dc4c31f13 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]