From: Dave Love Date: Tue, 23 Jan 2001 14:23:51 +0000 (+0000) Subject: Merge more. X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a285ebc8f4ba0298b0f6050a2c00428ba888ee27;p=emacs.git Merge more. --- diff --git a/lisp/cus-face.el b/lisp/cus-face.el index 8d61ebddb2a..0819fb10ddf 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -3,7 +3,6 @@ ;; Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen -;; Maintainer: FSF ;; Keywords: help, faces ;; This file is part of GNU Emacs. @@ -290,7 +289,8 @@ If FRAME is nil, use the global defaults for FACE." (let* ((attribute (car (car attrs))) (value (face-attribute face attribute frame))) (setq attrs (cdr attrs)) - (unless (eq value 'unspecified) + (unless (or (eq value 'unspecified) + (and (null value) (memq attribute '(:inherit)))) (setq plist (cons attribute (cons value plist)))))) plist)) diff --git a/lisp/custom.el b/lisp/custom.el index 1b62aa92a6a..c2964c23c55 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -145,8 +145,8 @@ set to nil, as the value is no longer rogue." ((eq keyword :options) (if (get symbol 'custom-options) ;; Slow safe code to avoid duplicates. - (mapcar (lambda (option) - (custom-add-option symbol option)) + (mapc (lambda (option) + (custom-add-option symbol option)) value) ;; Fast code for the common case. (put symbol 'custom-options (copy-sequence value)))) @@ -649,24 +649,26 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (now (nth 2 entry)) (requests (nth 3 entry)) (comment (nth 4 entry)) - (set (or (get symbol 'custom-set) 'set-default))) + set) (when requests (put symbol 'custom-requests requests) - (mapcar 'require requests)) + (mapc 'require requests)) + (setq set (or (get symbol 'custom-set) 'custom-set-default)) (put symbol 'saved-value (list value)) (put symbol 'saved-variable-comment comment) (custom-push-theme 'theme-value symbol theme 'set value) ;; Allow for errors in the case where the setter has - ;; changed between versions, say. - (condition-case nil - (cond ((or now immediate) - ;; Rogue variable, set it now. - (put symbol 'force-value (if now 'rogue 'immediate)) - (funcall set symbol (eval value))) - ((default-boundp symbol) - ;; Something already set this, overwrite it. - (funcall set symbol (eval value)))) - (error nil)) + ;; changed between versions, say, but let the user know. + (condition-case data + (cond (now + ;; Rogue variable, set it now. + (put symbol 'force-value t) + (funcall set symbol (eval value))) + ((default-boundp symbol) + ;; Something already set this, overwrite it. + (funcall set symbol (eval value)))) + (error + (message "Error setting %s: %s" symbol data))) (setq args (cdr args)) (and (or now (default-boundp symbol)) (put symbol 'variable-comment comment))) @@ -680,7 +682,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')." (custom-push-theme 'theme-value symbol theme 'set value)) (setq args (cdr (cdr args)))))))) -;; FIXME: This function is never used? (defun custom-set-default (variable value) "Default :set function for a customizable variable. Normally, this sets the default value of VARIABLE to VALUE,