X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Ffaces.el;h=a4f56eadda4bff5ac38cdaf92dcc3939e6398754;hb=78726176cc719729876679abc2d20576c55dc32d;hp=d92f15fdaaf690c2a2c3c78eba5c334b65645dce;hpb=426fe636212336bb32a5e6f187c4d623709fa57d;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/faces.el b/lisp/faces.el index d92f15f..a4f56ea 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -847,10 +847,21 @@ the function to be called on it." (setq temp-sp (copy-specifier sp)) - (if (and (or (eq locale 'global) (eq locale 'all) (not locale)) - (not (face-property face property 'global))) - (copy-specifier (face-property 'default property) - temp-sp 'global)) + (if (or (eq locale 'global) (eq locale 'all) (not locale)) + (when (not (specifier-specs temp-sp 'global)) + ;; Try fallback via the official ways and then do it "by hand" + (let* ((fallback (specifier-fallback sp)) + (fallback-sp + (cond ((specifierp fallback) fallback) + ;; just an inst list + (fallback + (make-specifier-and-init (specifier-type sp) + fallback)) + ((eq (get-face face) (get-face 'default)) + (error "Unable to find global specification")) + ;; If no fallback we snoop from default + (t (face-property 'default property))))) + (copy-specifier fallback-sp temp-sp 'global)))) (if (and (valid-specifier-locale-p locale) (not (specifier-specs temp-sp locale))) (error "Property must have a specification in locale %S" locale)) @@ -1603,10 +1614,12 @@ and 'global)." (defun face-complain-about-font (face device) (if (symbolp face) (setq face (symbol-name face))) ;; (if (not inhibit-font-complaints) - (display-warning - 'font - (let ((default-name (face-font-name 'default device))) - (format "%s: couldn't deduce %s %s version of the font + ;; complaining for printers is generally annoying. + (unless (device-printer-p device) + (display-warning + 'font + (let ((default-name (face-font-name 'default device))) + (format "%s: couldn't deduce %s %s version of the font %S. Please specify X resources to make the %s face @@ -1616,14 +1629,14 @@ For example, you could add one of the following to $HOME/Emacs: Emacs.%s.attributeFont: -dt-*-medium-i-* or Emacs.%s.attributeForeground: hotpink\n" - invocation-name - (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") - face - default-name - face - face - face - )))) + invocation-name + (if (string-match "\\`[aeiouAEIOU]" face) "an" "a") + face + default-name + face + face + face + ))))) ;; #### This is quite a mess. We should use the custom mechanism for @@ -1765,7 +1778,7 @@ in that frame; otherwise change each frame." (make-face 'underline "Underlined text.") (or (face-differs-from-default-p 'underline) (set-face-underline-p 'underline t 'global '(default))) -(make-face 'zmacs-region "Used on highlightes region between point and mark.") +(make-face 'zmacs-region "Used on highlighted region between point and mark.") (make-face 'isearch "Used on region matched by isearch.") (make-face 'isearch-secondary "Face to use for highlighting all matches.") (make-face 'list-mode-item-selected