# HG changeset patch # User Juanma Barranquero # Date 1195750187 0 # Node ID 005ad07af67018f236da1a977a2f665331119388 # Parent 3360920fa85beb5772604ec0ce5c615da359f710 (custom-mode): Define with `define-derived-mode'. Set `show-trailing-whitespace' to nil. diff -r 3360920fa85b -r 005ad07af670 lisp/cus-edit.el --- a/lisp/cus-edit.el Thu Nov 22 16:16:09 2007 +0000 +++ b/lisp/cus-edit.el Thu Nov 22 16:49:47 2007 +0000 @@ -4504,7 +4504,7 @@ (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 @@ 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 @@ (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 @@ (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)