]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `delq` return value (bug#61730)
authorMattias Engdegård <mattiase@acm.org>
Thu, 18 May 2023 15:33:15 +0000 (17:33 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 20 May 2023 09:05:57 +0000 (11:05 +0200)
* 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
lisp/calendar/appt.el
lisp/progmodes/cc-styles.el

index 3de761e19f882a8ecc209717f4a5b046afa71e2f..1b9d25daf3b0f0dceac08e8cc98058fe62b66c4e 100644 (file)
                                        (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)
index 49597739446c20f27759da7cd293aa09e7a60b65..11beee94e64037aadb35601591eaa3d25283bfe9 100644 (file)
@@ -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))
index fc4f723915c9c767629788e3f4fc48f0aa9be9e6..e412a52cfb8c2eb5ed9e258c1cf39a016e0f7acb 100644 (file)
@@ -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