]> code.delx.au - gnu-emacs/blobdiff - lisp/obsolete/options.el
Update copyright year to 2015
[gnu-emacs] / lisp / obsolete / options.el
index 1b475e9e98bbedf4de334e53c564f1ac6638b607..35ec7fd33ca13693f9c57ac26f9c0f0f682061b7 100644 (file)
@@ -1,8 +1,9 @@
 ;;; options.el --- edit Options command for Emacs
 
-;; Copyright (C) 1985, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 2001-2015 Free Software Foundation, Inc.
 
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
+;; Obsolete-since: 22.1
 
 ;; This file is part of GNU Emacs.
 
@@ -21,8 +22,6 @@
 
 ;;; Commentary:
 
-;; This file has been obsolete since Emacs 22.1.
-
 ;; This code provides functions to list and edit the values of all global
 ;; option variables known to loaded Emacs Lisp code.  There are two entry
 ;; points, `list-options' and `edit' options'.  The latter enters a major
@@ -43,7 +42,7 @@ It is now better to use Customize instead."
       (princ "This facility is obsolete; we recommend using M-x customize instead.")
 
       (mapatoms (function (lambda (sym)
-                           (if (user-variable-p sym)
+                           (if (custom-variable-p sym)
                                (setq vars (cons sym vars))))))
       (setq vars (sort vars 'string-lessp))
       (while vars
@@ -89,7 +88,7 @@ The Custom feature is intended to make this obsolete."
 ;; Edit Options mode is suitable only for specially formatted data.
 (put 'Edit-options-mode 'mode-class 'special)
 
-(defun Edit-options-mode ()
+(define-derived-mode Edit-options-mode emacs-lisp-mode "Options"
   "\\<Edit-options-mode-map>\
 Major mode for editing Emacs user option settings.
 Special commands are:
@@ -101,17 +100,9 @@ Changed values made by these commands take effect immediately.
 
 Each variable description is a paragraph.
 For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] move back and forward by paragraphs."
-  (kill-all-local-variables)
-  (set-syntax-table emacs-lisp-mode-syntax-table)
-  (use-local-map Edit-options-mode-map)
-  (make-local-variable 'paragraph-separate)
-  (setq paragraph-separate "[^\^@-\^?]")
-  (make-local-variable 'paragraph-start)
-  (setq paragraph-start "\t")
-  (setq truncate-lines t)
-  (setq major-mode 'Edit-options-mode)
-  (setq mode-name "Options")
-  (run-mode-hooks 'Edit-options-mode-hook))
+  (setq-local paragraph-separate "[^\^@-\^?]")
+  (setq-local paragraph-start "\t")
+  (setq-local truncate-lines t))
 
 (defun Edit-options-set () (interactive)
   (Edit-options-modify