]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug#7299; default value of tool-bar-mode in without-x builds.
authorGlenn Morris <rgm@gnu.org>
Sun, 31 Oct 2010 18:26:54 +0000 (11:26 -0700)
committerGlenn Morris <rgm@gnu.org>
Sun, 31 Oct 2010 18:26:54 +0000 (11:26 -0700)
* src/frame.c (syms_of_frame) <tool-bar-mode>:
Default to nil if !HAVE_WINDOW_SYSTEM.

* lisp/cus-start.el: Handle standard values via a keyword.
Only set version property if specified.
(cursor-in-non-selected-windows, menu-bar-mode)
(tool-bar-mode, show-trailing-whitespace):
Do not specify standard values.
(transient-mark-mode, temporary-file-directory): Use :standard.

lisp/ChangeLog
lisp/cus-start.el
src/ChangeLog
src/frame.c

index 2b878c57e7f0c1b41ac7849bc7215885e9834058..f5ab5f3f3122f06e92d11cbfef0a214f21af1a39 100644 (file)
@@ -1,3 +1,12 @@
+2010-10-31  Glenn Morris  <rgm@gnu.org>
+
+       * cus-start.el: Handle standard values via a keyword.
+       Only set version property if specified.
+       (cursor-in-non-selected-windows, menu-bar-mode)
+       (tool-bar-mode, show-trailing-whitespace):
+       Do not specify standard values.
+       (transient-mark-mode, temporary-file-directory): Use :standard.
+
 2010-10-31  Jan Djärv  <jan.h.d@swipnet.se>
 
        * term/x-win.el (x-get-selection-value): New function that gets
index af5338b0bcd8e9bdfe1d9b6a1cb121ecfbd14020..388a314c5c57cb920f8d603faaf297e7528cf777 100644 (file)
@@ -97,12 +97,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
             (line-spacing display (choice (const :tag "none" nil) integer)
                           "22.1")
             (cursor-in-non-selected-windows
-             cursor boolean nil t :tag "Cursor In Non-selected Windows"
+             cursor boolean nil
+             :tag "Cursor In Non-selected Windows"
              :set #'(lambda (symbol value)
                       (set-default symbol value)
                       (force-mode-line-update t)))
             (transient-mark-mode editing-basics boolean nil
-                                 (not noninteractive)
+                                 :standard (not noninteractive)
                                  :initialize custom-initialize-delay
                                  :set custom-set-minor-mode)
             ;; callint.c
@@ -179,6 +180,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
             (temporary-file-directory
              ;; Darwin section added 24.1, does not seem worth :version bump.
              files directory nil
+             :standard
              (file-name-as-directory
               ;; FIXME ? Should there be Ftemporary_file_directory to do this
               ;; more robustly (cf set_local_socket in emacsclient.c).
@@ -218,11 +220,11 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
                                            (other :tag "hidden by keypress" 1))
                              "22.1")
             (make-pointer-invisible mouse boolean "23.2")
-            (menu-bar-mode frames boolean nil t
+            (menu-bar-mode frames boolean nil
                            ;; FIXME?
 ;                          :initialize custom-initialize-default
                            :set custom-set-minor-mode)
-            (tool-bar-mode (frames mouse) boolean nil t
+            (tool-bar-mode (frames mouse) boolean nil
 ;                          :initialize custom-initialize-default
                            :set custom-set-minor-mode)
             ;; fringe.c
@@ -372,7 +374,7 @@ since it could result in memory overflow and make Emacs crash."
                                  (other :tag "Always" t))
                                 "23.1")
             ;; xdisp.c
-            (show-trailing-whitespace whitespace-faces boolean nil nil
+            (show-trailing-whitespace whitespace-faces boolean nil
                                       :safe booleanp)
             (scroll-step windows integer)
             (scroll-conservatively windows integer)
@@ -448,13 +450,13 @@ since it could result in memory overflow and make Emacs crash."
          group (nth 1 this)
          type (nth 2 this)
          version (nth 3 this)
+         rest (nthcdr 4 this)
          ;; If we did not specify any standard value expression above,
          ;; use the current value as the standard value.
-         standard (if (nthcdr 4 this)
-                      (nth 4 this)
-                    (when (default-boundp symbol)
-                      (funcall quoter (default-value symbol))))
-         rest (nthcdr 5 this)
+         standard (if (setq prop (memq :standard rest))
+                      (cadr prop)
+                    (if (default-boundp symbol)
+                        (funcall quoter (default-value symbol))))
          ;; Don't complain about missing variables which are
          ;; irrelevant to this platform.
          native-p (save-match-data
@@ -508,12 +510,12 @@ since it could result in memory overflow and make Emacs crash."
          (custom-add-to-group group symbol 'custom-variable))
        ;; Set the type.
        (put symbol 'custom-type type)
-       (put symbol 'custom-version version)
+       (if version (put symbol 'custom-version version))
        (while rest
          (setq prop (car rest)
                propval (cadr rest)
                rest (nthcdr 2 rest))
-         (cond ((memq prop '(:risky :safe :set))) ; handled above
+         (cond ((memq prop '(:standard :risky :safe :set))) ; handled above
                ((eq prop :tag)
                 (put symbol 'custom-tag propval))))))))
 
index 359869027dce815c052e8de50bdb84f718c5167d..15da02b3e3d6dba1301b55233a3dbc0fdc2c5fd9 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-31  Glenn Morris  <rgm@gnu.org>
+
+       * frame.c (syms_of_frame) <tool-bar-mode>:
+       Default to nil if !HAVE_WINDOW_SYSTEM.  (Bug#7299)
+
 2010-10-31  Chong Yidong  <cyd@stupidchicken.com>
 
        * xterm.c (x_connection_closed): Print informative error message
index 1f8ff8d562b7f49e77fccde320b36483f031b38a..ba675be5b5f7219aab8c3f28081255b82db7f35b 100644 (file)
@@ -4576,7 +4576,11 @@ See the command `tool-bar-mode' for a description of this minor mode.
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')
 or call the function `tool-bar-mode'.  */);
+#ifdef HAVE_WINDOW_SYSTEM
   Vtool_bar_mode = Qt;
+#else
+  Vtool_bar_mode = Qnil;
+#endif
 
   DEFVAR_KBOARD ("default-minibuffer-frame", Vdefault_minibuffer_frame,
                 doc: /* Minibufferless frames use this frame's minibuffer.