summaryrefslogtreecommitdiff
path: root/lisp/calc
diff options
context:
space:
mode:
authorJay Belanger <jay.p.belanger@gmail.com>2005-01-08 05:58:05 +0000
committerJay Belanger <jay.p.belanger@gmail.com>2005-01-08 05:58:05 +0000
commitd3d45619be3f09b86e8bad392be2d2026fa28c19 (patch)
tree76b2f7cb26cb683f7e3a2f36e67447040b757a66 /lisp/calc
parent73cdd245f32f9134f3e90d0851bd1dad3c388af3 (diff)
downloademacs-d3d45619be3f09b86e8bad392be2d2026fa28c19.tar.gz
(calc-settings-file-name): Compare calc-settings-file to
user-init-file instead of ~/.emacs. Replace ~/.emacs in a prompt by calc-settings-file.
Diffstat (limited to 'lisp/calc')
-rw-r--r--lisp/calc/calc-mode.el11
1 files changed, 4 insertions, 7 deletions
diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el
index dfc488d49dd..389b52385b6 100644
--- a/lisp/calc/calc-mode.el
+++ b/lisp/calc/calc-mode.el
@@ -309,25 +309,22 @@
(defun calc-settings-file-name (name &optional arg)
(interactive
(list (read-file-name (format "Settings file name (normally %s): "
- (abbreviate-file-name (or user-init-file
- "~/.emacs"))))
+ (abbreviate-file-name calc-settings-file)))
current-prefix-arg))
(calc-wrapper
(setq arg (if arg (prefix-numeric-value arg) 0))
- (if (equal name "")
+ (if (string-equal (file-name-nondirectory name) "")
(message "Calc settings file is \"%s\"" calc-settings-file)
(if (< (math-abs arg) 2)
(let ((list calc-mode-var-list))
(while list
(set (car (car list)) (nth 1 (car list)))
(setq list (cdr list)))))
- ;; FIXME: we should use ~/.calc or so in order to avoid
- ;; reexecuting ~/.emacs (it's not always idempotent) -cgw 2001.11.12
(setq calc-settings-file name)
(or (and
calc-settings-file
- (string-match "\\.emacs" calc-settings-file)
- (> arg 0))
+ (equal user-init-file calc-settings-file)
+ (> arg 0))
(< arg 0)
(load name t)
(message "New file")))))