X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/114f9c96795aff3b51b9060d7c9c1b77debcc99a..afb22577de2f06542780870a0431d0ee533eb3ac:/lisp/obsolete/options.el diff --git a/lisp/obsolete/options.el b/lisp/obsolete/options.el index 808617d4b9..a8b131611a 100644 --- a/lisp/obsolete/options.el +++ b/lisp/obsolete/options.el @@ -1,9 +1,9 @@ ;;; options.el --- edit Options command for Emacs -;; Copyright (C) 1985, 2001, 2002, 2003, 2004, 2005, -;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1985, 2001-2016 Free Software Foundation, Inc. -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org +;; Obsolete-since: 22.1 ;; This file is part of GNU Emacs. @@ -22,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 @@ -44,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 @@ -90,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" "\\\ Major mode for editing Emacs user option settings. Special commands are: @@ -102,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 @@ -147,5 +137,4 @@ For convenience, the characters \\[backward-paragraph] and \\[forward-paragraph] (provide 'options) -;; arch-tag: d18211a1-f3fb-48c9-a449-d5acde406a3c ;;; options.el ends here