1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

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.
This commit is contained in:
Mattias Engdegård 2023-05-18 17:33:15 +02:00
parent bd6bba4780
commit 0de472e04f
3 changed files with 8 additions and 6 deletions

View file

@ -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)

View 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))

View 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