From: John Wiegley Date: Fri, 26 Feb 2016 01:13:02 +0000 (-0800) Subject: Use `add-to-list' defensively instead of `push' X-Git-Tag: emacs-29.0.90~1306^2~15^2~305 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ce51ea2055cc5c713f52342ceac79bc36631c8fe;p=emacs.git Use `add-to-list' defensively instead of `push' GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/293 --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 45ef410be88..619c6c3b3f3 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -597,7 +597,7 @@ manually updated package." (let ((body (use-package-process-keywords name rest state))) (use-package-concat (mapcar #'(lambda (path) - `(eval-and-compile (push ,path load-path))) arg) + `(eval-and-compile (add-to-list 'load-path ,path))) arg) body))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -785,7 +785,7 @@ deferred until the prefix key sequence is pressed." (let* (commands (form (mapcar #'(lambda (interpreter) (push (cdr interpreter) commands) - `(push ',interpreter interpreter-mode-alist)) arg))) + `(add-to-list 'interpreter-mode-alist ',interpreter)) arg))) (use-package-concat (use-package-process-keywords name (use-package-sort-keywords @@ -804,7 +804,7 @@ deferred until the prefix key sequence is pressed." (let* (commands (form (mapcar #'(lambda (mode) (push (cdr mode) commands) - `(push ',mode auto-mode-alist)) arg))) + `(add-to-list 'auto-mode-alist ',mode)) arg))) (use-package-concat (use-package-process-keywords name (use-package-sort-keywords