emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102385: Let the cursorColor X resour


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102385: Let the cursorColor X resource set the the cursor face (Bug#7392).
Date: Sat, 13 Nov 2010 21:09:11 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102385
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-13 21:09:11 -0500
message:
  Let the cursorColor X resource set the the cursor face (Bug#7392).
  
  * lisp/startup.el (command-line): If the cursorColor resource is set,
  change the cursor face-spec (Bug#7392).
  
  * src/xfns.c (Fx_create_frame): Don't check for the cursorColor
  resource here; it's now done at startup.
modified:
  lisp/ChangeLog
  lisp/startup.el
  src/ChangeLog
  src/xfns.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-11-14 00:47:07 +0000
+++ b/lisp/ChangeLog    2010-11-14 02:09:11 +0000
@@ -1,3 +1,8 @@
+2010-11-14  Chong Yidong  <address@hidden>
+
+       * startup.el (command-line): If the cursorColor resource is set,
+       change the cursor face-spec (Bug#7392).
+
 2010-11-13  Ken Manheimer  <address@hidden>
 
        The main features of the following allout.el changes are:

=== modified file 'lisp/startup.el'
--- a/lisp/startup.el   2010-11-10 04:11:08 +0000
+++ b/lisp/startup.el   2010-11-14 02:09:11 +0000
@@ -885,14 +885,15 @@
 
   ;; Under X, this creates the X frame and deletes the terminal frame.
   (unless (daemonp)
-    ;; Enable or disable the tool-bar and menu-bar.
-    ;; While we're at it, set `no-blinking-cursor' too.
+
+    ;; If X resources are available, use them to initialize the values
+    ;; of `tool-bar-mode' and `menu-bar-mode', as well as the value of
+    ;; `no-blinking-cursor' and the `cursor' face.
     (cond
      ((or noninteractive emacs-basic-display)
       (setq menu-bar-mode nil
            tool-bar-mode nil
            no-blinking-cursor t))
-     ;; Check X resources if available.
      ((memq initial-window-system '(x w32 ns))
       (let ((no-vals  '("no" "off" "false" "0")))
        (if (member (x-get-resource "menuBar" "MenuBar") no-vals)
@@ -901,7 +902,13 @@
            (setq tool-bar-mode nil))
        (if (member (x-get-resource "cursorBlink" "CursorBlink")
                    no-vals)
-           (setq no-blinking-cursor t)))))
+           (setq no-blinking-cursor t)))
+      ;; If the cursorColor X resource exists, alter the `cursor' face
+      ;; spec, but mark it as changed outside of Customize.
+      (let ((color (x-get-resource "cursorColor" "CursorColor")))
+       (when color
+         (face-spec-set 'cursor `((t (:background ,color))))
+         (put 'cursor 'face-modified t)))))
     (frame-initialize))
 
   (when (fboundp 'x-create-frame)

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-11-13 22:20:01 +0000
+++ b/src/ChangeLog     2010-11-14 02:09:11 +0000
@@ -1,3 +1,8 @@
+2010-11-14  Chong Yidong  <address@hidden>
+
+       * xfns.c (Fx_create_frame): Don't check for the cursorColor
+       resource here; it's now done at startup.
+
 2010-11-13  Dan Nicolaescu  <address@hidden>
 
        * xmenu.c: Make it clear that ../lwlib/lwlib.h is only needed for Motif.

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2010-11-12 08:46:21 +0000
+++ b/src/xfns.c        2010-11-14 02:09:11 +0000
@@ -3367,8 +3367,6 @@
                       "background", "Background", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qmouse_color, build_string ("black"),
                       "pointerColor", "Foreground", RES_TYPE_STRING);
-  x_default_parameter (f, parms, Qcursor_color, build_string ("black"),
-                      "cursorColor", "Foreground", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qborder_color, build_string ("black"),
                       "borderColor", "BorderColor", RES_TYPE_STRING);
   x_default_parameter (f, parms, Qscreen_gamma, Qnil,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]