Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102807. ------------------------------------------------------------ revno: 102807 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-01-09 16:35:53 -0500 message: Improvements to tango themes, including some faces from Jan Moringen. * themes/tango-theme.el, themes/tango-dark-theme.el: Let-bind tango palette colors. Only define faces for color displays. Customize the ansi-color-names-vector variable. Add Ediff, Flyspell, and Semantic faces as suggested by Jan Moringen. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2011-01-08 13:31:26 +0000 +++ etc/ChangeLog 2011-01-09 21:35:53 +0000 @@ -1,3 +1,10 @@ +2011-01-09 Chong Yidong + + * themes/tango-theme.el, themes/tango-dark-theme.el: Let-bind + tango palette colors. Only define faces for color displays. + Customize the ansi-color-names-vector variable. Add Ediff, + Flyspell, and Semantic faces as suggested by Jan Moringen. + 2011-01-08 Andreas Schwab * compilation.txt: Add column to gcc-include sample. === modified file 'etc/themes/tango-dark-theme.el' --- etc/themes/tango-dark-theme.el 2010-10-12 20:06:20 +0000 +++ etc/themes/tango-dark-theme.el 2011-01-09 21:35:53 +0000 @@ -1,6 +1,9 @@ ;;; tango-dark-theme.el --- Tango-based custom theme for faces -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2011 Free Software Foundation, Inc. + +;; Authors: Chong Yidong +;; Jan Moringen ;; This file is part of GNU Emacs. @@ -25,63 +28,124 @@ ;;; Code: (deftheme tango-dark - "Theme for faces, based on the Tango palette on a dark background. -Basic, Font Lock, Isearch, Gnus, and Message faces are included.") - -(custom-theme-set-faces - 'tango-dark - '(default ((t (:foreground "#eeeeec" :background "#2e3436")))) - '(cursor ((t (:foreground "#2e3436" :background "#fce94f")))) - '(highlight ((t (:foreground "#2e3436" :background "#edd400")))) - '(region ((t (:background "#555753")))) - '(font-lock-builtin-face ((t (:foreground "#ad7fa8")))) - '(font-lock-comment-face ((t (:foreground "#73d216")))) - '(font-lock-constant-face ((t (:foreground "#e6a8df")))) - '(font-lock-function-name-face ((t (:foreground "#fce94f")))) - '(font-lock-keyword-face ((t (:foreground "#8cc4ff")))) - '(font-lock-string-face ((t (:foreground "#e9b96e")))) - '(font-lock-type-face ((t (:foreground "#a5ff4d")))) - '(font-lock-variable-name-face ((t (:foreground "#fcaf3e")))) - '(font-lock-warning-face ((t (:foreground "#ef2929")))) - '(button ((t (:underline t :foreground "#729fcf")))) - '(link ((t (:underline t :foreground "#729fcf")))) - '(link-visited ((t (:underline t :foreground "#3465a4")))) - '(mode-line ((t (:box (:line-width -1 :style released-button) - :background "#d3d7cf" :foreground "black")))) - '(mode-line-inactive ((t (:box (:line-width -1 :style released-button) - :background "#555753" :foreground "white")))) - '(isearch ((t (:foreground "#ffffff" :background "#ce5c00")))) - '(lazy-highlight ((t (:background "#8f5902")))) - '(gnus-group-news-1 ((t (:foreground "#ad7fa8")))) - '(gnus-group-news-1-low ((t (:foreground "#75507b")))) - '(gnus-group-news-2 ((t (:foreground "#729fcf")))) - '(gnus-group-news-2-low ((t (:foreground "#3465a4")))) - '(gnus-group-news-3 ((t (:foreground "#8ae234")))) - '(gnus-group-news-3-low ((t (:foreground "#73d216")))) - '(gnus-group-news-4 ((t (:foreground "#e9b9e6")))) - '(gnus-group-news-4-low ((t (:foreground "#c17d11")))) - '(gnus-group-news-5 ((t (:foreground "#fcaf3e")))) - '(gnus-group-news-5-low ((t (:foreground "#f57900")))) - '(gnus-group-news-low ((t (:foreground "#edd400")))) - '(gnus-group-mail-1 ((t (:foreground "#ad7fa8")))) - '(gnus-group-mail-1-low ((t (:foreground "#75507b")))) - '(gnus-group-mail-2 ((t (:foreground "#729fcf")))) - '(gnus-group-mail-2-low ((t (:foreground "#3465a4")))) - '(gnus-group-mail-3 ((t (:foreground "#8ae234")))) - '(gnus-group-mail-3-low ((t (:foreground "#73d216")))) - '(gnus-group-mail-low ((t (:foreground "#edd400")))) - '(gnus-header-content ((t (:weight normal :foreground "#c4a000")))) - '(gnus-header-from ((t (:foreground "#edd400")))) - '(gnus-header-subject ((t (:foreground "#8ae234")))) - '(gnus-header-name ((t (:foreground "#729fcf")))) - '(gnus-header-newsgroups ((t (:foreground "#c17d11")))) - '(message-header-name ((t (:foreground "#729fcf")))) - '(message-header-cc ((t (:foreground "#c4a000")))) - '(message-header-other ((t (:foreground "#c17d11")))) - '(message-header-subject ((t (:foreground "#8ae234")))) - '(message-header-to ((t (:foreground "#edd400")))) - '(message-cited-text ((t (:foreground "#8ae234")))) - '(message-separator ((t (:foreground "#ad7fa8"))))) + "Theme for faces, based on the Tango palette with a dark background. +Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, +Semantic, and Ansi-Color faces are included.") + +(let ((class '((class color) (min-colors 89))) + ;; Tango palette colors. + (butter-1 "#fce94f") (butter-2 "#edd400") (butter-3 "#c4a000") + (orange-1 "#fcaf3e") (orange-2 "#f57900") (orange-3 "#ce5c00") + (choc-1 "#e9b96e") (choc-2 "#c17d11") (choc-3 "#8f5902") + (cham-1 "#8ae234") (cham-2 "#73d216") (cham-3 "#4e9a06") + (blue-1 "#729fcf") (blue-2 "#3465a4") (blue-3 "#204a87") + (plum-1 "#ad7fa8") (plum-2 "#75507b") (plum-3 "#5c3566") + (red-1 "#ef2929") (red-2 "#cc0000") (red-3 "#a40000") + (alum-1 "#eeeeec") (alum-2 "#d3d7cf") (alum-3 "#babdb6") + (alum-4 "#888a85") (alum-5 "#555753") (alum-6 "#2e3436") + ;; Not in Tango palette; used for better contrast. + (cham-0 "#b4fa70") (blue-0 "#8cc4ff") (plum-0 "#e6a8df") + (red-0 "#ff4b4b") (alum-5.5 "#41423f") (alum-7 "#212526")) + + (custom-theme-set-faces + 'tango-dark + `(default ((,class (:foreground ,alum-1 :background ,alum-6)))) + `(cursor ((,class (:foreground ,alum-6 :background ,butter-1)))) + ;; Highlighting faces + `(fringe ((,class (:background ,alum-7)))) + `(highlight ((,class (:foreground ,alum-6 :background ,butter-2)))) + `(region ((,class (:background ,alum-5)))) + `(secondary-selection ((,class (:background ,blue-3)))) + `(isearch ((,class (:foreground ,alum-1 :background ,orange-3)))) + `(lazy-highlight ((,class (:background ,choc-3)))) + `(trailing-whitespace ((,class (:background ,red-3)))) + ;; Mode line faces + `(mode-line ((,class + (:box (:line-width -1 :style released-button) + :background ,alum-2 :foreground ,alum-6)))) + `(mode-line-inactive ((,class + (:box (:line-width -1 :style released-button) + :background ,alum-5 :foreground ,alum-1)))) + ;; Escape and prompt faces + `(minibuffer-prompt ((,class (:foreground ,cham-0)))) + `(escape-glyph ((,class (:foreground ,butter-3)))) + ;; Font lock faces + `(font-lock-builtin-face ((,class (:foreground ,plum-1)))) + `(font-lock-comment-face ((,class (:foreground ,cham-2)))) + `(font-lock-constant-face ((,class (:foreground ,plum-0)))) + `(font-lock-function-name-face ((,class (:foreground ,butter-1)))) + `(font-lock-keyword-face ((,class (:foreground ,cham-0)))) + `(font-lock-string-face ((,class (:foreground ,choc-1)))) + `(font-lock-type-face ((,class (:foreground ,blue-0)))) + `(font-lock-variable-name-face ((,class (:foreground ,orange-1)))) + `(font-lock-warning-face ((,class (:foreground ,red-0)))) + ;; Button and link faces + `(button ((,class (:underline t :foreground ,blue-1)))) + `(link ((,class (:underline t :foreground ,blue-1)))) + `(link-visited ((,class (:underline t :foreground ,blue-2)))) + ;; Gnus faces + `(gnus-group-news-1 ((,class (:foreground ,plum-1)))) + `(gnus-group-news-1-low ((,class (:foreground ,plum-2)))) + `(gnus-group-news-2 ((,class (:foreground ,blue-1)))) + `(gnus-group-news-2-low ((,class (:foreground ,blue-2)))) + `(gnus-group-news-3 ((,class (:foreground ,cham-1)))) + `(gnus-group-news-3-low ((,class (:foreground ,cham-2)))) + `(gnus-group-news-4 ((,class (:foreground ,plum-0)))) + `(gnus-group-news-4-low ((,class (:foreground ,choc-2)))) + `(gnus-group-news-5 ((,class (:foreground ,orange-1)))) + `(gnus-group-news-5-low ((,class (:foreground ,orange-2)))) + `(gnus-group-news-low ((,class (:foreground ,butter-2)))) + `(gnus-group-mail-1 ((,class (:foreground ,plum-1)))) + `(gnus-group-mail-1-low ((,class (:foreground ,plum-2)))) + `(gnus-group-mail-2 ((,class (:foreground ,blue-1)))) + `(gnus-group-mail-2-low ((,class (:foreground ,blue-2)))) + `(gnus-group-mail-3 ((,class (:foreground ,cham-1)))) + `(gnus-group-mail-3-low ((,class (:foreground ,cham-2)))) + `(gnus-group-mail-low ((,class (:foreground ,butter-2)))) + `(gnus-header-content ((,class (:weight normal :foreground ,butter-3)))) + `(gnus-header-from ((,class (:foreground ,butter-2)))) + `(gnus-header-subject ((,class (:foreground ,cham-1)))) + `(gnus-header-name ((,class (:foreground ,blue-1)))) + `(gnus-header-newsgroups ((,class (:foreground ,choc-2)))) + ;; Message faces + `(message-header-name ((,class (:foreground ,blue-1)))) + `(message-header-cc ((,class (:foreground ,butter-3)))) + `(message-header-other ((,class (:foreground ,choc-2)))) + `(message-header-subject ((,class (:foreground ,cham-1)))) + `(message-header-to ((,class (:foreground ,butter-2)))) + `(message-cited-text ((,class (:foreground ,cham-1)))) + `(message-separator ((,class (:foreground ,plum-1)))) + ;; SMerge faces + `(smerge-refined-change ((,class (:background ,blue-3)))) + ;; Ediff faces + `(ediff-current-diff-A ((,class (:background ,alum-5)))) + `(ediff-fine-diff-A ((,class (:background ,blue-3)))) + `(ediff-even-diff-A ((,class (:background ,alum-5.5)))) + `(ediff-odd-diff-A ((,class (:background ,alum-5.5)))) + `(ediff-current-diff-B ((,class (:background ,alum-5)))) + `(ediff-fine-diff-B ((,class (:background ,choc-3)))) + `(ediff-even-diff-B ((,class (:background ,alum-5.5)))) + `(ediff-odd-diff-B ((,class (:background ,alum-5.5)))) + ;; Flyspell faces + `(flyspell-duplicate ((,class (:underline ,orange-1)))) + `(flyspell-incorrect ((,class (:underline ,red-1)))) + ;; Semantic faces + `(semantic-decoration-on-includes ((,class (:underline ,alum-4)))) + `(semantic-decoration-on-private-members-face + ((,class (:background ,plum-3)))) + `(semantic-decoration-on-protected-members-face + ((,class (:background ,choc-3)))) + `(semantic-decoration-on-unknown-includes + ((,class (:background ,red-3)))) + `(semantic-decoration-on-unparsed-includes + ((,class (:background ,alum-5.5)))) + `(semantic-tag-boundary-face ((,class (:overline ,blue-1)))) + `(semantic-unmatched-syntax-face ((,class (:underline ,red-1))))) + + (custom-theme-set-variables + 'tango-dark + `(ansi-color-names-vector [,alum-7 ,red-0 ,cham-0 ,butter-1 + ,blue-1 ,plum-1 ,blue-0 ,alum-1]))) (provide-theme 'tango-dark) === modified file 'etc/themes/tango-theme.el' --- etc/themes/tango-theme.el 2010-10-12 20:06:20 +0000 +++ etc/themes/tango-theme.el 2011-01-09 21:35:53 +0000 @@ -1,6 +1,9 @@ ;;; tango-theme.el --- Tango-based custom theme for faces -;; Copyright (C) 2010 Free Software Foundation, Inc. +;; Copyright (C) 2010, 2011 Free Software Foundation, Inc. + +;; Authors: Chong Yidong +;; Jan Moringen ;; This file is part of GNU Emacs. @@ -25,63 +28,117 @@ ;;; Code: (deftheme tango - "Theme for faces, based on the Tango palette on a light background. -Basic, Font Lock, Isearch, Gnus, and Message faces are included.") - -(custom-theme-set-faces - 'tango - '(default ((t (:foreground "#16191a" :background "#eeeeec")))) - '(cursor ((t (:foreground "#eeeeec" :background "#204a87")))) - '(highlight ((t (:background "#babdb6")))) - '(region ((t (:background "#babdb6")))) - '(font-lock-builtin-face ((t (:weight bold :foreground "#204a87")))) - '(font-lock-comment-face ((t (:foreground "#204a87")))) - '(font-lock-constant-face ((t (:weight bold :foreground "#5c3566")))) - '(font-lock-function-name-face ((t (:weight bold :foreground "#ce5c00")))) - '(font-lock-keyword-face ((t (:foreground "#a40000")))) - '(font-lock-string-face ((t (:foreground "#5c3566")))) - '(font-lock-type-face ((t (:weight bold :foreground "#4e9a06")))) - '(font-lock-variable-name-face ((t (:weight bold :foreground "#c17d11")))) - '(font-lock-warning-face ((t (:foreground "#cc0000")))) - '(button ((t (:underline t :foreground "#204a87")))) - '(link ((t (:underline t :foreground "#204a87")))) - '(link-visited ((t (:underline t :foreground "#3465a4")))) - '(mode-line ((t (:box (:line-width -1 :style released-button) - :background "#d3d7cf" :foreground "black")))) - '(mode-line-inactive ((t (:box (:line-width -1 :style released-button) - :background "#babdb6" :foreground "black")))) - '(isearch ((t (:foreground "#ffffff" :background "#ce5c00")))) - '(lazy-highlight ((t (:background "#e9b96e")))) - '(gnus-group-news-1 ((t (:weight bold :foreground "#5c3566")))) - '(gnus-group-news-1-low ((t (:foreground "#5c3566")))) - '(gnus-group-news-2 ((t (:weight bold :foreground "#204a87")))) - '(gnus-group-news-2-low ((t (:foreground "#204a87")))) - '(gnus-group-news-3 ((t (:weight bold :foreground "#4e0a06")))) - '(gnus-group-news-3-low ((t (:foreground "#4e0a06")))) - '(gnus-group-news-4 ((t (:weight bold :foreground "#7a4c02")))) - '(gnus-group-news-4-low ((t (:foreground "#7a4c02")))) - '(gnus-group-news-5 ((t (:weight bold :foreground "#ce5c00")))) - '(gnus-group-news-5-low ((t (:foreground "#ce5c00")))) - '(gnus-group-news-low ((t (:foreground "#888a85")))) - '(gnus-group-mail-1 ((t (:weight bold :foreground "#5c3566")))) - '(gnus-group-mail-1-low ((t (:foreground "#5c3566")))) - '(gnus-group-mail-2 ((t (:weight bold :foreground "#204a87")))) - '(gnus-group-mail-2-low ((t (:foreground "#204a87")))) - '(gnus-group-mail-3 ((t (:weight bold :foreground "#4e0a06")))) - '(gnus-group-mail-3-low ((t (:foreground "#4e0a06")))) - '(gnus-group-mail-low ((t (:foreground "#888a85")))) - '(gnus-header-content ((t (:foreground "#4e9a06")))) - '(gnus-header-from ((t (:weight bold :foreground "#c4a000")))) - '(gnus-header-subject ((t (:foreground "#4e0a06")))) - '(gnus-header-name ((t (:foreground "#204a87")))) - '(gnus-header-newsgroups ((t (:foreground "#888a85")))) - '(message-header-name ((t (:foreground "#204a87")))) - '(message-header-cc ((t (:foreground "#c4a000")))) - '(message-header-other ((t (:foreground "#c17d11")))) - '(message-header-subject ((t (:foreground "#4e0a06")))) - '(message-header-to ((t (:weight bold :foreground "#c4a000")))) - '(message-cited-text ((t (:foreground "#888a85")))) - '(message-separator ((t (:weight bold :foreground "#4e9a06"))))) + "Theme for faces, based on the Tango palette with a light background. +Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell, +Semantic, and Ansi-Color faces are included.") + +(let ((class '((class color) (min-colors 89))) + ;; Tango palette colors. + (butter-1 "#fce94f") (butter-2 "#edd400") (butter-3 "#c4a000") + (orange-1 "#fcaf3e") (orange-2 "#f57900") (orange-3 "#ce5c00") + (choc-1 "#e9b96e") (choc-2 "#c17d11") (choc-3 "#8f5902") + (cham-1 "#8ae234") (cham-2 "#73d216") (cham-3 "#4e9a06") + (blue-1 "#729fcf") (blue-2 "#3465a4") (blue-3 "#204a87") + (plum-1 "#ad7fa8") (plum-2 "#75507b") (plum-3 "#5c3566") + (red-1 "#ef2929") (red-2 "#cc0000") (red-3 "#a40000") + (alum-1 "#eeeeec") (alum-2 "#d3d7cf") (alum-3 "#babdb6") + (alum-4 "#888a85") (alum-5 "#555753") (alum-6 "#2e3436") + ;; Not in Tango palette; used for better contrast. + (cham-4 "#346604") (blue-0 "#8cc4ff")) + + (custom-theme-set-faces + 'tango + `(default ((,class (:foreground ,"#16191a" :background ,alum-1)))) + `(cursor ((,class (:foreground ,alum-1 :background ,blue-3)))) + ;; Highlighting faces + `(fringe ((,class (:background ,alum-2)))) + `(highlight ((,class (:background ,alum-3)))) + `(region ((,class (:background ,alum-3)))) + `(secondary-selection ((,class (:background ,blue-0)))) + `(isearch ((,class (:foreground ,"#ffffff" :background ,orange-3)))) + `(lazy-highlight ((,class (:background ,choc-1)))) + `(trailing-whitespace ((,class (:background ,red-1)))) + ;; Mode line faces + `(mode-line ((,class (:box (:line-width -1 :style released-button) + :background ,alum-2 :foreground ,alum-6)))) + `(mode-line-inactive ((,class (:box (:line-width -1 :style released-button) + :background ,alum-4 :foreground ,alum-6)))) + ;; Escape and prompt faces + `(minibuffer-prompt ((,class (:weight bold :foreground ,blue-3)))) + `(escape-glyph ((,class (:foreground ,red-3)))) + ;; Font lock faces + `(font-lock-builtin-face ((,class (:weight bold :foreground ,plum-3)))) + `(font-lock-comment-face ((,class (:foreground ,cham-4)))) + `(font-lock-constant-face ((,class (:weight bold :foreground ,blue-3)))) + `(font-lock-function-name-face ((,class (:foreground ,red-3)))) + `(font-lock-keyword-face ((,class (:weight bold :foreground ,choc-2)))) + `(font-lock-string-face ((,class (:foreground ,plum-3)))) + `(font-lock-type-face ((,class (:foreground ,blue-3)))) + `(font-lock-variable-name-face ((,class (:weight bold :foreground ,orange-3)))) + `(font-lock-warning-face ((,class (:foreground ,red-2)))) + ;; Button and link faces + `(button ((,class (:underline t :foreground ,blue-3)))) + `(link ((,class (:underline t :foreground ,blue-3)))) + `(link-visited ((,class (:underline t :foreground ,blue-2)))) + ;; Gnus faces + `(gnus-group-news-1 ((,class (:weight bold :foreground ,plum-3)))) + `(gnus-group-news-1-low ((,class (:foreground ,plum-3)))) + `(gnus-group-news-2 ((,class (:weight bold :foreground ,blue-3)))) + `(gnus-group-news-2-low ((,class (:foreground ,blue-3)))) + `(gnus-group-news-3 ((,class (:weight bold :foreground ,"#4e0a06")))) + `(gnus-group-news-3-low ((,class (:foreground ,"#4e0a06")))) + `(gnus-group-news-4 ((,class (:weight bold :foreground ,"#7a4c02")))) + `(gnus-group-news-4-low ((,class (:foreground ,"#7a4c02")))) + `(gnus-group-news-5 ((,class (:weight bold :foreground ,orange-3)))) + `(gnus-group-news-5-low ((,class (:foreground ,orange-3)))) + `(gnus-group-news-low ((,class (:foreground ,"#888a85")))) + `(gnus-group-mail-1 ((,class (:weight bold :foreground ,plum-3)))) + `(gnus-group-mail-1-low ((,class (:foreground ,plum-3)))) + `(gnus-group-mail-2 ((,class (:weight bold :foreground ,blue-3)))) + `(gnus-group-mail-2-low ((,class (:foreground ,blue-3)))) + `(gnus-group-mail-3 ((,class (:weight bold :foreground ,"#4e0a06")))) + `(gnus-group-mail-3-low ((,class (:foreground ,"#4e0a06")))) + `(gnus-group-mail-low ((,class (:foreground ,"#888a85")))) + `(gnus-header-content ((,class (:foreground ,cham-3)))) + `(gnus-header-from ((,class (:weight bold :foreground ,butter-3)))) + `(gnus-header-subject ((,class (:foreground ,"#4e0a06")))) + `(gnus-header-name ((,class (:foreground ,blue-3)))) + `(gnus-header-newsgroups ((,class (:foreground ,"#888a85")))) + ;; Message faces + `(message-header-name ((,class (:foreground ,blue-3)))) + `(message-header-cc ((,class (:foreground ,butter-3)))) + `(message-header-other ((,class (:foreground ,choc-2)))) + `(message-header-subject ((,class (:foreground ,"#4e0a06")))) + `(message-header-to ((,class (:weight bold :foreground ,butter-3)))) + `(message-cited-text ((,class (:foreground ,"#888a85")))) + `(message-separator ((,class (:weight bold :foreground ,cham-3)))) + ;; SMerge + `(smerge-refined-change ((,class (:background ,plum-1)))) + ;; Ediff + `(ediff-current-diff-A ((,class (:background ,blue-1)))) + `(ediff-fine-diff-A ((,class (:background ,plum-1)))) + `(ediff-current-diff-B ((,class (:background ,butter-1)))) + `(ediff-fine-diff-B ((,class (:background ,orange-1)))) + ;; Flyspell + `(flyspell-duplicate ((,class (:underline ,orange-1)))) + `(flyspell-incorrect ((,class (:underline ,red-1)))) + ;; Semantic faces + `(semantic-decoration-on-includes ((,class (:underline ,cham-4)))) + `(semantic-decoration-on-private-members-face + ((,class (:background ,alum-2)))) + `(semantic-decoration-on-protected-members-face + ((,class (:background ,alum-2)))) + `(semantic-decoration-on-unknown-includes + ((,class (:background ,choc-3)))) + `(semantic-decoration-on-unparsed-includes + ((,class (:underline ,orange-3)))) + `(semantic-tag-boundary-face ((,class (:overline ,blue-1)))) + `(semantic-unmatched-syntax-face ((,class (:underline ,red-1))))) + + (custom-theme-set-variables + 'tango + `(ansi-color-names-vector [,alum-6 ,red-3 ,cham-3 ,butter-3 + ,blue-3 ,plum-3 ,blue-1 ,alum-1]))) (provide-theme 'tango) ------------------------------------------------------------ revno: 102806 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-01-09 16:24:07 -0500 message: Make org-link and idlwave-help-link inherit from link face. Suggested by Joakim Verona. * lisp/org/org-faces.el (org-link): * lisp/progmodes/idlw-help.el (idlwave-help-link): Inherit from link face. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 21:07:30 +0000 +++ lisp/ChangeLog 2011-01-09 21:24:07 +0000 @@ -1,5 +1,8 @@ 2011-01-09 Chong Yidong + * progmodes/idlw-help.el (idlwave-help-link): Inherit from link + face. Suggested by Joakim Verona. + * comint.el (comint-highlight-prompt): Inherit minibuffer-prompt. * wid-edit.el (visibility): Replace :on-image and :off-image === modified file 'lisp/org/ChangeLog' --- lisp/org/ChangeLog 2010-12-13 17:27:56 +0000 +++ lisp/org/ChangeLog 2011-01-09 21:24:07 +0000 @@ -1,3 +1,8 @@ +2011-01-09 Chong Yidong + + * org-faces.el (org-link): Inherit from link face. + Suggested by Joakim Verona. + 2010-12-11 Tassilo Horn * org-footnote.el (org-footnote-create-definition): Place === modified file 'lisp/org/org-faces.el' --- lisp/org/org-faces.el 2010-12-11 16:42:53 +0000 +++ lisp/org/org-faces.el 2011-01-09 21:24:07 +0000 @@ -1,6 +1,6 @@ ;;; org-faces.el --- Face definitions for Org-mode. -;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; Free Software Foundation, Inc. ;; Author: Carsten Dominik @@ -247,9 +247,7 @@ :group 'org-faces) (defface org-link - '((((class color) (background light)) (:foreground "Purple" :underline t)) - (((class color) (background dark)) (:foreground "Cyan" :underline t)) - (t (:underline t))) + '((t :inherit link)) "Face for links." :group 'org-faces) === modified file 'lisp/progmodes/idlw-help.el' --- lisp/progmodes/idlw-help.el 2010-12-10 20:00:25 +0000 +++ lisp/progmodes/idlw-help.el 2011-01-09 21:24:07 +0000 @@ -1,7 +1,7 @@ ;;; idlw-help.el --- HTML Help code for IDLWAVE ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -;; 2009, 2010 Free Software Foundation, Inc. +;; 2009, 2010, 2011 Free Software Foundation, Inc. ;; ;; Authors: J.D. Smith ;; Carsten Dominik @@ -195,8 +195,7 @@ :type 'string) (defface idlwave-help-link - '((((class color)) (:foreground "Blue")) - (t (:weight bold))) + '((t :inherit link)) "Face for highlighting links into IDLWAVE online help." :group 'idlwave-online-help) ------------------------------------------------------------ revno: 102805 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-01-09 16:07:30 -0500 message: * lisp/comint.el (comint-highlight-prompt): Inherit from minibuffer-prompt. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 21:05:53 +0000 +++ lisp/ChangeLog 2011-01-09 21:07:30 +0000 @@ -1,5 +1,7 @@ 2011-01-09 Chong Yidong + * comint.el (comint-highlight-prompt): Inherit minibuffer-prompt. + * wid-edit.el (visibility): Replace :on-image and :off-image widget properties with :on-glyph and :off-glyph, for consistency with the `visibility' widget. === modified file 'lisp/comint.el' --- lisp/comint.el 2010-12-13 15:27:36 +0000 +++ lisp/comint.el 2011-01-09 21:07:30 +0000 @@ -227,9 +227,7 @@ :group 'comint) (defface comint-highlight-prompt - '((((min-colors 88) (background dark)) (:foreground "cyan1")) - (((background dark)) (:foreground "cyan")) - (t (:foreground "dark blue"))) + '((t :inherit minibuffer-prompt)) "Face to use to highlight prompts." :group 'comint) ------------------------------------------------------------ revno: 102804 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-01-09 16:05:53 -0500 message: Fix r99654 change -- rename :on/off-image widget props to :on/off-glyph. * wid-edit.el (visibility): Replace :on-image and :off-image widget properties with :on-glyph and :off-glyph, for consistency with the `visibility' widget. (widget-toggle-value-create, widget-visibility-value-create): Merge into a single function `widget-toggle-value-create'. * cus-edit.el (custom-variable-value-create, custom-visibility) (custom-face-edit-value-create, custom-face-value-create): Replace :on-image and :off-image widget properties with :on-glyph and :off-glyph, for consistency with the `visibility' widget. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 19:34:19 +0000 +++ lisp/ChangeLog 2011-01-09 21:05:53 +0000 @@ -1,3 +1,16 @@ +2011-01-09 Chong Yidong + + * wid-edit.el (visibility): Replace :on-image and :off-image + widget properties with :on-glyph and :off-glyph, for consistency + with the `visibility' widget. + (widget-toggle-value-create, widget-visibility-value-create): + Merge into a single function `widget-toggle-value-create'. + + * cus-edit.el (custom-variable-value-create, custom-visibility) + (custom-face-edit-value-create, custom-face-value-create): Replace + :on-image and :off-image widget properties with :on-glyph and + :off-glyph, for consistency with the `visibility' widget. + 2011-01-09 Andreas Schwab * net/ldap.el (ldap-search-internal): Don't use eval. === modified file 'lisp/cus-edit.el' --- lisp/cus-edit.el 2010-12-13 15:27:36 +0000 +++ lisp/cus-edit.el 2011-01-09 21:05:53 +0000 @@ -2551,9 +2551,9 @@ (push (widget-create-child-and-convert widget 'custom-visibility :help-echo "Show the value of this option." - :on-image "down" + :on-glyph "down" :on "Hide" - :off-image "right" + :off-glyph "right" :off "Show Value" :action 'custom-toggle-hide-variable nil) @@ -2573,8 +2573,8 @@ :help-echo "Hide the value of this option." :on "Hide" :off "Show" - :on-image "down" - :off-image "right" + :on-glyph "down" + :off-glyph "right" :action 'custom-toggle-hide-variable t) buttons) @@ -2603,8 +2603,8 @@ :help-echo "Hide or show this option." :on "Hide" :off "Show" - :on-image "down" - :off-image "right" + :on-glyph "down" + :off-glyph "right" :action 'custom-toggle-hide-variable t) buttons) @@ -3056,8 +3056,8 @@ :pressed-face 'custom-visibility :mouse-face 'highlight :pressed-face 'highlight - :on-image nil - :off-image nil) + :on-glyph nil + :off-glyph nil) (defface custom-visibility '((t :height 0.8 :inherit link)) @@ -3120,7 +3120,7 @@ :pressed-face 'custom-visibility :mouse-face 'highlight :on "Hide Unused Attributes" :off "Show All Attributes" - :on-image nil :off-image nil + :on-glyph nil :off-glyph nil :always-active t :action 'custom-face-edit-value-visibility-action show-all) @@ -3475,7 +3475,7 @@ widget 'custom-visibility :help-echo "Hide or show this face." :on "Hide" :off "Show" - :on-image "down" :off-image "right" + :on-glyph "down" :off-glyph "right" :action 'custom-toggle-hide-face (not hiddenp)) buttons) === modified file 'lisp/wid-edit.el' --- lisp/wid-edit.el 2010-12-21 02:36:48 +0000 +++ lisp/wid-edit.el 2011-01-09 21:05:53 +0000 @@ -2162,21 +2162,13 @@ (defun widget-toggle-value-create (widget) "Insert text representing the `on' and `off' states." - (if (widget-value widget) - (let ((image (widget-get widget :on-glyph))) - (and (display-graphic-p) - (listp image) - (not (eq (car image) 'image)) - (widget-put widget :on-glyph (setq image (eval image)))) - (widget-image-insert widget - (widget-get widget :on) - image)) - (let ((image (widget-get widget :off-glyph))) - (and (display-graphic-p) - (listp image) - (not (eq (car image) 'image)) - (widget-put widget :off-glyph (setq image (eval image)))) - (widget-image-insert widget (widget-get widget :off) image)))) + (let* ((val (widget-value widget)) + (text (widget-get widget (if val :on :off))) + (img (widget-image-find + (widget-get widget (if val :on-glyph :off-glyph))))) + (widget-image-insert widget (or text "") + (if img + (append img '(:ascent center)))))) (defun widget-toggle-action (widget &optional event) ;; Toggle value. @@ -2816,34 +2808,22 @@ "An indicator and manipulator for hidden items. The following properties have special meanings for this widget: -:on-image Image filename or spec to display when the item is visible. +:on-glyph Image filename or spec to display when the item is visible. :on Text shown if the \"on\" image is nil or cannot be displayed. -:off-image Image filename or spec to display when the item is hidden. +:off-glyph Image filename or spec to display when the item is hidden. :off Text shown if the \"off\" image is nil cannot be displayed." :format "%[%v%]" :button-prefix "" :button-suffix "" - :on-image "down" + :on-glyph "down" :on "Hide" - :off-image "right" + :off-glyph "right" :off "Show" :value-create 'widget-visibility-value-create :action 'widget-toggle-action :match (lambda (widget value) t)) -(defun widget-visibility-value-create (widget) - ;; Insert text representing the `on' and `off' states. - (let* ((val (widget-value widget)) - (text (widget-get widget (if val :on :off))) - (img (widget-image-find - (widget-get widget (if val :on-image :off-image))))) - (widget-image-insert widget - (if text - (concat widget-push-button-prefix text - widget-push-button-suffix) - "") - (if img - (append img '(:ascent center)))))) +(defalias 'widget-visibility-value-create 'widget-toggle-value-create) ;;; The `documentation-link' Widget. ;; ------------------------------------------------------------ revno: 102803 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2011-01-09 20:34:20 +0100 message: Update dired.el diff: === modified file 'lisp/dired.el' --- lisp/dired.el 2011-01-08 19:17:23 +0000 +++ lisp/dired.el 2011-01-09 19:34:20 +0000 @@ -3562,7 +3562,7 @@ ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff -;;;;;; dired-diff) "dired-aux" "dired-aux.el" "db61da0d98435f468e41e92c12f99d3b") +;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2fbc81b9fecc09f713ec022d1f0365fa") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ ------------------------------------------------------------ revno: 102802 committer: Andreas Schwab branch nick: emacs timestamp: Sun 2011-01-09 20:34:19 +0100 message: * lisp/net/ldap.el (ldap-search-internal): Don't use eval. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 14:26:29 +0000 +++ lisp/ChangeLog 2011-01-09 19:34:19 +0000 @@ -1,3 +1,7 @@ +2011-01-09 Andreas Schwab + + * net/ldap.el (ldap-search-internal): Don't use eval. + 2011-01-09 Chong Yidong * subr.el (read-char-choice): Use read-key. === modified file 'lisp/net/ldap.el' --- lisp/net/ldap.el 2010-11-09 05:33:07 +0000 +++ lisp/net/ldap.el 2011-01-09 19:34:19 +0000 @@ -1,7 +1,7 @@ ;;; ldap.el --- client interface to LDAP for Emacs ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. ;; Author: Oscar Figueiredo ;; Maintainer: FSF @@ -556,13 +556,9 @@ (if (and sizelimit (not (equal "" sizelimit))) (setq arglist (nconc arglist (list (format "-z%s" sizelimit))))) - (eval `(call-process ldap-ldapsearch-prog - nil - buf - nil - ,@arglist - ,@ldap-ldapsearch-args - ,@filter)) + (apply #'call-process ldap-ldapsearch-prog + nil buf nil + (append arglist ldap-ldapsearch-args filter)) (insert "\n") (goto-char (point-min)) ------------------------------------------------------------ revno: 102801 committer: Tassilo Horn branch nick: trunk timestamp: Sun 2011-01-09 18:49:25 +0100 message: Add definition for `dired-directory' face. diff: === modified file 'etc/themes/tsdh-dark-theme.el' --- etc/themes/tsdh-dark-theme.el 2011-01-08 17:57:55 +0000 +++ etc/themes/tsdh-dark-theme.el 2011-01-09 17:49:25 +0000 @@ -31,6 +31,7 @@ '(diff-indicator-changed ((t (:weight bold)))) '(diff-indicator-removed ((t (:inherit diff-indicator-changed)))) '(diff-removed ((t (:inherit diff-changed :background "sandy brown")))) + '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold)))) '(hl-line ((t (:background "grey28")))) '(message-header-subject ((t (:foreground "SkyBlue")))) '(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold)))) === modified file 'etc/themes/tsdh-light-theme.el' --- etc/themes/tsdh-light-theme.el 2011-01-08 17:57:55 +0000 +++ etc/themes/tsdh-light-theme.el 2011-01-09 17:49:25 +0000 @@ -31,6 +31,7 @@ '(diff-indicator-changed ((t (:weight bold)))) '(diff-indicator-removed ((t (:inherit diff-indicator-changed)))) '(diff-removed ((t (:inherit diff-changed :background "sandy brown")))) + '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold)))) '(hl-line ((t (:background "grey95")))) '(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold)))) '(mode-line ((t (:box (:line-width -1 :color "red" :style released-button) :family "DejaVu Sans")))) ------------------------------------------------------------ revno: 102800 committer: Chong Yidong branch nick: trunk timestamp: Sun 2011-01-09 09:26:29 -0500 message: * lisp/subr.el (read-char-choice): Use read-key. Suggested by Stefan. * src/fns.c (Fyes_or_no_p): Minor doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 04:59:56 +0000 +++ lisp/ChangeLog 2011-01-09 14:26:29 +0000 @@ -1,5 +1,7 @@ 2011-01-09 Chong Yidong + * subr.el (read-char-choice): Use read-key. + * custom.el (custom-safe-themes): Rename from custom-safe-theme-files. Add :risky tag. (load-theme, custom-theme-load-confirm): Save sha1 hashes to === modified file 'lisp/subr.el' --- lisp/subr.el 2011-01-08 21:17:58 +0000 +++ lisp/subr.el 2011-01-09 14:26:29 +0000 @@ -1985,7 +1985,7 @@ (unless (get-text-property 0 'face prompt) (setq prompt (propertize prompt 'face 'minibuffer-prompt))) (setq char (let ((inhibit-quit inhibit-keyboard-quit)) - (read-event prompt))) + (read-key prompt))) (cond ((not (numberp char))) ((memq char chars) === modified file 'src/fns.c' --- src/fns.c 2011-01-08 21:17:58 +0000 +++ src/fns.c 2011-01-09 14:26:29 +0000 @@ -2464,8 +2464,8 @@ doc: /* Ask user a yes-or-no question. Return t if answer is yes. The string to display to ask the question is obtained by formatting the string PROMPT with arguments ARGS (see `format'). -The result should end in a space; `y-or-n-p' adds \"(yes or no) \" -to it. +The result should end in a space; `yes-or-no-p' adds +\"(yes or no) \" to it. The user must confirm the answer with RET, and can edit it until it has been confirmed. ------------------------------------------------------------ revno: 102799 committer: Chong Yidong branch nick: trunk timestamp: Sat 2011-01-08 23:59:56 -0500 message: Record "safe themes" as sha1 hashes, as suggested by Stefan Monnier. * lisp/custom.el (custom-safe-themes): Rename from custom-safe-theme-files. Add :risky tag. (load-theme, custom-theme-load-confirm): Save sha1 hashes to custom-safe-themes, not filenames. Suggested by Stefan Monnier. diff: === modified file 'etc/NEWS' --- etc/NEWS 2011-01-08 19:19:55 +0000 +++ etc/NEWS 2011-01-09 04:59:56 +0000 @@ -219,9 +219,10 @@ is to search in `custom-theme-directory', followed by a built-in theme directory named "themes/" in `data-directory'. -*** New option `custom-safe-theme-files' lists known-safe theme files. -If a theme is not in this list, Emacs queries before loading it. -The default value treats all themes included in Emacs as safe. +*** New option `custom-safe-themes' records known-safe theme files. +If a theme is not in this list, Emacs queries before loading it, and +offers to save the theme to `custom-safe-themes' automatically. By +default, all themes included in Emacs are treated as safe. ** The user option `remote-file-name-inhibit-cache' controls whether the remote file-name cache is used for read access. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-01-09 04:13:47 +0000 +++ lisp/ChangeLog 2011-01-09 04:59:56 +0000 @@ -1,5 +1,12 @@ 2011-01-09 Chong Yidong + * custom.el (custom-safe-themes): Rename from + custom-safe-theme-files. Add :risky tag. + (load-theme, custom-theme-load-confirm): Save sha1 hashes to + custom-safe-themes, not filenames. Suggested by Stefan Monnier. + +2011-01-09 Chong Yidong + * tool-bar.el (tool-bar-setup): Remove Help button. Remove label from Search and add a label to Undo. === modified file 'lisp/custom.el' --- lisp/custom.el 2011-01-08 19:19:55 +0000 +++ lisp/custom.el 2011-01-09 04:59:56 +0000 @@ -1105,14 +1105,16 @@ (let ((custom-enabling-themes t)) (enable-theme 'user)))) -(defcustom custom-safe-theme-files '(default) - "List of theme files that are considered safe to load. -Each list element should be either an absolute file name, or the -symbol `default', which stands for the built-in Emacs theme -directory (a directory named \"themes\" in `data-directory'." +(defcustom custom-safe-themes '(default) + "List of themes that are considered safe to load. +Each list element should be the `sha1' hash of a theme file, or +the symbol `default', which stands for any theme in the built-in +Emacs theme directory (a directory named \"themes\" in +`data-directory')." :type '(repeat - (choice file (const :tag "Built-in theme directory" default))) + (choice string (const :tag "Built-in themes" default))) :group 'customize + :risky t :version "24.1") (defvar safe-functions) ; From unsafep.el @@ -1140,74 +1142,74 @@ (put theme 'theme-documentation nil)) (let ((fn (locate-file (concat (symbol-name theme) "-theme.el") (custom-theme--load-path) - '("" "c")))) + '("" "c"))) + hash) (unless fn (error "Unable to find theme file for `%s'." theme)) - ;; Check file safety. - (when (or (and (memq 'default custom-safe-theme-files) - (equal (file-name-directory fn) - (expand-file-name "themes/" data-directory))) - (member fn custom-safe-theme-files) - ;; If the file is not in the builtin theme directory or - ;; in `custom-safe-theme-files', check it with unsafep. - (with-temp-buffer - (require 'unsafep) - (insert-file-contents fn) - (let ((safe-functions (append '(provide-theme deftheme - custom-theme-set-variables - custom-theme-set-faces) - safe-functions)) - unsafep form) - (while (and (setq form (condition-case nil - (let ((read-circle nil)) - (read (current-buffer))) - (end-of-file nil))) - (null (setq unsafep (unsafep form))))) - (or (null unsafep) - (custom-theme-load-confirm fn))))) - (let ((custom--inhibit-theme-enable no-enable)) - (load fn))))) + (with-temp-buffer + (insert-file-contents fn) + (setq hash (sha1 (current-buffer))) + ;; Check file safety. + (when (or (and (memq 'default custom-safe-themes) + (equal (file-name-directory fn) + (expand-file-name "themes/" data-directory))) + (member hash custom-safe-themes) + ;; If the theme is not in `custom-safe-themes', check + ;; it with unsafep. + (progn + (require 'unsafep) + (let ((safe-functions + (append '(provide-theme deftheme + custom-theme-set-variables + custom-theme-set-faces) + safe-functions)) + unsafep form) + (while (and (setq form (condition-case nil + (let ((read-circle nil)) + (read (current-buffer))) + (end-of-file nil))) + (null (setq unsafep (unsafep form))))) + (or (null unsafep) + (custom-theme-load-confirm hash))))) + (let ((custom--inhibit-theme-enable no-enable)) + (eval-buffer)))))) -(defun custom-theme-load-confirm (filename) +(defun custom-theme-load-confirm (hash) + "Query the user about loading a Custom theme that may not be safe. +The theme should be in the current buffer. If the user agrees, +query also about adding HASH to `custom-safe-themes'." (if noninteractive nil - (let ((existing-buffer (find-buffer-visiting filename)) - (exit-chars '(?y ?n ?\s ?\C-g)) + (let ((exit-chars '(?y ?n ?\s)) prompt char) (save-window-excursion - (if existing-buffer - (pop-to-buffer existing-buffer) - (find-file filename)) - (unwind-protect - (progn - (setq prompt - (format "This theme is not guaranteed to be safe. Really load? %s" - (if (< (line-number-at-pos (point-max)) - (window-body-height)) - "(y or n) " - (push ?\C-v exit-chars) - "Type y or n, or C-v to scroll: "))) - (goto-char (point-min)) - (while (null char) - (setq char (read-char-choice prompt exit-chars t)) - (when (eq char ?\C-v) - (condition-case nil - (scroll-up) - (error (goto-char (point-min)))) - (setq char nil))) - (when (memq char '(?\s ?y)) - (push filename custom-safe-theme-files) - ;; Offer to save to `custom-safe-theme-files'. - (and (or custom-file user-init-file) - (y-or-n-p "Treat %s as safe for future loads? " - (file-name-nondirectory filename)) - (let ((coding-system-for-read nil)) - (customize-save-variable - 'custom-safe-theme-files - custom-safe-theme-files))) - t)) - ;; Unwind form. - (unless existing-buffer (kill-buffer))))))) + (rename-buffer "*Custom Theme*" t) + (emacs-lisp-mode) + (display-buffer (current-buffer)) + (setq prompt + (format "This theme is not guaranteed to be safe. Really load? %s" + (if (< (line-number-at-pos (point-max)) + (window-body-height)) + "(y or n) " + (push ?\C-v exit-chars) + "Type y or n, or C-v to scroll: "))) + (goto-char (point-min)) + (while (null char) + (setq char (read-char-choice prompt exit-chars)) + (when (eq char ?\C-v) + (condition-case nil + (scroll-up) + (error (goto-char (point-min)))) + (setq char nil))) + (when (memq char '(?\s ?y)) + (push hash custom-safe-themes) + ;; Offer to save to `custom-safe-themes'. + (and (or custom-file user-init-file) + (y-or-n-p "Treat this theme as safe for future loads? ") + (let ((coding-system-for-read nil)) + (customize-save-variable 'custom-safe-themes + custom-safe-themes))) + t))))) (defun custom-theme-name-valid-p (name) "Return t if NAME is a valid name for a Custom theme, nil otherwise.