From: Mattias EngdegÄrd Date: Thu, 18 May 2023 15:33:15 +0000 (+0200) Subject: Use `delq` return value (bug#61730) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0de472e04fb29581e8302b60fafc707b18d7cbf3;p=emacs.git 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. --- 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