aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero <[email protected]>2007-11-22 16:50:11 +0000
committerJuanma Barranquero <[email protected]>2007-11-22 16:50:11 +0000
commitd1a3873fe8d0f068393425456e6e08f60e347970 (patch)
tree059ca2e8cccd45f8626366d477e34dffead9953f
parent6af1696d06d2221a3bc72557b8a0851c62326cba (diff)
(custom-mode): Define with `define-derived-mode'.
Set `show-trailing-whitespace' to nil.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/cus-edit.el9
2 files changed, 6 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e4334c65b4..67552437f3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2007-11-22 Juanma Barranquero <[email protected]>
+ * cus-edit.el (custom-mode): Define with `define-derived-mode'.
+ Set `show-trailing-whitespace' to nil.
+
* dired.el (make-symbolic-link):
* dired-aux.el (mailcap-parse-mailcaps, mailcap-parse-mimetypes)
(mailcap-extension-to-mime, mailcap-mime-info, make-symbolic-link):
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index cdb39c1fe5..b9e462ec05 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4504,7 +4504,7 @@ If several parents are listed, go to the first of them."
(if (eq (widget-get (widget-get widget :parent) :custom-state) 'modified)
(message "To install your edits, invoke [State] and choose the Set operation")))
-(defun custom-mode ()
+(define-derived-mode custom-mode nil "Custom"
"Major mode for editing customization buffers.
The following commands are available:
@@ -4526,9 +4526,6 @@ Erase customizations; set options
Entry to this mode calls the value of `custom-mode-hook'
if that value is non-nil."
- (kill-all-local-variables)
- (setq major-mode 'custom-mode
- mode-name "Custom")
(use-local-map custom-mode-map)
(easy-menu-add Custom-mode-menu)
(set (make-local-variable 'tool-bar-map) custom-tool-bar-map)
@@ -4538,6 +4535,7 @@ if that value is non-nil."
(setq widget-documentation-face 'custom-documentation)
(make-local-variable 'widget-button-face)
(setq widget-button-face custom-button)
+ (setq show-trailing-whitespace nil)
;; We need this because of the "More" button on docstrings.
;; Otherwise clicking on "More" can push point offscreen, which
@@ -4555,8 +4553,7 @@ if that value is non-nil."
(set (make-local-variable 'widget-push-button-suffix) "")
(set (make-local-variable 'widget-link-prefix) "")
(set (make-local-variable 'widget-link-suffix) ""))
- (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
- (run-mode-hooks 'custom-mode-hook))
+ (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t))
(put 'custom-mode 'mode-class 'special)