From 21590f63ea589bdd953f88a720b406a3b0513f52 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 1 Jan 1996 23:47:49 +0000 Subject: [PATCH] (cpp-config-file): New variable. (cpp-edit-load): Use `cpp-config-file'. (cpp-edit-save): Use `cpp-config-file'. --- lisp/progmodes/cpp.el | 15 +++++++++------ 1 file 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." -- 2.39.2