[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/cus-edit.el [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/cus-edit.el [lexbind] |
Date: |
Tue, 14 Oct 2003 19:51:41 -0400 |
Index: emacs/lisp/cus-edit.el
diff -c emacs/lisp/cus-edit.el:1.157.2.1 emacs/lisp/cus-edit.el:1.157.2.2
*** emacs/lisp/cus-edit.el:1.157.2.1 Fri Apr 4 01:20:01 2003
--- emacs/lisp/cus-edit.el Tue Oct 14 19:50:52 2003
***************
*** 1,6 ****
;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
;;
! ;; Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
;;
;; Author: Per Abrahamsen <address@hidden>
;; Maintainer: FSF
--- 1,6 ----
;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
;;
! ;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <address@hidden>
;; Maintainer: FSF
***************
*** 74,79 ****
--- 74,80 ----
(defgroup emulations nil
"Emulations of other editors."
+ :link '(custom-manual "(emacs)Emulation")
:group 'editing)
(defgroup mouse nil
***************
*** 88,98 ****
"Interfacing to external utilities."
:group 'emacs)
- (defgroup bib nil
- "Code related to the `bib' bibliography processor."
- :tag "Bibliography"
- :group 'external)
-
(defgroup processes nil
"Process, subshell, compilation, and job control support."
:group 'external
--- 89,94 ----
***************
*** 117,122 ****
--- 113,119 ----
(defgroup c nil
"Support for the C language and related languages."
+ :link '(custom-manual "(ccmode)")
:group 'languages)
(defgroup tools nil
***************
*** 141,146 ****
--- 138,144 ----
(defgroup news nil
"Support for netnews reading and posting."
+ :link '(custom-manual "(gnus)")
:group 'applications)
(defgroup games nil
***************
*** 195,200 ****
--- 193,199 ----
(defgroup i18n nil
"Internationalization and alternate character-set support."
+ :link '(custom-manual "(emacs)International")
:group 'environment
:group 'editing)
***************
*** 245,252 ****
(defgroup customize '((widgets custom-group))
"Customization of the Customization support."
:link '(custom-manual "(elisp)Customization")
- :link '(url-link :tag "(Old?) Development Page"
- "http://www.dina.kvl.dk/~abraham/custom/")
:prefix "custom-"
:group 'help)
--- 244,249 ----
***************
*** 272,277 ****
--- 269,275 ----
(defgroup abbrev-mode nil
"Word abbreviations mode."
+ :link '(custom-manual "(emacs)Abbrevs")
:group 'abbrev)
(defgroup alloc nil
***************
*** 281,286 ****
--- 279,285 ----
(defgroup undo nil
"Undoing changes in buffers."
+ :link '(custom-manual "(emacs)Undo")
:group 'editing)
(defgroup modeline nil
***************
*** 289,294 ****
--- 288,294 ----
(defgroup fill nil
"Indenting and filling text."
+ :link '(custom-manual "(emacs)Filling Text")
:group 'editing)
(defgroup editing-basics nil
***************
*** 321,326 ****
--- 321,327 ----
(defgroup minibuffer nil
"Controling the behaviour of the minibuffer."
+ :link '(custom-manual "(emacs)Minibuffer")
:group 'environment)
(defgroup keyboard nil
***************
*** 349,354 ****
--- 350,356 ----
(defgroup windows nil
"Windows within a frame."
+ :link '(custom-manual "(emacs)Windows")
:group 'environment)
;;; Utilities.
***************
*** 1189,1195 ****
;; If we pass BUFFER to `bury-buffer', the buffer isn't removed from
;; the window.
(defun custom-bury-buffer (buffer)
! (bury-buffer))
(defcustom custom-buffer-done-function 'custom-bury-buffer
"*Function called to remove a Custom buffer when the user is done with it.
--- 1191,1198 ----
;; If we pass BUFFER to `bury-buffer', the buffer isn't removed from
;; the window.
(defun custom-bury-buffer (buffer)
! (with-current-buffer buffer
! (bury-buffer)))
(defcustom custom-buffer-done-function 'custom-bury-buffer
"*Function called to remove a Custom buffer when the user is done with it.
***************
*** 1205,1210 ****
--- 1208,1238 ----
:type 'integer
:group 'custom-buffer)
+ (defun custom-get-fresh-buffer (name)
+ "Get a fresh new buffer with name NAME.
+ If the buffer already exist, clean it up to be like new.
+ Beware: it's not quite like new. Good enough for custom, but maybe
+ not for everybody."
+ ;; To be more complete, we should also kill all permanent-local variables,
+ ;; but it's not needed for custom.
+ (let ((buf (get-buffer name)))
+ (when (and buf (buffer-local-value 'buffer-file-name buf))
+ ;; This will check if the file is not saved.
+ (kill-buffer buf)
+ (setq buf nil))
+ (if (null buf)
+ (get-buffer-create name)
+ (with-current-buffer buf
+ (kill-all-local-variables)
+ (run-hooks 'kill-buffer-hook)
+ ;; Delete overlays before erasing the buffer so the overlay hooks
+ ;; don't get run spuriously when we erase the buffer.
+ (let ((ols (overlay-lists)))
+ (dolist (ol (nconc (car ols) (cdr ols)))
+ (delete-overlay ol)))
+ (erase-buffer)
+ buf))))
+
;;;###autoload
(defun custom-buffer-create (options &optional name description)
"Create a buffer containing OPTIONS.
***************
*** 1212,1220 ****
OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
! (unless name (setq name "*Customization*"))
! (kill-buffer (get-buffer-create name))
! (pop-to-buffer (get-buffer-create name))
(custom-buffer-create-internal options description))
;;;###autoload
--- 1240,1246 ----
OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
! (pop-to-buffer (custom-get-fresh-buffer (or name "*Customization*")))
(custom-buffer-create-internal options description))
;;;###autoload
***************
*** 1225,1238 ****
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
(unless name (setq name "*Customization*"))
- (kill-buffer (get-buffer-create name))
(let ((window (selected-window))
(pop-up-windows t)
(special-display-buffer-names nil)
(special-display-regexps nil)
(same-window-buffer-names nil)
(same-window-regexps nil))
! (pop-to-buffer (get-buffer-create name))
(custom-buffer-create-internal options description)
(select-window window)))
--- 1251,1263 ----
SYMBOL is a customization option, and WIDGET is a widget for editing
that option."
(unless name (setq name "*Customization*"))
(let ((window (selected-window))
(pop-up-windows t)
(special-display-buffer-names nil)
(special-display-regexps nil)
(same-window-buffer-names nil)
(same-window-regexps nil))
! (pop-to-buffer (custom-get-fresh-buffer name))
(custom-buffer-create-internal options description)
(select-window window)))
***************
*** 1392,1399 ****
(unless group
(setq group 'emacs))
(let ((name "*Customize Browser*"))
! (kill-buffer (get-buffer-create name))
! (pop-to-buffer (get-buffer-create name)))
(custom-mode)
(widget-insert "\
Square brackets show active fields; type RET or click mouse-1
--- 1417,1423 ----
(unless group
(setq group 'emacs))
(let ((name "*Customize Browser*"))
! (pop-to-buffer (custom-get-fresh-buffer name)))
(custom-mode)
(widget-insert "\
Square brackets show active fields; type RET or click mouse-1
***************
*** 2440,2446 ****
becomes the backup value, so you can get it again."
(let* ((symbol (widget-value widget))
(set (or (get symbol 'custom-set) 'set-default))
- (comment-widget (widget-get widget :comment-widget))
(value (get symbol 'saved-value))
(comment (get symbol 'saved-variable-comment)))
(cond ((or value comment)
--- 2464,2469 ----
***************
*** 2464,2471 ****
The value that was current before this operation
becomes the backup value, so you can get it again."
(let* ((symbol (widget-value widget))
! (set (or (get symbol 'custom-set) 'set-default))
! (comment-widget (widget-get widget :comment-widget)))
(if (get symbol 'standard-value)
(progn
(custom-variable-backup-value widget)
--- 2487,2493 ----
The value that was current before this operation
becomes the backup value, so you can get it again."
(let* ((symbol (widget-value widget))
! (set (or (get symbol 'custom-set) 'set-default)))
(if (get symbol 'standard-value)
(progn
(custom-variable-backup-value widget)
***************
*** 2586,2592 ****
(unless (widget-get widget :inactive)
(let ((tag (custom-face-edit-attribute-tag widget))
(from (copy-marker (widget-get widget :from)))
- (to (widget-get widget :to))
(value (widget-value widget))
(inhibit-read-only t)
(inhibit-modification-hooks t))
--- 2608,2613 ----
***************
*** 2982,3009 ****
"Set the state of WIDGET."
(let* ((symbol (widget-value widget))
(comment (get symbol 'face-comment))
! tmp temp)
! (widget-put widget :custom-state
! (cond ((progn
! (setq tmp (get symbol 'customized-face))
! (setq temp (get symbol 'customized-face-comment))
! (or tmp temp))
! (if (equal temp comment)
! 'set
! 'changed))
! ((progn
! (setq tmp (get symbol 'saved-face))
! (setq temp (get symbol 'saved-face-comment))
! (or tmp temp))
! (if (equal temp comment)
! 'saved
! 'changed))
! ((get symbol 'face-defface-spec)
! (if (equal comment nil)
! 'standard
! 'changed))
! (t
! 'rogue)))))
(defun custom-face-action (widget &optional event)
"Show the menu for `custom-face' WIDGET.
--- 3003,3036 ----
"Set the state of WIDGET."
(let* ((symbol (widget-value widget))
(comment (get symbol 'face-comment))
! tmp temp
! (state
! (cond ((progn
! (setq tmp (get symbol 'customized-face))
! (setq temp (get symbol 'customized-face-comment))
! (or tmp temp))
! (if (equal temp comment)
! 'set
! 'changed))
! ((progn
! (setq tmp (get symbol 'saved-face))
! (setq temp (get symbol 'saved-face-comment))
! (or tmp temp))
! (if (equal temp comment)
! 'saved
! 'changed))
! ((get symbol 'face-defface-spec)
! (if (equal comment nil)
! 'standard
! 'changed))
! (t
! 'rogue))))
! ;; If the user called set-face-attribute to change the default
! ;; for new frames, this face is "set outside of Customize".
! (if (and (not (eq state 'rogue))
! (get symbol 'face-modified))
! (setq state 'changed))
! (widget-put widget :custom-state state)))
(defun custom-face-action (widget &optional event)
"Show the menu for `custom-face' WIDGET.
***************
*** 3721,3728 ****
(and (not (boundp symbol))
(not (eq (get symbol 'force-value)
'rogue))))))
! (comment (get symbol 'saved-variable-comment))
! sep)
;; Check `requests'.
(dolist (request requests)
(when (and (symbolp request) (not (featurep request)))
--- 3748,3754 ----
(and (not (boundp symbol))
(not (eq (get symbol 'force-value)
'rogue))))))
! (comment (get symbol 'saved-variable-comment)))
;; Check `requests'.
(dolist (request requests)
(when (and (symbolp request) (not (featurep request)))
***************
*** 4087,4090 ****
--- 4113,4117 ----
(provide 'cus-edit)
+ ;;; arch-tag: 64533aa4-1b1a-48c3-8812-f9dc718e8a6f
;;; cus-edit.el ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/cus-edit.el [lexbind],
Miles Bader <=