gnu-emacs-sources
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

options+.el - extensions to GNU `options.el'


From: Drew Adams
Subject: options+.el - extensions to GNU `options.el'
Date: Tue, 16 Jan 2001 21:35:20 -0500

;;; options+.el --- Extensions to `options.el'.
;; 
;; Emacs Lisp Archive Entry
;; Filename: options+.el
;; Description: Extensions to `options.el'.
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 1996-2001, Drew Adams, all rights reserved.
;; Created: Tue Feb  6 16:50:23 1996
;; Version: $Id: options+.el,v 1.4 2001/01/09 01:56:45 dadams Exp $
;; Last-Updated: Mon Jan  8 17:56:36 2001
;;           By: dadams
;;     Update #: 68
;; Keywords: docs, help, internal, local
;; Compatibility: GNU Emacs 20.x
;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Commentary: 
;; 
;;    Extensions to `options.el'.
;;
;;
;;  ***** NOTE: The following function defined in `options.el' has
;;              been REDEFINED HERE:
;;
;;  `list-options' - Runs `list-options-hook' at end.
;;
;;
;;  This file should be loaded after loading the standard GNU file
;;  `options.el'.  So, in your `~/.emacs' file, do this:
;;  (eval-after-load "options" '(progn (require 'options+))
;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Change log:
;; 
;; RCS $Log: options+.el,v $
;; RCS Revision 1.4  2001/01/09 01:56:45  dadams
;; RCS Adapted file header for Emacs Lisp Archive.
;; RCS
;; RCS Revision 1.3  2001/01/03 17:42:46  dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.2  2001/01/03 01:01:33  dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.1  2000/09/14 17:23:29  dadams
;; RCS Initial revision
;; RCS
; Revision 1.1  1997/03/20  17:51:21  dadams
; Initial revision
;
; Revision 1.7  1996/07/01  13:20:01  dadams
; Require when compile: options.el.
;
; Revision 1.6  1996/06/28  14:32:35  dadams
; (trivial)
;
; Revision 1.5  1996/04/05  14:33:30  dadams
; Improved Commentary:  List redefinitions.
;
; Revision 1.4  1996/03/19  09:30:39  dadams
; list-options: Added in-progress msgs.
;
; Revision 1.3  1996/03/08  13:49:08  dadams
; Copyright.
;
; Revision 1.2  1996/02/12  10:03:35  dadams
; Updated header keywords (for finder).
;
; Revision 1.1  1996/02/06  16:21:37  dadams
; Initial revision
;; 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 
;;; Code: 

(require 'options)

(provide 'options+)

;;;;;;;;;;;;;;;;;;;;;


;; REPLACES ORIGINAL in `options.el': 
;; 1. Runs `list-options-hook' at end.
;; 2. Added messages.
;;;###autoload
(defun list-options ()
  "Display a list of Emacs user options, with values and documentation.
Runs hook `list-options-hook' at the end."
  (interactive)
  (message "Looking up options (user variables) ...")
  (with-output-to-temp-buffer "*List Options*"
    (let (vars)
      (mapatoms (function (lambda (sym)
                            (if (user-variable-p sym)
                                (setq vars (cons sym vars))))))
      (setq vars (sort vars 'string-lessp))
      (while vars
        (let ((sym (car vars)))
          (when (boundp sym)
            (princ ";; ")
            (prin1 sym)
            (princ ":\n\t")
            (prin1 (symbol-value sym))
            (terpri)
            (princ (substitute-command-keys 
                    (documentation-property sym 'variable-documentation)))
            (princ "\n;;\n"))
        (setq vars (cdr vars))))
      (message "Looking up options (user variables) ... done.")
      (with-current-buffer "*List Options*"
        (Edit-options-mode)
        (run-hooks 'list-options-hook)
        (setq buffer-read-only t)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; `options+.el' ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]