[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105067: Tweak link and startup scree
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105067: Tweak link and startup screen faces. |
Date: |
Sat, 09 Jul 2011 22:04:45 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105067
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-07-09 22:04:45 -0400
message:
Tweak link and startup screen faces.
See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00478.html
for a discussion of the link face. The changes to the startup faces
are so that they can take advantage of the light/dark background
settings already defined for those faces.
* lisp/faces.el (link): Use a less saturated blue on light backgrounds.
* lisp/startup.el (fancy-startup-text, fancy-about-text)
(fancy-startup-tail): Use font-lock faces, for background safety.
modified:
lisp/ChangeLog
lisp/faces.el
lisp/startup.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-07-10 01:42:39 +0000
+++ b/lisp/ChangeLog 2011-07-10 02:04:45 +0000
@@ -7,6 +7,11 @@
* window.el (display-buffer): Fix arguments to
display-buffer-reuse-window in last change.
+ * faces.el (link): Use a less saturated blue on light backgrounds.
+
+ * startup.el (fancy-startup-text, fancy-about-text)
+ (fancy-startup-tail): Use font-lock faces, for background safety.
+
2011-07-09 Bob Nnamtrop <address@hidden> (tiny change)
* emulation/viper-cmd.el (viper-change-state-to-vi): Limit
=== modified file 'lisp/faces.el'
--- a/lisp/faces.el 2011-07-03 22:16:07 +0000
+++ b/lisp/faces.el 2011-07-10 02:04:45 +0000
@@ -2109,7 +2109,7 @@
(defface link
'((((class color) (min-colors 88) (background light))
- :foreground "blue1" :underline t)
+ :foreground "RoyalBlue3" :underline t)
(((class color) (background light))
:foreground "blue" :underline t)
(((class color) (min-colors 88) (background dark))
=== modified file 'lisp/startup.el'
--- a/lisp/startup.el 2011-05-28 23:30:17 +0000
+++ b/lisp/startup.el 2011-07-10 02:04:45 +0000
@@ -1293,7 +1293,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defconst fancy-startup-text
- `((:face (variable-pitch (:foreground "red"))
+ `((:face (variable-pitch font-lock-comment-face)
"Welcome to "
:link ("GNU Emacs"
,(lambda (_button) (browse-url
"http://www.gnu.org/software/emacs/"))
@@ -1350,7 +1350,7 @@
`:face FACE', like `fancy-splash-insert' accepts them.")
(defconst fancy-about-text
- `((:face (variable-pitch (:foreground "red"))
+ `((:face (:inherit (variable-pitch font-lock-comment-face))
"This is "
:link ("GNU Emacs"
,(lambda (_button) (browse-url
"http://www.gnu.org/software/emacs/"))
@@ -1366,11 +1366,7 @@
`("GNU" ,(lambda (_button) (describe-gnu-project))
"Display info on the GNU project.")))
" operating system.\n"
- :face ,(lambda ()
- (list 'variable-pitch
- (list :foreground
- (if (eq (frame-parameter nil 'background-mode) 'dark)
- "cyan" "darkblue"))))
+ :face (variable-pitch font-lock-builtin-face)
"\n"
,(lambda () (emacs-version))
"\n"
@@ -1426,8 +1422,7 @@
,(lambda (_button)
(browse-url "http://www.gnu.org/software/emacs/tour/"))
"Browse http://www.gnu.org/software/emacs/tour/")
- "\tSee an overview of Emacs features at gnu.org"
- ))
+ "\tSee an overview of Emacs features at gnu.org"))
"A list of texts to show in the middle part of the About screen.
Each element in the list should be a list of strings or pairs
`:face FACE', like `fancy-splash-insert' accepts them.")
@@ -1537,93 +1532,91 @@
(defun fancy-startup-tail (&optional concise)
"Insert the tail part of the splash screen into the current buffer."
- (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark)
- "cyan" "darkblue")))
- (unless concise
- (fancy-splash-insert
- :face 'variable-pitch
- "\nTo start... "
- :link `("Open a File"
- ,(lambda (_button) (call-interactively 'find-file))
- "Specify a new file's name, to edit the file")
- " "
- :link `("Open Home Directory"
- ,(lambda (_button) (dired "~"))
- "Open your home directory, to operate on its files")
- " "
- :link `("Customize Startup"
- ,(lambda (_button) (customize-group 'initialization))
- "Change initialization settings including this screen")
- "\n"))
+ (unless concise
(fancy-splash-insert
- :face 'variable-pitch "To quit a partially entered command, type "
- :face 'default "Control-g"
- :face 'variable-pitch ".\n")
- (fancy-splash-insert :face `(variable-pitch (:foreground ,fg))
- "\nThis is "
- (emacs-version)
- "\n"
- :face '(variable-pitch (:height 0.8))
- emacs-copyright
- "\n")
- (and auto-save-list-file-prefix
- ;; Don't signal an error if the
- ;; directory for auto-save-list files
- ;; does not yet exist.
- (file-directory-p (file-name-directory
- auto-save-list-file-prefix))
- (directory-files
- (file-name-directory auto-save-list-file-prefix)
- nil
- (concat "\\`"
- (regexp-quote (file-name-nondirectory
- auto-save-list-file-prefix)))
- t)
- (fancy-splash-insert :face '(variable-pitch (:foreground "red"))
- "\nIf an Emacs session crashed recently, "
- "type "
- :face '(fixed-pitch :foreground "red")
- "Meta-x recover-session RET"
- :face '(variable-pitch (:foreground "red"))
- "\nto recover"
- " the files you were editing."))
+ :face 'variable-pitch
+ "\nTo start... "
+ :link `("Open a File"
+ ,(lambda (_button) (call-interactively 'find-file))
+ "Specify a new file's name, to edit the file")
+ " "
+ :link `("Open Home Directory"
+ ,(lambda (_button) (dired "~"))
+ "Open your home directory, to operate on its files")
+ " "
+ :link `("Customize Startup"
+ ,(lambda (_button) (customize-group 'initialization))
+ "Change initialization settings including this screen")
+ "\n"))
+ (fancy-splash-insert
+ :face 'variable-pitch "To quit a partially entered command, type "
+ :face 'default "Control-g"
+ :face 'variable-pitch ".\n")
+ (fancy-splash-insert :face `(variable-pitch font-lock-builtin-face)
+ "\nThis is "
+ (emacs-version)
+ "\n"
+ :face '(variable-pitch (:height 0.8))
+ emacs-copyright
+ "\n")
+ (and auto-save-list-file-prefix
+ ;; Don't signal an error if the
+ ;; directory for auto-save-list files
+ ;; does not yet exist.
+ (file-directory-p (file-name-directory
+ auto-save-list-file-prefix))
+ (directory-files
+ (file-name-directory auto-save-list-file-prefix)
+ nil
+ (concat "\\`"
+ (regexp-quote (file-name-nondirectory
+ auto-save-list-file-prefix)))
+ t)
+ (fancy-splash-insert :face '(variable-pitch font-lock-comment-face)
+ "\nIf an Emacs session crashed recently, "
+ "type "
+ :face '(fixed-pitch font-lock-comment-face)
+ "Meta-x recover-session RET"
+ :face '(variable-pitch font-lock-comment-face)
+ "\nto recover"
+ " the files you were editing."))
- (when concise
- (fancy-splash-insert
- :face 'variable-pitch "\n"
- :link `("Dismiss this startup screen"
- ,(lambda (_button)
- (when startup-screen-inhibit-startup-screen
- (customize-set-variable 'inhibit-startup-screen t)
- (customize-mark-to-save 'inhibit-startup-screen)
- (custom-save-all))
- (let ((w (get-buffer-window "*GNU Emacs*")))
- (and w (not (one-window-p)) (delete-window w)))
- (kill-buffer "*GNU Emacs*")))
- " ")
- (when (or user-init-file custom-file)
- (let ((checked (create-image "checked.xpm"
- nil nil :ascent 'center))
- (unchecked (create-image "unchecked.xpm"
- nil nil :ascent 'center)))
- (insert-button
- " "
- :on-glyph checked
- :off-glyph unchecked
- 'checked nil 'display unchecked 'follow-link t
- 'action (lambda (button)
- (if (overlay-get button 'checked)
- (progn (overlay-put button 'checked nil)
- (overlay-put button 'display
- (overlay-get button :off-glyph))
- (setq startup-screen-inhibit-startup-screen
- nil))
- (overlay-put button 'checked t)
- (overlay-put button 'display
- (overlay-get button :on-glyph))
- (setq startup-screen-inhibit-startup-screen t)))))
- (fancy-splash-insert :face '(variable-pitch (:height 0.9))
- " Never show it again.")))))
+ (when concise
+ (fancy-splash-insert
+ :face 'variable-pitch "\n"
+ :link `("Dismiss this startup screen"
+ ,(lambda (_button)
+ (when startup-screen-inhibit-startup-screen
+ (customize-set-variable 'inhibit-startup-screen t)
+ (customize-mark-to-save 'inhibit-startup-screen)
+ (custom-save-all))
+ (let ((w (get-buffer-window "*GNU Emacs*")))
+ (and w (not (one-window-p)) (delete-window w)))
+ (kill-buffer "*GNU Emacs*")))
+ " ")
+ (when (or user-init-file custom-file)
+ (let ((checked (create-image "checked.xpm"
+ nil nil :ascent 'center))
+ (unchecked (create-image "unchecked.xpm"
+ nil nil :ascent 'center)))
+ (insert-button
+ " "
+ :on-glyph checked
+ :off-glyph unchecked
+ 'checked nil 'display unchecked 'follow-link t
+ 'action (lambda (button)
+ (if (overlay-get button 'checked)
+ (progn (overlay-put button 'checked nil)
+ (overlay-put button 'display
+ (overlay-get button :off-glyph))
+ (setq startup-screen-inhibit-startup-screen
+ nil))
+ (overlay-put button 'checked t)
+ (overlay-put button 'display
+ (overlay-get button :on-glyph))
+ (setq startup-screen-inhibit-startup-screen t)))))
+ (fancy-splash-insert :face '(variable-pitch (:height 0.9))
+ " Never show it again."))))
(defun exit-splash-screen ()
"Stop displaying the splash screen buffer."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105067: Tweak link and startup screen faces.,
Chong Yidong <=