nnimap.el (nnimap-open-connection): Look for the "imaps" entry in the .authinfo if...
[bpt/emacs.git] / lisp / cus-theme.el
index 502220d..77ea09c 100644 (file)
@@ -1,17 +1,19 @@
 ;;; cus-theme.el -- custom theme creation user interface
 ;;
-;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2002, 2003, 2004, 2005,
+;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 ;;
 ;; Author: Alex Schroeder <alex@gnu.org>
 ;; Maintainer: FSF
 ;; Keywords: help, faces
+;; Package: emacs
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +21,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
 
@@ -37,7 +37,6 @@
     (suppress-keymap map)
     (define-key map "n" 'widget-forward)
     (define-key map "p" 'widget-backward)
-    (define-key map [mouse-1] 'widget-move-and-invoke)
     map)
   "Keymap for `custom-new-theme-mode'.")
 
@@ -99,7 +98,7 @@ the directory " custom-theme-directory "\n\n")
   (widget-insert "  ")
   (widget-create 'push-button
                 :notify (lambda (&rest ignore)
-                          (when (y-or-n-p "Discard current changes?")
+                          (when (y-or-n-p "Discard current changes? ")
                             (kill-buffer (current-buffer))
                             (customize-create-theme)))
                 "Reset Buffer")
@@ -137,7 +136,7 @@ the directory " custom-theme-directory "\n\n")
   (widget-insert "\n")
   (widget-create 'push-button
                 :notify (lambda (&rest ignore)
-                          (when (y-or-n-p "Discard current changes?")
+                          (when (y-or-n-p "Discard current changes? ")
                             (kill-buffer (current-buffer))
                             (customize-create-theme)))
                 "Reset Buffer")
@@ -154,15 +153,15 @@ the directory " custom-theme-directory "\n\n")
 
 (defun custom-theme-add-variable (symbol)
   (interactive "vVariable name: ")
-  (save-excursion
-    (goto-char custom-theme-insert-variable-marker)
-    (cond ((assq symbol custom-theme-variables)
-          (message "%s is already in the theme" (symbol-name symbol)))
-         ((not (boundp symbol))
-          (message "%s is not defined as a variable" (symbol-name symbol)))
-         ((eq symbol 'custom-enabled-themes)
-          (message "Custom theme cannot contain `custom-enabled-themes'"))
-         (t
+  (cond ((assq symbol custom-theme-variables)
+        (message "%s is already in the theme" (symbol-name symbol)))
+       ((not (boundp symbol))
+        (message "%s is not defined as a variable" (symbol-name symbol)))
+       ((eq symbol 'custom-enabled-themes)
+        (message "Custom theme cannot contain `custom-enabled-themes'"))
+       (t
+        (save-excursion
+          (goto-char custom-theme-insert-variable-marker)
           (widget-insert "\n")
           (let ((widget (widget-create 'custom-variable
                                        :tag (custom-unlispify-tag-name symbol)
@@ -225,13 +224,13 @@ Optional EVENT is the location for the menu."
 
 (defun custom-theme-add-face (symbol)
   (interactive (list (read-face-name "Face name" nil nil)))
-  (save-excursion
-    (goto-char custom-theme-insert-face-marker)
-    (cond ((assq symbol custom-theme-faces)
-          (message "%s is already in the theme" (symbol-name symbol)))
-         ((not (facep symbol))
-          (message "%s is not defined as a face" (symbol-name symbol)))
-         (t
+  (cond ((assq symbol custom-theme-faces)
+        (message "%s is already in the theme" (symbol-name symbol)))
+       ((not (facep symbol))
+        (message "%s is not defined as a face" (symbol-name symbol)))
+       (t
+        (save-excursion
+          (goto-char custom-theme-insert-face-marker)
           (widget-insert "\n")
           (let ((widget (widget-create 'custom-face
                                        :tag (custom-unlispify-tag-name symbol)
@@ -290,7 +289,7 @@ Optional EVENT is the location for the menu."
 (defun custom-theme-visit-theme ()
   (interactive)
   (when (or (null custom-theme-variables)
-           (if (y-or-n-p "Discard current changes?")
+           (if (y-or-n-p "Discard current changes? ")
                (progn (customize-create-theme) t)))
     (let ((theme (call-interactively 'custom-theme-merge-theme)))
       (unless (eq theme 'user)
@@ -408,5 +407,5 @@ It includes all faces in list FACES."
       (unless (looking-at "\n")
        (princ "\n")))))
 
-;;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344
+;; arch-tag: cd6919bc-63af-410e-bae2-b6702e762344
 ;;; cus-theme.el ends here