diff options
author | Mark Oteiza <mvoteiza@udel.edu> | 2017-08-08 15:10:49 -0400 |
---|---|---|
committer | Mark Oteiza <mvoteiza@udel.edu> | 2017-08-08 15:10:49 -0400 |
commit | 63b5a4a65eec5792b985c9d6be68424731bd478d (patch) | |
tree | bce03c0669c7c7cde230a87b499a63f802720c67 /lisp/international/ogonek.el | |
parent | 884d43b43eb51fe91c657ed0780cf85d31522248 (diff) | |
download | emacs-63b5a4a65eec5792b985c9d6be68424731bd478d.tar.gz |
Replace some uses of eval
There are a number of places where eval is used unnecessarily to get
or set the value of a symbol.
* lisp/calendar/calendar.el (diary-date-forms): Use default-value in
custom setter.
* lisp/desktop.el (desktop-clear): Use set-default instead.
* lisp/international/ogonek.el (ogonek-read-encoding): Use
symbol-value.
Diffstat (limited to 'lisp/international/ogonek.el')
-rw-r--r-- | lisp/international/ogonek.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index ef3a980f19a..cabcf90078a 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -301,13 +301,12 @@ Store the name in the parameter-variable DEFAULT-NAME-VAR. PROMPT is a string to be shown when the user is asked for a name." (let ((encoding (completing-read - (format "%s (default %s): " prompt (eval default-name-var)) + (format "%s (default %s): " prompt (symbol-value default-name-var)) ogonek-name-encoding-alist nil t))) - ;; change the default name to the one just read - (set default-name-var - (if (string= encoding "") (eval default-name-var) encoding)) + ;; change the default name to the one just read, and ;; return the new default as the name you read - (eval default-name-var))) + (set default-name-var + (if (string= encoding "") (symbol-value default-name-var) encoding)))) (defun ogonek-read-prefix (prompt default-prefix-var) "Read a prefix character for prefix notation. |