+Sun Jan 26 09:28:31 1997 Per Abrahamsen <abraham@dina.kvl.dk>
+
+ * gnus-group.el: Organized customization options, and moved group
+ definitions to `gnus.el'.
+ * gnus-sum.el: Ditto.
+ * gnus.el: Ditto.
+
+Sun Jan 26 07:37:40 1997 Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+
+ * gnus.el: Autoload topic function.
+
+ * gnus-topic.el (gnus-topic-set-parameters): Quote strings to
+ enter into dribble file.
+
+ * gnus-salt.el (gnus-pick-setup-message): Also restore right
+ config on sending.
+
+ * gnus.el (gnus-group-startup-message): Add a space to the
+ beginning of the version string.
+
+Sat Jan 25 12:17:56 1997 Lars Magne Ingebrigtsen <menja.larsi@ifi.uio.no>
+
+ * gnus.el: Gnus v5.4.1 is released.
+
Sat Jan 25 10:59:31 1997 Lars Magne Ingebrigtsen <menja.larsi@ifi.uio.no>
* gnus.el: Red Gnus v0.84 is released.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
-;; Version: 1.15
+;; Version: 1.20
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
(define-widget-keywords :custom-prefixes :custom-menu :custom-show
:custom-magic :custom-state :custom-level :custom-form
- :custom-set :custom-save :custom-reset)
+ :custom-set :custom-save :custom-reset-current :custom-reset-saved
+ :custom-reset-factory)
;;; Utilities.
(and (listp sexp)
(memq (car sexp) '(lambda)))
(stringp sexp)
- (numberp sexp))
+ (numberp sexp)
+ (and (fboundp 'characterp)
+ (funcall (intern "characterp") sexp)))
sexp
(list 'quote sexp)))
'("Custom"
["Set" custom-set t]
["Save" custom-save t]
- ["Reset" custom-reset t]
+ ["Reset to Current" custom-reset-current t]
+ ["Reset to Saved" custom-reset-saved t]
+ ["Reset to Factory Settings" custom-reset-factory t]
["Info" (Info-goto-node "(custom)The Customization Buffer") t]))
(defcustom custom-mode-hook nil
\\[widget-button-press] Activate button under point.
\\[custom-set] Set all modifications.
\\[custom-save] Make all modifications default.
-\\[custom-reset] Undo all modifications.
+\\[custom-reset-current] Reset all modified options.
+\\[custom-reset-saved] Reset all modified or set options.
+\\[custom-reset-factory] Reset all options.
Entry to this mode calls the value of `custom-mode-hook'
if that value is non-nil."
children))
(custom-save-all))
-(defun custom-reset ()
- "Reset all modified group members."
+(defvar custom-reset-menu
+ '(("Current" . custom-reset-current)
+ ("Saved" . custom-reset-saved)
+ ("Factory Settings" . custom-reset-factory))
+ "Alist of actions for the `Reset' button.
+The key is a string containing the name of the action, the value is a
+lisp function taking the widget as an element which will be called
+when the action is chosen.")
+
+(defun custom-reset (event)
+ "Select item from reset menu."
+ (let* ((completion-ignore-case t)
+ (answer (widget-choose "Reset to"
+ custom-reset-menu
+ event)))
+ (if answer
+ (funcall answer))))
+
+(defun custom-reset-current ()
+ "Reset all modified group members to their current value."
+ (interactive)
+ (let ((children custom-options))
+ (mapcar (lambda (child)
+ (when (eq (widget-get child :custom-state) 'modified)
+ (widget-apply child :custom-reset-current)))
+ children)))
+
+(defun custom-reset-saved ()
+ "Reset all modified or set group members to their saved value."
(interactive)
(let ((children custom-options))
(mapcar (lambda (child)
(when (eq (widget-get child :custom-state) 'modified)
- (widget-apply child :custom-reset)))
+ (widget-apply child :custom-reset-current)))
+ children)))
+
+(defun custom-reset-factory ()
+ "Reset all modified, set, or saved group members to their factory settings."
+ (interactive)
+ (let ((children custom-options))
+ (mapcar (lambda (child)
+ (when (eq (widget-get child :custom-state) 'modified)
+ (widget-apply child :custom-reset-current)))
children)))
;;; The Customize Commands
:tag "Reset"
:help-echo "Push me to undo all modifications.."
:action (lambda (widget &optional event)
- (custom-reset)))
+ (custom-reset event)))
(widget-insert "\n")
(widget-setup))
(define-widget 'custom-manual 'info-link
"Link to the manual entry for this customization option."
+ :help-echo "Push me to read the manual."
:tag "Manual")
;;; The `custom-magic' Widget.
(unknown "?" italic "\
unknown, you should not see this.")
(hidden "-" default "\
-hidden, press the stars `*' on the line above to show.")
+hidden, press the state button to show.")
(invalid "x" custom-invalid-face "\
the value displayed for this item is invalid and cannot be set.")
(modified "*" custom-modified-face "\
children)
(when custom-magic-show
(push (widget-create-child-and-convert widget 'choice-item
+ :help-echo "\
+Push me to change the state of this item."
:format "%[%t%]"
:tag "State")
children)
(insert-char ? indent))))
(push (widget-create-child-and-convert widget 'choice-item
:button-face face
+ :help-echo "\
+Push me to change the state."
:format "%[%t%]"
:tag (if lisp
(concat "(" magic ")")
(setq load (car loads)
loads (cdr loads))
(cond ((symbolp load)
- (require load))
- ((member load load-history))
+ (condition-case nil
+ (require load)
+ (error nil)))
+ ((assoc load load-history))
(t
- (load-library load))))))
+ (condition-case nil
+ (load-library load)
+ (error nil)))))))
(defun custom-load-widget (widget)
"Load all dependencies for WIDGET."
;;; The `custom-variable' Widget.
+(defface custom-variable-sample-face '((t (:underline t)))
+ "Face used for unpushable variable tags."
+ :group 'customize)
+
+(defface custom-variable-button-face '((t (:underline t :bold t)))
+ "Face used for pushable variable tags."
+ :group 'customize)
+
(define-widget 'custom-variable 'custom
"Customize variable."
:format "%l%v%m%h%a"
:action 'custom-variable-action
:custom-set 'custom-variable-set
:custom-save 'custom-variable-save
- :custom-reset 'custom-redraw)
+ :custom-reset-current 'custom-redraw
+ :custom-reset-saved 'custom-variable-reset-saved
+ :custom-reset-factory 'custom-variable-reset-factory)
(defun custom-variable-value-create (widget)
"Here is where you edit the variables value."
(setq form 'lisp)))
;; Now we can create the child widget.
(cond ((eq state 'hidden)
- ;; Make hidden value easy to show.
- (insert tag ": ..."))
+ ;; Indicate hidden value.
+ (push (widget-create-child-and-convert
+ widget 'item
+ :format "%{%t%}: ..."
+ :sample-face 'custom-variable-sample-face
+ :tag tag
+ :parent widget)
+ children))
((eq form 'lisp)
;; In lisp mode edit the saved value when possible.
(let* ((value (cond ((get symbol 'saved-value)
(custom-quote (default-value symbol)))
(t
(custom-quote (widget-get conv :value))))))
- (push (widget-create-child-and-convert widget 'sexp
- :tag (symbol-name symbol)
- :parent widget
- :value value)
+ (push (widget-create-child-and-convert
+ widget 'sexp
+ :button-face 'custom-variable-button-face
+ :tag (symbol-name symbol)
+ :parent widget
+ :value value)
children)))
(t
;; Edit mode.
(push (widget-create-child-and-convert
widget type
:tag tag
+ :button-face 'custom-variable-button-face
+ :sample-face 'custom-variable-sample-face
:value value)
children)))
;; Now update the state.
("Edit Lisp" . custom-variable-edit-lisp)
("Set" . custom-variable-set)
("Save" . custom-variable-save)
- ("Reset" . custom-redraw)
- ("Reset to Default" . custom-variable-default)
- ("Reset to Factory Settings" . custom-variable-factory))
+ ("Reset to Current" . custom-redraw)
+ ("Reset to Saved" . custom-variable-reset-saved)
+ ("Reset to Factory Settings" . custom-variable-reset-factory))
"Alist of actions for the `custom-variable' widget.
The key is a string containing the name of the action, the value is a
lisp function taking the widget as an element which will be called
(defun custom-variable-action (widget &optional event)
"Show the menu for `custom-variable' WIDGET.
Optional EVENT is the location for the menu."
- (let* ((completion-ignore-case t)
- (answer (widget-choose (symbol-name (widget-get widget :value))
- custom-variable-menu
- event)))
- (if answer
- (funcall answer widget))))
+ (if (eq (widget-get widget :custom-state) 'hidden)
+ (progn
+ (widget-put widget :custom-state 'unknown)
+ (custom-redraw widget))
+ (let* ((completion-ignore-case t)
+ (answer (widget-choose (symbol-name (widget-get widget :value))
+ custom-variable-menu
+ event)))
+ (if answer
+ (funcall answer widget)))))
(defun custom-variable-edit (widget)
"Edit value of WIDGET."
(custom-variable-state-set widget)
(custom-redraw-magic widget)))
-(defun custom-variable-default (widget)
- "Restore the default value for the variable being edited by WIDGET."
+(defun custom-variable-reset-saved (widget)
+ "Restore the saved value for the variable being edited by WIDGET."
(let ((symbol (widget-value widget)))
(if (get symbol 'saved-value)
(condition-case nil
(set symbol (eval (car (get symbol 'saved-value))))
(error nil))
- (error "No default value for %s" symbol))
+ (error "No saved value for %s" symbol))
(put symbol 'customized-value nil)
(widget-put widget :custom-state 'unknown)
(custom-redraw widget)))
-(defun custom-variable-factory (widget)
+(defun custom-variable-reset-factory (widget)
"Restore the factory setting for the variable being edited by WIDGET."
(let ((symbol (widget-value widget)))
(if (get symbol 'factory-value)
;;; The `custom-face' Widget.
+(defface custom-face-tag-face '((t (:underline t)))
+ "Face used for face tags."
+ :group 'customize)
+
(define-widget 'custom-face 'custom
"Customize face."
- :format "%l%[%t%]: %s%m%h%a%v"
+ :format "%l%{%t%}: %s%m%h%a%v"
:format-handler 'custom-face-format-handler
+ :sample-face 'custom-face-tag-face
:help-echo "Push me to set or reset this face."
:documentation-property 'face-documentation
:value-create 'custom-face-value-create
:action 'custom-face-action
:custom-set 'custom-face-set
:custom-save 'custom-face-save
- :custom-reset 'custom-redraw
+ :custom-reset-current 'custom-redraw
+ :custom-reset-saved 'custom-face-reset-saved
+ :custom-reset-factory 'custom-face-reset-factory
:custom-menu 'custom-face-menu-create)
(defun custom-face-format-handler (widget escape)
(not (custom-facep symbol))
(copy-face 'custom-face-empty symbol))
(setq child (widget-create-child-and-convert
- widget 'custom-level
- :format "(%[%t%])\n"
- :button-face symbol
- (if (eq state 'hidden) "*** show ***" "hide"))))
+ widget 'item
+ :format "(%{%t%})\n"
+ :sample-face symbol
+ :tag "sample")))
(t
(custom-format-handler widget escape)))
(when child
(defvar custom-face-menu
'(("Set" . custom-face-set)
("Save" . custom-face-save)
- ("Reset to Default" . custom-face-default)
- ("Reset to Factory Setting" . custom-face-factory))
+ ("Reset to Saved" . custom-face-reset-saved)
+ ("Reset to Factory Setting" . custom-face-reset-factory))
"Alist of actions for the `custom-face' widget.
The key is a string containing the name of the action, the value is a
lisp function taking the widget as an element which will be called
(defun custom-face-action (widget &optional event)
"Show the menu for `custom-face' WIDGET.
Optional EVENT is the location for the menu."
- (when (eq (widget-get widget :custom-state) 'hidden)
- (error "You cannot edit a hidden face"))
- (let* ((completion-ignore-case t)
- (symbol (widget-get widget :value))
- (answer (widget-choose (symbol-name symbol) custom-face-menu event)))
- (if answer
- (funcall answer widget))))
+ (if (eq (widget-get widget :custom-state) 'hidden)
+ (progn
+ (widget-put widget :custom-state 'unknown)
+ (custom-redraw widget))
+ (let* ((completion-ignore-case t)
+ (symbol (widget-get widget :value))
+ (answer (widget-choose (symbol-name symbol)
+ custom-face-menu event)))
+ (if answer
+ (funcall answer widget)))))
(defun custom-face-set (widget)
"Make the face attributes in WIDGET take effect."
(custom-face-state-set widget)
(custom-redraw-magic widget)))
-(defun custom-face-default (widget)
+(defun custom-face-reset-saved (widget)
"Restore WIDGET to the face's default attributes."
(let* ((symbol (widget-value widget))
(child (car (widget-get widget :children)))
(custom-face-state-set widget)
(custom-redraw-magic widget)))
-(defun custom-face-factory (widget)
+(defun custom-face-reset-factory (widget)
"Restore WIDGET to the face's factory settings."
(let* ((symbol (widget-value widget))
(child (car (widget-get widget :children)))
;;; The `custom-group' Widget.
+(defcustom custom-group-tag-faces '(custom-group-tag-face-1)
+ ;; In XEmacs, this ought to play games with font size.
+ "Face used for group tags.
+The first member is used for level 1 groups, the second for level 2,
+and so forth. The remaining group tags are shown with
+`custom-group-tag-face'."
+ :type '(repeat face)
+ :group 'customize)
+
+(defface custom-group-tag-face-1 '((((class color)
+ (background dark))
+ (:foreground "pink" :underline t))
+ (((class color)
+ (background light))
+ (:foreground "red" :underline t))
+ (t (:underline t)))
+ "Face used for group tags.")
+
+(defface custom-group-tag-face '((((class color)
+ (background dark))
+ (:foreground "light blue" :underline t))
+ (((class color)
+ (background light))
+ (:foreground "blue" :underline t))
+ (t (:underline t)))
+ "Face used for low level group tags."
+ :group 'customize)
+
(define-widget 'custom-group 'custom
"Customize group."
- :format "%l%[%t%]:%L\n%m%h%a%v"
+ :format "%l%{%t%}:%L\n%m%h%a%v"
+ :sample-face-get 'custom-group-sample-face-get
:documentation-property 'group-documentation
:help-echo "Push me to set or reset all members of this group."
:value-create 'custom-group-value-create
:action 'custom-group-action
:custom-set 'custom-group-set
:custom-save 'custom-group-save
- :custom-reset 'custom-group-reset
+ :custom-reset-current 'custom-group-reset-current
+ :custom-reset-saved 'custom-group-reset-saved
+ :custom-reset-factory 'custom-group-reset-factory
:custom-menu 'custom-group-menu-create)
+(defun custom-group-sample-face-get (widget)
+ ;; Use :sample-face.
+ (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces)
+ 'custom-group-tag-face))
+
(defun custom-group-value-create (widget)
(let ((state (widget-get widget :custom-state)))
(unless (eq state 'hidden)
(defvar custom-group-menu
'(("Set" . custom-group-set)
("Save" . custom-group-save)
- ("Reset" . custom-group-reset))
+ ("Reset to Current" . custom-group-reset-current)
+ ("Reset to Saved" . custom-group-reset-saved)
+ ("Reset to Factory" . custom-group-reset-factory))
"Alist of actions for the `custom-group' widget.
The key is a string containing the name of the action, the value is a
lisp function taking the widget as an element which will be called
(defun custom-group-action (widget &optional event)
"Show the menu for `custom-group' WIDGET.
Optional EVENT is the location for the menu."
- (let* ((completion-ignore-case t)
- (answer (widget-choose (symbol-name (widget-get widget :value))
- custom-group-menu
- event)))
- (if answer
- (funcall answer widget))))
+ (if (eq (widget-get widget :custom-state) 'hidden)
+ (progn
+ (widget-put widget :custom-state 'unknown)
+ (custom-redraw widget))
+ (let* ((completion-ignore-case t)
+ (answer (widget-choose (symbol-name (widget-get widget :value))
+ custom-group-menu
+ event)))
+ (if answer
+ (funcall answer widget)))))
(defun custom-group-set (widget)
"Set changes in all modified group members."
(widget-apply child :custom-save)))
children )))
-(defun custom-group-reset (widget)
+(defun custom-group-reset-current (widget)
"Reset all modified group members."
(let ((children (widget-get widget :children)))
(mapcar (lambda (child)
(when (eq (widget-get child :custom-state) 'modified)
- (widget-apply child :custom-reset)))
+ (widget-apply child :custom-reset-current)))
+ children )))
+
+(defun custom-group-reset-saved (widget)
+ "Reset all modified or set group members."
+ (let ((children (widget-get widget :children)))
+ (mapcar (lambda (child)
+ (when (memq (widget-get child :custom-state) '(modified set))
+ (widget-apply child :custom-reset-saved)))
+ children )))
+
+(defun custom-group-reset-factory (widget)
+ "Reset all modified, set, or saved group members."
+ (let ((children (widget-get widget :children)))
+ (mapcar (lambda (child)
+ (when (memq (widget-get child :custom-state)
+ '(modified set saved))
+ (widget-apply child :custom-reset-factory)))
children )))
(defun custom-group-state-update (widget)
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
-;; Version: 1.15
+;; Version: 1.20
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Code:
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, faces
-;; Version: 1.15
+;; Version: 1.20
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
(require 'gnus-win)
(require 'gnus-undo)
-(defgroup gnus-group nil
- "Group buffers."
- :group 'gnus)
-
(defcustom gnus-group-archive-directory
"/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list/"
"*The address of the (ding) archives."
- :group 'gnus-group
+ :group 'gnus-group-foreign
:type 'directory)
(defcustom gnus-group-recent-archive-directory
"/ftp@ftp.hpc.uh.edu:/pub/emacs/ding-list-recent/"
"*The address of the most recent (ding) articles."
- :group 'gnus-group
+ :group 'gnus-group-foreign
:type 'directory)
;; Suggested by Andrew Eskilsson <pi92ae@lelle.pt.hk-r.se>.
(defcustom gnus-no-groups-message "No news is horrible news"
"*Message displayed by Gnus when no groups are available."
- :group 'gnus-group
+ :group 'gnus-start
:type 'string)
(defcustom gnus-keep-same-level nil
than the current level.
If this variable is `best', Gnus will make the next newsgroup the one
with the best level."
- :group 'gnus-group
+ :group 'gnus-group-levels
:type '(choice (const nil)
(const best)
(sexp :tag "other" t)))
(defcustom gnus-group-goto-unread t
"*If non-nil, movement commands will go to the next unread and subscribed group."
- :group 'gnus-group
+ :link '(custom-manual "(gnus)Group Maneuvering")
+ :group 'gnus-group-various
:type 'boolean)
(defcustom gnus-goto-next-group-when-activating t
"*If non-nil, the \\<gnus-group-mode-map>\\[gnus-group-get-new-news-this-group] command will advance point to the next group."
- :group 'gnus-group
+ :link '(custom-manual "(gnus)Scanning New Messages")
+ :group 'gnus-group-various
:type 'boolean)
(defcustom gnus-permanently-visible-groups nil
"*Regexp to match groups that should always be listed in the group buffer.
This means that they will still be listed when there are no unread
articles in the groups."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type 'regexp)
(defcustom gnus-list-groups-with-ticked-articles t
"*If non-nil, list groups that have only ticked articles.
If nil, only list groups that have unread articles."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type 'boolean)
(defcustom gnus-group-default-list-level gnus-level-subscribed
"*Default listing level.
Ignored if `gnus-group-use-permanent-levels' is non-nil."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type 'integer)
(defcustom gnus-group-list-inactive-groups t
"*If non-nil, inactive groups will be listed."
- :group 'gnus-group
+ :group 'gnus-group-listing
+ :group 'gnus-group-levels
:type 'boolean)
(defcustom gnus-group-sort-function 'gnus-group-sort-by-alphabet
This variable can also be a list of sorting functions. In that case,
the most significant sort function should be the last function in the
list."
- :group 'gnus-group
+ :group 'gnus-group-listing
+ :link '(custom-manual "(gnus)Sorting Groups")
:type '(radio (function-item gnus-group-sort-by-alphabet)
(function-item gnus-group-sort-by-real-name)
(function-item gnus-group-sort-by-unread)
Also note that if you change the format specification to include any
of these specs, you must probably re-start Gnus to see them go into
effect."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'string)
(defcustom gnus-group-mode-line-format "Gnus: %%b {%M\%:%S}"
%S The native news server.
%M The native select method.
%: \":\" if %S isn't \"\"."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'string)
(defcustom gnus-group-mode-hook nil
"Hook for Gnus group mode."
- :group 'gnus-group
+ :group 'gnus-group-various
:options '(gnus-topic-mode)
:type 'hook)
(defcustom gnus-group-menu-hook nil
"Hook run after the creation of the group mode menu."
- :group 'gnus-group
+ :group 'gnus-group-various
:type 'hook)
(defcustom gnus-group-catchup-group-hook nil
"Hook run when catching up a group from the group buffer."
- :group 'gnus-group
+ :group 'gnus-group-various
+ :link '(custom-manual "(gnus)Group Data")
:type 'hook)
(defcustom gnus-group-update-group-hook nil
"Hook called when updating group lines."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'hook)
(defcustom gnus-group-prepare-function 'gnus-group-prepare-flat
than this number should be displayed.
The only current function implemented is `gnus-group-prepare-flat'."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type 'function)
(defcustom gnus-group-prepare-hook nil
"Hook called after the group buffer has been generated.
If you want to modify the group buffer, you can use this hook."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type 'hook)
(defcustom gnus-suspend-gnus-hook nil
"Hook called when suspending (not exiting) Gnus."
- :group 'gnus-group
+ :group 'gnus-exit
:type 'hook)
(defcustom gnus-exit-gnus-hook nil
"Hook called when exiting Gnus."
- :group 'gnus-group
+ :group 'gnus-exit
:type 'hook)
(defcustom gnus-after-exiting-gnus-hook nil
"Hook called after exiting Gnus."
- :group 'gnus-group
+ :group 'gnus-exit
:type 'hook)
(defcustom gnus-group-update-hook '(gnus-group-highlight-line)
The default function `gnus-group-highlight-line' will
highlight the line according to the `gnus-group-highlight'
variable."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'hook)
(defcustom gnus-useful-groups
(error "Couldn't find doc group"))
file))))))
"Alist of useful group-server pairs."
- :group 'gnus-group
+ :group 'gnus-group-listing
:type '(repeat (list (string :tag "Description")
(string :tag "Name")
(sexp :tag "Method"))))
level: The level of the group.
score: The score of the group.
ticked: The number of ticked articles."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type '(repeat (cons (sexp :tag "Form") face)))
(defcustom gnus-new-mail-mark ?%
"Mark used for groups with new mail."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'character)
;;; Internal variables
(set-buffer gnus-summary-buffer)
gnus-pick-mode))
(message-add-action
- '(gnus-configure-windows 'pick t) 'exit 'postpone 'kill)))
+ '(gnus-configure-windows 'pick t) 'send 'exit 'postpone 'kill)))
(defvar gnus-pick-line-number 1)
(defun gnus-pick-line-number ()
(require 'gnus-int)
(require 'gnus-undo)
-;; Belongs to to gnus.el
-(defgroup gnus-various nil
- "Other Gnus options."
- :link '(custom-manual "(gnus)Various Various")
- :group 'gnus)
-
-;; Belongs to to gnus-group.el
-(defgroup gnus-group-select nil
- "Selecting a Group."
- :link '(custom-manual "(gnus)Selecting a Group")
- :group 'gnus-group)
-
-;; Belongs to to gnus-uu.el
-(defgroup gnus-extract-view nil
- "Viewing extracted files."
- :link '(custom-manual "(gnus)Viewing Files")
- :group 'gnus-extract)
-
-;; These belong here.
-(defgroup gnus-summary nil
- "Summary buffers."
- :link '(custom-manual "(gnus)The Summary Buffer")
- :group 'gnus)
-
-(defgroup gnus-summary-exit nil
- "Leaving summary buffers."
- :link '(custom-manual "(gnus)Exiting the Summary Buffer")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-marks nil
- "Marks used in summary buffers."
- :link '(custom-manual "(gnus)Marking Articles")
- :group 'gnus-summary)
-
-(defgroup gnus-thread nil
- "Ordering articles according to replies."
- :link '(custom-manual "(gnus)Threading")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-format nil
- "Formatting of the summary buffer."
- :link '(custom-manual "(gnus)Summary Buffer Format")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-choose nil
- "Choosing Articles."
- :link '(custom-manual "(gnus)Choosing Articles")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-maneuvering nil
- "Summary movement commands."
- :link '(custom-manual "(gnus)Summary Maneuvering")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-mail nil
- "Mail group commands."
- :link '(custom-manual "(gnus)Mail Group Commands")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-sort nil
- "Sorting the summary buffer."
- :link '(custom-manual "(gnus)Sorting")
- :group 'gnus-summary)
-
-(defgroup gnus-summary-visual nil
- "Highlighting and menus in the summary buffer."
- :link '(custom-manual "(gnus)Summary Highlighting")
- :group 'gnus-visual
- :group 'gnus-summary)
-
-(defgroup gnus-summary-various nil
- "Various summary buffer options."
- :link '(custom-manual "(gnus)Various Summary Stuff")
- :group 'gnus-summary)
-
(defcustom gnus-kill-summary-on-exit t
"*If non-nil, kill the summary buffer when you exit from it.
If nil, the summary will become a \"*Dead Summary*\" buffer, and
(nconc (cadr top) (list nil)))
(setcar (nthcdr 3 (cadr top)) parameters)
(gnus-dribble-enter
- (format "(gnus-topic-set-parameters %s '%S)" topic parameters))))
+ (format "(gnus-topic-set-parameters %S '%S)" topic parameters))))
(defun gnus-group-topic-parameters (group)
"Compute the group parameters for GROUP taking into account inheritance from topics."
"Starting your favorite newsreader."
:group 'gnus)
+;; These belong to gnus-group.el.
+(defgroup gnus-group nil
+ "Group buffers."
+ :link '(custom-manual "(gnus)The Group Buffer")
+ :group 'gnus)
+
+(defgroup gnus-group-foreign nil
+ "Foreign groups."
+ :link '(custom-manual "(gnus)Foreign Groups")
+ :group 'gnus-group)
+
+(defgroup gnus-group-levels nil
+ "Group levels."
+ :link '(custom-manual "(gnus)Group Levels")
+ :group 'gnus-group)
+
+(defgroup gnus-group-select nil
+ "Selecting a Group."
+ :link '(custom-manual "(gnus)Selecting a Group")
+ :group 'gnus-group)
+
+(defgroup gnus-group-listing nil
+ "Showing slices of the group list."
+ :link '(custom-manual "(gnus)Listing Groups")
+ :group 'gnus-group)
+
+(defgroup gnus-group-visual nil
+ "Sorting the group buffer."
+ :link '(custom-manual "(gnus)Group Buffer Format")
+ :group 'gnus-group
+ :group 'gnus-visual)
+
+(defgroup gnus-group-various nil
+ "Various group options."
+ :link '(custom-manual "(gnus)Scanning New Messages")
+ :group 'gnus-group)
+
+;; These belong to gnus-sum.el.
+(defgroup gnus-summary nil
+ "Summary buffers."
+ :link '(custom-manual "(gnus)The Summary Buffer")
+ :group 'gnus)
+
+(defgroup gnus-summary-exit nil
+ "Leaving summary buffers."
+ :link '(custom-manual "(gnus)Exiting the Summary Buffer")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-marks nil
+ "Marks used in summary buffers."
+ :link '(custom-manual "(gnus)Marking Articles")
+ :group 'gnus-summary)
+
+(defgroup gnus-thread nil
+ "Ordering articles according to replies."
+ :link '(custom-manual "(gnus)Threading")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-format nil
+ "Formatting of the summary buffer."
+ :link '(custom-manual "(gnus)Summary Buffer Format")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-choose nil
+ "Choosing Articles."
+ :link '(custom-manual "(gnus)Choosing Articles")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-maneuvering nil
+ "Summary movement commands."
+ :link '(custom-manual "(gnus)Summary Maneuvering")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-mail nil
+ "Mail group commands."
+ :link '(custom-manual "(gnus)Mail Group Commands")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-sort nil
+ "Sorting the summary buffer."
+ :link '(custom-manual "(gnus)Sorting")
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-visual nil
+ "Highlighting and menus in the summary buffer."
+ :link '(custom-manual "(gnus)Summary Highlighting")
+ :group 'gnus-visual
+ :group 'gnus-summary)
+
+(defgroup gnus-summary-various nil
+ "Various summary buffer options."
+ :link '(custom-manual "(gnus)Various Summary Stuff")
+ :group 'gnus-summary)
+
+;; Belongs to to gnus-uu.el
+(defgroup gnus-extract-view nil
+ "Viewing extracted files."
+ :link '(custom-manual "(gnus)Viewing Files")
+ :group 'gnus-extract)
+
+;; Other
(defgroup gnus-score nil
"Score and kill file handling."
:group 'gnus )
-(defconst gnus-version-number "5.4.1"
+(defgroup gnus-exit nil
+ "Exiting gnus."
+ :link '(custom-manual "(gnus)Exiting Gnus")
+ :group 'gnus)
+
+(defgroup gnus-various nil
+ "Other Gnus options."
+ :link '(custom-manual "(gnus)Various Various")
+ :group 'gnus)
+
+(defconst gnus-version-number "5.4.3"
"Version number for this version of Gnus.")
(defconst gnus-version (format "Gnus v%s" gnus-version-number)
;; Fontify some.
(put-text-property (point-min) (point-max) 'face 'gnus-splash-face)
(goto-char (point-min))
- (setq mode-line-buffer-identification gnus-version)
+ (setq mode-line-buffer-identification (concat " " gnus-version))
(setq gnus-simple-splash t)
(set-buffer-modified-p t))
Asia: nctuccca.edu.tw /USENET/FAQ
hwarang.postech.ac.kr /pub/usenet
ftp.hk.super.net /mirror/faqs"
- :group 'gnus-group
+ :group 'gnus-group-various
:type '(choice directory
(repeat directory)))
"*The number of articles which indicates a large newsgroup.
If the number of articles in a newsgroup is greater than this value,
confirmation is required for selecting the newsgroup."
- :group 'gnus-group
+ :group 'gnus-group-select
:type 'integer)
(defcustom gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
'(gnus-summary-expire-articles)
"A hook called when preparing to exit from the summary buffer.
It calls `gnus-summary-expire-articles' by default."
- :group 'gnus-summary
+ :group 'gnus-summary-exit
:type 'hook)
(defcustom gnus-novice-user t
(defcustom gnus-interactive-catchup t
"*If non-nil, require your confirmation when catching up a group."
- :group 'gnus-group
+ :group 'gnus-group-select
:type 'boolean)
(defcustom gnus-interactive-exit t
"*If non-nil, require your confirmation when exiting Gnus."
- :group 'gnus-group
+ :group 'gnus-exit
:type 'boolean)
(defcustom gnus-extract-address-components 'gnus-extract-address-components
"*Groups in which to automatically mark read articles as expirable.
If non-nil, this should be a regexp that should match all groups in
which to perform auto-expiry. This only makes sense for mail groups."
- :group 'gnus-group
+ :group 'gnus-mail
:type '(choice (const nil)
regexp))
expiring - which means that all read articles will be deleted after
\(say) one week. (This only goes for mail groups and the like, of
course.)"
- :group 'gnus-group
+ :group 'gnus-mail
:type '(choice (const nil)
regexp))
(defcustom gnus-group-uncollapsed-levels 1
"Number of group name elements to leave alone when making a short group name."
- :group 'gnus-group
+ :group 'gnus-group-visual
:type 'integer)
(defcustom gnus-group-use-permanent-levels nil
"*If non-nil, once you set a level, Gnus will use this level."
- :group 'gnus-group
+ :group 'gnus-group-levels
:type 'boolean)
;; Hooks.
gnus-score-find-trace gnus-score-file-name)
("gnus-cus" :interactive t gnus-group-customize gnus-score-customize)
("gnus-topic" :interactive t gnus-topic-mode)
- ("gnus-topic" gnus-topic-remove-group)
+ ("gnus-topic" gnus-topic-remove-group gnus-topic-set-parameters)
("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
("gnus-uu" :interactive t
This restriction may disappear in later versions of Gnus."
:type 'string
- :group 'gnus-summary)
+ :group 'gnus-summary-format)
;;;
;;; Skeleton keymaps
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: extensions
-;; Version: 1.15
+;; Version: 1.20
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
;;; Compatibility.
-(or (fboundp 'event-point)
- ;; XEmacs function missing in Emacs.
- (defun event-point (event)
- "Return the character position of the given mouse-motion, button-press,
+(unless (fboundp 'event-point)
+ ;; XEmacs function missing in Emacs.
+ (defun event-point (event)
+ "Return the character position of the given mouse-motion, button-press,
or button-release event. If the event did not occur over a window, or did
not occur over text, then this returns nil. Otherwise, it returns an index
into the buffer visible in the event's window."
- (posn-point (event-start event))))
+ (posn-point (event-start event))))
+
+(unless (fboundp 'error-message-string)
+ ;; Emacs function missing in XEmacs.
+ (defun error-message-string (obj)
+ "Convert an error value to an error message."
+ (let ((buf (get-buffer-create " *error-message*")))
+ (erase-buffer buf)
+ (funcall (intern "display-error") obj buf)
+ (buffer-string buf))))
;;; Customization.
(defun widget-specify-field-update (widget from to)
;; Specify editable button for WIDGET between FROM and TO.
- (let ((map (widget-get widget :keymap))
+ (let ((map (or (widget-get widget :keymap)
+ widget-keymap))
(face (or (widget-get widget :value-face)
'widget-field-face)))
(set-text-properties from to (list 'field widget
'local-map map
'face face))
(unless (widget-get widget :size)
- (put-text-property to (1+ to) 'face face))))
+ (add-text-properties to (1+ to) (list 'field widget
+ 'face face
+ 'local-map map
+ 'keymap map)))))
(defun widget-specify-button (widget from to)
;; Specify button for WIDGET between FROM and TO.
'end-open t
'face face))))
+(defun widget-specify-sample (widget from to)
+ ;; Specify sample for WIDGET between FROM and TO.
+ (let ((face (widget-apply widget :sample-face-get)))
+ (when face
+ (add-text-properties from to (list 'start-open t
+ 'end-open t
+ 'face face)))))
+
(defun widget-specify-doc (widget from to)
;; Specify documentation for WIDGET between FROM and TO.
(add-text-properties from to (list 'widget-doc widget
:offset 0
:format-handler 'widget-default-format-handler
:button-face-get 'widget-default-button-face-get
+ :sample-face-get 'widget-default-sample-face-get
:delete 'widget-default-delete
:value-set 'widget-default-value-set
:value-inline 'widget-default-value-inline
(tag (widget-get widget :tag))
(doc (widget-get widget :doc))
button-begin button-end
+ sample-begin sample-end
doc-begin doc-end
value-pos)
(insert (widget-get widget :format))
(setq button-begin (point)))
((eq escape ?\])
(setq button-end (point)))
+ ((eq escape ?\{)
+ (setq sample-begin (point)))
+ ((eq escape ?\})
+ (setq sample-end (point)))
((eq escape ?n)
(when (widget-get widget :indent)
(insert "\n")
(setq value-pos (point))))
(t
(widget-apply widget :format-handler escape)))))
- ;; Specify button and doc, and insert value.
+ ;; Specify button, sample, and doc, and insert value.
(and button-begin button-end
(widget-specify-button widget button-begin button-end))
+ (and sample-begin sample-end
+ (widget-specify-sample widget sample-begin sample-end))
(and doc-begin doc-end
(widget-specify-doc widget doc-begin doc-end))
(when value-pos
;; Use :button-face or widget-button-face
(or (widget-get widget :button-face) 'widget-button-face))
+(defun widget-default-sample-face-get (widget)
+ ;; Use :sample-face.
+ (widget-get widget :sample-face))
+
(defun widget-default-delete (widget)
;; Remove widget from the buffer.
(let ((from (widget-get widget :from))
(define-widget 'link 'item
"An embedded link."
+ :help-echo "Push me to follow the link."
:format "%[_%t_%]")
;;; The `info-link' Widget.
:tag "Character"
:value 0
:size 1
- :format "%t: %v\n"
+ :format "%{%t%}: %v\n"
:type-error "This field should contain a character"
:value-to-internal (lambda (widget value)
(if (integerp value)
(define-widget 'list 'group
"A lisp list."
:tag "List"
- :format "%t:\n%v")
+ :format "%{%t%}:\n%v")
(define-widget 'vector 'group
"A lisp vector."
:tag "Vector"
- :format "%t:\n%v"
+ :format "%{%t%}:\n%v"
:match 'widget-vector-match
:value-to-internal (lambda (widget value) (append value nil))
:value-to-external (lambda (widget value) (apply 'vector value)))
(define-widget 'cons 'group
"A cons-cell."
:tag "Cons-cell"
- :format "%t:\n%v"
+ :format "%{%t%}:\n%v"
:match 'widget-cons-match
:value-to-internal (lambda (widget value)
(list (car value) (cdr value)))
(define-widget 'radio 'radio-button-choice
"A union of several sexp types."
:tag "Choice"
- :format "%t:\n%v")
+ :format "%{%t%}:\n%v")
(define-widget 'repeat 'editable-list
"A variable length homogeneous list."
:tag "Repeat"
- :format "%t:\n%v%i\n")
+ :format "%{%t%}:\n%v%i\n")
(define-widget 'set 'checklist
"A list of members from a fixed set."
:tag "Set"
- :format "%t:\n%v")
+ :format "%{%t%}:\n%v")
(define-widget 'boolean 'toggle
"To be nil or non-nil, that is the question."
:tag "Boolean"
- :format "%t: %v")
+ :format "%{%t%}: %v")
;;; The `color' Widget.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: help, extensions, faces, hypermedia
-;; Version: 1.15
+;; Version: 1.20
;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
;;; Commentary:
(set (car keywords) (car keywords)))
(setq keywords (cdr keywords)))))))
-(define-widget-keywords :case-fold :widget-doc
+(define-widget-keywords :sample-face :sample-face-get :case-fold
+ :widget-doc
:create :convert-widget :format :value-create :offset :extra-offset
:tag :doc :from :to :args :value :value-from :value-to :action
:value-set :value-delete :match :parent :delete :menu-tag-get
@comment node-name, next, previous, up
@top The Customization Library
-Version: 1.15
+Version: 1.20
@menu
* Introduction::
@example
*** custom-background-mode: default
+ State: this item is unchanged from its factory setting.
[ ] [?] The brightness of the background.
@end example
file name, it is displayed in an editable field, i.e. you can edit it
using the standard emacs editing commands.
+@item State: this item is unchanged from its factory setting.
+The state line. This line will explain the state of the option,
+e.g. whether it is currently hidden, or whether it has been modified or
+not. Activating the button will allow you to change the state, e.g. set
+or reset the changes you have made. This is explained in detail in the
+following sections.
+
@item [ ]
-The state button. This look of this button will indicate the state of
-the option, e.g. whether it is currently hidden, or whether it has been
-modified or not. Activating the button will allow you to change the
-state, e.g. set or reset the changes you have made. This is explained
-in detail in the following sections.
+The magic button. This is an abbreviated version of the state line.
@item [?]
The documentation button. If the documentation is more than one line,
@node The State Button, The Customization Buttons, The Group Options, The Customization Buffer
@comment node-name, next, previous, up
-@subsection The State Button
+@subsection The State Line and The Magic Button
-The state button has two purposes. The first is to hold the state menu,
+The state line has two purposes. The first is to hold the state menu,
as described in the previous sections. The second is to indicate the
-state of each customization item. This is done by the character inside
-the brackets. The following states have been defined, the first that
-applies to the current item will be used:
+state of each customization item.
+
+For the magic button, this is done by the character inside the brackets.
+The following states have been defined, the first that applies to the
+current item will be used:
@table @samp
@item -
of a member of the group, that prefix will be ignored when creating a
tag for that member.
@end table
-
@end defun
@node Declaring Variables, Declaring Faces, Declaring Groups, Declarations
Add an `examples' section, with explained examples of custom type
definitions.
+@item
+Support undo using lmi's @file{gnus-undo.el}.
+
+@item
+Make it possible to append to `choice', `radio', and `set' options.
+
@end itemize
@contents
``@sc{gnus}''. New vs. old.
The first ``proper'' release of Gnus 5 was done in November 1995 when it
-was included in the Emacs 19.30 distribution.
+was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
+plus 15 Gnus 5.0 releases).
-In May 1996 the next Gnus generation (aka. ``September Gnus'') was
-released under the name ``Gnus 5.2''.
+In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
+releases)) was released under the name ``Gnus 5.2'' (40 releases).
On July 28th 1996 work on Red Gnus was begun, and it was released on
-January 25th 1997 as ``Gnus 5.4''.
+January 25th 1997 (after 84 releases) as ``Gnus 5.4''.
If you happen upon a version of Gnus that has a name that is prefixed --
``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'' --
Rajappa Iyer,
Randell Jesup,
Fred Johansen,
+Greg Klanderman,
Peter Skov Knudsen,
Shuhei Kobayashi, @c Kobayashi
Thor Kristoffersen,
\input texinfo.tex
-@c $Id: widget.texi,v 1.1 1997/01/25 22:46:31 steve Exp $
+@c $Id: widget.texi,v 1.2 1997/01/26 19:51:51 steve Exp $
@c %**start of header
@setfilename widget
@comment node-name, next, previous, up
@top The Emacs Widget Library
-Version: 1.15
+Version: 1.20
@menu
* Introduction::
@itemx %]
The text inside will be marked as a button.
+@item %@{
+@itemx %@}
+The text inside will be displayed with the face specified by
+@code{:sample-face}.
+
@item %v
This will be replaces with the buffer representation of the widgets
value. What this is depends on the widget type.
when inserting the grayed out subwidget, and let the widget-specify
functions check that variable.
+@item
+Flag to make @code{widget-move} skip a specified button.
+
+@item
+Document `helper' functions for defining new widgets.
+
+@item
+Show button menus on mouse down.
+
+@item
+Activate the item this is below the mouse when the button is
+released, not the item this is below the mouse when the button is
+pressed. Dired and grep gets this right.
+
+@item
+Use @samp{@@deffn Widget} to document widgets.
+
+@item
+Document global keywords in one place.
+
+Document keywords particular to a specific widget in the widget
+definition.
+
+Document the `default' widget first.
+
+Split, when needed, keywords into those useful for normal
+customization, those primarily useful when deriving, and those who
+represent runtime information.
@end itemize
@contents