# HG changeset patch # User Juri Linkov # Date 1204231537 0 # Node ID 55f83f57568d965955c5b7a5d16ad10f996a96ab # Parent fc2a30344c2d05dc3853858cfc70a3fe4e8640e9 (custom-mode-map, custom-mode-link-map): Rename `custom-mode' to `Custom-mode' in docstrings. (custom-buffer-create-internal, customize-browse): Rename `custom-mode' to `Custom-mode'. (custom-mode-hook): Rename to `Custom-mode-hook'. (Custom-mode-hook): Renamed from `custom-mode-hook'. (custom-mode): Rename to `Custom-mode'. (Custom-mode): Renamed from `custom-mode'. Doc fix. (custom-mode): Add backward-compatible non-interactive variant of `Custom-mode' that simply calls `Custom-mode'. Mark it obsoleted. (custom-mode-hook): Mark it as obsolete alias of `Custom-mode-hook'. diff -r fc2a30344c2d -r 55f83f57568d lisp/cus-edit.el --- a/lisp/cus-edit.el Thu Feb 28 19:12:01 2008 +0000 +++ b/lisp/cus-edit.el Thu Feb 28 20:45:37 2008 +0000 @@ -480,7 +480,7 @@ (define-key map "n" 'widget-forward) (define-key map "p" 'widget-backward) map) - "Keymap for `custom-mode'.") + "Keymap for `Custom-mode'.") (defvar custom-mode-link-map (let ((map (make-keymap))) @@ -489,7 +489,7 @@ (define-key map [down-mouse-1] 'mouse-drag-region) (define-key map [mouse-2] 'widget-move-and-invoke) map) - "Local keymap for links in `custom-mode'.") + "Local keymap for links in `Custom-mode'.") (defvar custom-field-keymap (let ((map (copy-keymap widget-field-keymap))) @@ -1578,7 +1578,7 @@ 'custom-button-pressed-unraised)))) (defun custom-buffer-create-internal (options &optional description) - (custom-mode) + (Custom-mode) (let ((init-file (or custom-file user-init-file))) ;; Insert verbose help at the top of the custom buffer. (when custom-buffer-verbose-help @@ -1684,7 +1684,7 @@ (setq group 'emacs)) (let ((name "*Customize Browser*")) (pop-to-buffer (custom-get-fresh-buffer name))) - (custom-mode) + (Custom-mode) (widget-insert (format "\ %s buttons; type RET or click mouse-1 on a button to invoke its action. @@ -4595,7 +4595,7 @@ ;;; `custom-tool-bar-map' used to be set up here. This will fail to ;;; DTRT when `display-graphic-p' returns nil during compilation. Hence -;;; we set this up lazily in `custom-mode'. +;;; we set this up lazily in `Custom-mode'. (defvar custom-tool-bar-map nil "Keymap for toolbar in Custom mode.") @@ -4625,16 +4625,16 @@ (parent (downcase (widget-get button :tag)))) (customize-group parent))))) -(defcustom custom-mode-hook nil +(defcustom Custom-mode-hook nil "Hook called when entering Custom mode." :type 'hook - :group 'custom-buffer ) + :group 'custom-buffer) (defun custom-state-buffer-message (widget) (if (eq (widget-get (widget-get widget :parent) :custom-state) 'modified) (message "To install your edits, invoke [State] and choose the Set operation"))) -(define-derived-mode custom-mode nil "Custom" +(define-derived-mode Custom-mode nil "Custom" "Major mode for editing customization buffers. The following commands are available: @@ -4654,7 +4654,7 @@ Erase customizations; set options and buffer text to the standard values. \\[Custom-reset-standard] -Entry to this mode calls the value of `custom-mode-hook' +Entry to this mode calls the value of `Custom-mode-hook' if that value is non-nil." (use-local-map custom-mode-map) (easy-menu-add Custom-mode-menu) @@ -4695,7 +4695,15 @@ (set (make-local-variable 'widget-link-suffix) "")) (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)) +(put 'Custom-mode 'mode-class 'special) + +;; backward-compatibility +(defun custom-mode () + "Non-interactive variant of `Custom-mode'." + (Custom-mode)) +(make-obsolete 'custom-mode 'Custom-mode "23.0") (put 'custom-mode 'mode-class 'special) +(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.0") (dolist (regexp '("^No user option defaults have been changed since Emacs "