]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `add-to-list' defensively instead of `push'
authorJohn Wiegley <johnw@newartisans.com>
Fri, 26 Feb 2016 01:13:02 +0000 (17:13 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Fri, 26 Feb 2016 01:13:02 +0000 (17:13 -0800)
GitHub-reference: fixes https://github.com/jwiegley/use-package/issues/293

lisp/use-package/use-package.el

index 45ef410be88f1b6f1d15d2bda5d84aee40ee7586..619c6c3b3f32b431e5e03397edaf7c26d7dcb90b 100644 (file)
@@ -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