Skip to content

Commit 4ea306a

Browse files
committed
Prefer cl-gensym to gensym for better compatibility across emacs versions
1 parent ad68d36 commit 4ea306a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎exec-path-from-shell.el‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
;; Keywords: unix, environment
77
;; URL: https://github.com/purcell/exec-path-from-shell
88
;; Package-Version: 0
9-
;; Package-Requires: ((emacs "24.1"))
9+
;; Package-Requires: ((emacs "24.1") (cl-lib "0.6"))
1010

1111
;; This file is not part of GNU Emacs.
1212

@@ -75,6 +75,7 @@
7575

7676
;; Satisfy the byte compiler
7777
(eval-when-compile (require 'eshell))
78+
(require 'cl-lib)
7879

7980
(defgroup exec-path-from-shell nil
8081
"Make Emacs use shell-defined values for $PATH etc."
@@ -141,8 +142,8 @@ The default value denotes an interactive login shell."
141142
(defmacro exec-path-from-shell--warn-duration (&rest body)
142143
"Evaluate BODY and warn if execution duration exceeds a time limit.
143144
The limit is given by `exec-path-from-shell-warn-duration-millis'."
144-
(let ((start-time (gensym))
145-
(duration-millis (gensym)))
145+
(let ((start-time (cl-gensym))
146+
(duration-millis (cl-gensym)))
146147
`(let ((,start-time (current-time)))
147148
(prog1
148149
(progn ,@body)

0 commit comments

Comments
 (0)