diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-01-01 23:47:49 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-01-01 23:47:49 +0000 |
commit | 05b379b890c11a11230b16b2170874b8aa8b8345 (patch) | |
tree | 1aaf4e2394d3ec04e7c25110a4b86170a30bee4e | |
parent | 839dc3a230dd1add6751a9d8d47efd1097c2c347 (diff) | |
download | emacs-05b379b890c11a11230b16b2170874b8aa8b8345.tar.gz |
(cpp-config-file): New variable.
(cpp-edit-load): Use `cpp-config-file'.
(cpp-edit-save): Use `cpp-config-file'.
-rw-r--r-- | lisp/progmodes/cpp.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 5ddb1739540..78a11ac532d 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -47,6 +47,9 @@ ;;; Customization: +(defvar cpp-config-file (convert-standard-filename ".cpp.el") + "*File name to save cpp configuration.") + (defvar cpp-known-face 'invisible "*Face used for known cpp symbols.") @@ -506,10 +509,10 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (defun cpp-edit-load () "Load cpp configuration." (interactive) - (cond ((file-readable-p ".cpp.el") - (load-file ".cpp.el")) - ((file-readable-p "~/.cpp.el") - (load-file ".cpp.el"))) + (cond ((file-readable-p cpp-config-file) + (load-file cpp-config-file)) + ((file-readable-p (concat "~/" cpp-config-file)) + (load-file cpp-config-file))) (if (eq major-mode 'cpp-edit-mode) (cpp-edit-reset))) @@ -519,7 +522,7 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (require 'pp) (save-excursion (set-buffer cpp-edit-buffer) - (let ((buffer (find-file-noselect ".cpp.el"))) + (let ((buffer (find-file-noselect cpp-config-file))) (set-buffer buffer) (erase-buffer) (pp (list 'setq 'cpp-known-face @@ -534,7 +537,7 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (list 'quote cpp-unknown-writable)) buffer) (pp (list 'setq 'cpp-edit-list (list 'quote cpp-edit-list)) buffer) - (write-file ".cpp.el")))) + (write-file cpp-config-file)))) (defun cpp-edit-home () "Switch back to original buffer." |