aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-12-09 21:41:33 +0000
committerKarl Heuer1997-12-09 21:41:33 +0000
commitf50dc5d269a57c47b1001514cf9eda1cbcde95b9 (patch)
treebeb2503d8d3f31adda485f5593f28a7d585b4c64
parenta32d7856d303ee3a1f787b86291f7018cff780bb (diff)
downloademacs-f50dc5d269a57c47b1001514cf9eda1cbcde95b9.tar.gz
emacs-f50dc5d269a57c47b1001514cf9eda1cbcde95b9.zip
(customize-changed-options): New function.
(customize-version-lessp): New function.
-rw-r--r--lisp/cus-edit.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index cac6684cbbb..8a272f6cd0f 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -856,6 +856,39 @@ are shown; the contents of those subgroups are initially hidden."
856 (custom-unlispify-tag-name symbol)))) 856 (custom-unlispify-tag-name symbol))))
857 857
858;;;###autoload 858;;;###autoload
859(defun customize-changed-options (since-version)
860 "Customize all user option variables whose default values changed recently.
861This means, in other words, variables defined with a `:new' option."
862 (interactive "sCustomize options changed, since version (default all versions): ")
863 (if (equal since-version "")
864 (setq since-version nil))
865 (let ((found nil))
866 (mapatoms (lambda (symbol)
867 (and (boundp symbol)
868 (let ((version (get symbol 'custom-version)))
869 (and version
870 (or (null since-version)
871 (customize-version-lessp since-version version))))
872 (setq found
873 (cons (list symbol 'custom-variable) found)))))
874 (if (not found)
875 (error "No user options have changed defaults in recent Emacs versions")
876 (custom-buffer-create (custom-sort-items found t nil)
877 "*Customize Changed Options*"))))
878
879(defun customize-version-lessp (version1 version2)
880 (let (major1 major2 minor1 minor2)
881 (string-match "\\([0-9]+\\)[.]\\([0-9]+\\)" version1)
882 (setq major1 (read (match-string 1 version1)))
883 (setq minor1 (read (match-string 2 version1)))
884 (string-match "\\([0-9]+\\)[.]\\([0-9]+\\)" version2)
885 (setq major2 (read (match-string 1 version2)))
886 (setq minor2 (read (match-string 2 version2)))
887 (or (< major1 major2)
888 (and (= major1 major2)
889 (< minor1 minor2)))))
890
891;;;###autoload
859(defalias 'customize-variable-other-window 'customize-option-other-window) 892(defalias 'customize-variable-other-window 'customize-option-other-window)
860 893
861;;;###autoload 894;;;###autoload