From: Richard M. Stallman Date: Mon, 1 Jan 1996 23:47:49 +0000 (+0000) Subject: (cpp-config-file): New variable. X-Git-Tag: emacs-19.34~1949 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=21590f63ea589bdd953f88a720b406a3b0513f52;p=emacs.git (cpp-config-file): New variable. (cpp-edit-load): Use `cpp-config-file'. (cpp-edit-save): Use `cpp-config-file'. --- 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."