1 ;;; custsets.el --- Sets of named customizations
3 ;; Author: Lennart Borgman (lennart O borgman A gmail O com)
4 ;; Created: 2008-03-25T00:17:06+0100 Mon
11 ;; Features that might be required by this library:
15 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19 ;; After an idea expressed by among other Stephen Turnbull on the
22 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29 ;; This program is free software; you can redistribute it and/or
30 ;; modify it under the terms of the GNU General Public License as
31 ;; published by the Free Software Foundation; either version 2, or
32 ;; (at your option) any later version.
34 ;; This program is distributed in the hope that it will be useful,
35 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
36 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37 ;; General Public License for more details.
39 ;; You should have received a copy of the GNU General Public License
40 ;; along with this program; see the file COPYING. If not, write to
41 ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
42 ;; Floor, Boston, MA 02110-1301, USA.
44 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48 (defcustom custsets-sets
54 "Sets of customizations."
57 (defun custsets-turn-on (set-name)
58 (interactive "sCustomization set: ")
59 (let ((set (assoc-string set-name custsets-sets t)))
61 (error "Can't find customization set %s" set-name))
62 (dolist (opt-rec (cdr set))
63 (let* ((opt (car opt-rec))
65 (saved-opt (get opt 'saved-value))
66 (saved-val saved-opt) ;; fix-me
68 (format "You have currently customized %s to %s. Change this to %s? "
70 (format "Customize %s to %s? " opt val)))
73 (customize-set-variable opt val)
74 (customize-set-value opt val)
75 (customize-mark-to-save opt))
82 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
83 ;;; custsets.el ends here