;;; 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.")
(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)))
(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
(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."