(defun list-options nil "\ Display a list of Emacs user options, with values and documentation." (interactive) (byte-code "!q )Đ!\"L @! !! J! \"!!!)A )" [vars sym nil get-buffer-create "*List Options*" Edit-options-mode mapatoms (lambda (sym) (byte-code "! B" [sym vars user-variable-p] 3)) sort string-lessp princ ";; " prin1 ": " terpri substitute-command-keys documentation-property variable-documentation " ;; "] 17)) (defun edit-options nil "\ Edit a list of Emacs user option values. Selects a buffer containing such a list, in which there are commands to set the option values. Type \\[describe-mode] in that buffer for a list of commands." (interactive) (byte-code " !" [nil list-options pop-to-buffer "*List Options*"] 3)) (defvar Edit-options-mode-map (let ((map (make-keymap))) (define-key map "s" (quote Edit-options-set)) (define-key map "x" (quote Edit-options-toggle)) (define-key map "1" (quote Edit-options-t)) (define-key map "0" (quote Edit-options-nil)) (define-key map "p" (quote backward-paragraph)) (define-key map " " (quote forward-paragraph)) (define-key map "n" (quote forward-paragraph)) map) "\ ") (put (quote Edit-options-mode) (quote mode-class) (quote special)) (defun Edit-options-mode nil "\ Major mode for editing Emacs user option settings. Special commands are: s -- set variable point points at. New value read using minibuffer. x -- toggle variable, t -> nil, nil -> t. 1 -- set variable to t. 0 -- set variable to nil. Each variable description is a paragraph. For convenience, the characters p and n move back and forward by paragraphs." (byte-code " ! !!̉!͉ʼnΉω" [emacs-lisp-mode-syntax-table Edit-options-mode-map paragraph-separate paragraph-start truncate-lines t major-mode mode-name kill-all-local-variables set-syntax-table use-local-map make-local-variable "[^ -]" "^ " Edit-options-mode "Options"] 7)) (defun Edit-options-set nil (interactive) (byte-code "!" [nil Edit-options-modify (lambda (var) (eval-minibuffer (concat "New " (symbol-name var) ": ")))] 2)) (defun Edit-options-toggle nil (interactive) (byte-code "!" [nil Edit-options-modify (lambda (var) (not (symbol-value var)))] 2)) (defun Edit-options-t nil (interactive) (byte-code "!" [nil Edit-options-modify (lambda (var) t)] 2)) (defun Edit-options-nil nil (interactive) (byte-code "!" [nil Edit-options-modify (lambda (var) nil)] 2)) (defun Edit-options-modify (modfun) (byte-code "!!` `S\" bp!) b!! \"L)!Jp\"*)" [var pos modfun nil re-search-backward "^;; " forward-char 3 narrow-to-region end-of-line read forward-line 1 funcall kill-sexp prin1] 12))