emacs-diffs
[Top][All Lists]
Advanced

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

master 0de472e04fb 2/2: Use `delq` return value (bug#61730)


From: Mattias Engdegård
Subject: master 0de472e04fb 2/2: Use `delq` return value (bug#61730)
Date: Sat, 20 May 2023 05:06:40 -0400 (EDT)

branch: master
commit 0de472e04fb29581e8302b60fafc707b18d7cbf3
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Use `delq` return value (bug#61730)
    
    * lisp/calc/calc-graph.el (calc-graph-compute-2d):
    * lisp/calendar/appt.el (appt-activate):
    * lisp/progmodes/cc-styles.el (c-make-styles-buffer-local):
    Make use of what `delq` returns, to stave off possible mistakes or at
    least make clear that there isn't any.
---
 lisp/calc/calc-graph.el     | 7 ++++---
 lisp/calendar/appt.el       | 2 +-
 lisp/progmodes/cc-styles.el | 5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el
index 3de761e19f8..1b9d25daf3b 100644
--- a/lisp/calc/calc-graph.el
+++ b/lisp/calc/calc-graph.el
@@ -598,9 +598,10 @@
                                        (math-build-var-name (car math-arglist))
                                        '(var DUMMY var-DUMMY)))))
     (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache))
-    (delq calc-graph-ycache calc-graph-data-cache)
-    (nconc calc-graph-data-cache
-          (list (or calc-graph-ycache (setq calc-graph-ycache (list 
calc-graph-yvalue)))))
+    (setq calc-graph-data-cache
+          (nconc (delq calc-graph-ycache calc-graph-data-cache)
+                 (list (or calc-graph-ycache
+                           (setq calc-graph-ycache (list 
calc-graph-yvalue))))))
     (if (and (not (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 
'vec)))
             calc-graph-refine (cdr (cdr calc-graph-ycache)))
        (calc-graph-refine-2d)
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 49597739446..11beee94e64 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -707,7 +707,7 @@ ARG is positive, otherwise off."
                         (not appt-active)))
     (remove-hook 'write-file-functions #'appt-update-list)
     (or global-mode-string (setq global-mode-string '("")))
-    (delq 'appt-mode-string global-mode-string)
+    (setq global-mode-string (delq 'appt-mode-string global-mode-string))
     (when appt-timer
       (cancel-timer appt-timer)
       (setq appt-timer nil))
diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el
index fc4f723915c..e412a52cfb8 100644
--- a/lisp/progmodes/cc-styles.el
+++ b/lisp/progmodes/cc-styles.el
@@ -658,8 +658,9 @@ any reason to call this function directly."
   (let ((func (if this-buf-only-p
                  'make-local-variable
                'make-variable-buffer-local))
-       (varsyms (cons 'c-indentation-style (copy-alist c-style-variables))))
-    (delq 'c-special-indent-hook varsyms)
+       (varsyms (cons 'c-indentation-style
+                      (delq 'c-special-indent-hook
+                            (copy-alist c-style-variables)))))
     (mapc func varsyms)
     ;; Hooks must be handled specially
     (if this-buf-only-p



reply via email to

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