(error "No faces matching \"%s\"" regexp))
(setq max-length (1+ max-length)
line-format (format "%%-%ds" max-length))
- (with-output-to-temp-buffer "*Faces*"
+ (with-help-window "*Faces*"
(save-excursion
(set-buffer standard-output)
(setq truncate-lines t)
(while (not (eobp))
(insert-char ?\s max-length)
(forward-line 1))))
- (goto-char (point-min)))
- (print-help-return-message))
+ (goto-char (point-min))))
;; If the *Faces* buffer appears in a different frame,
;; copy all the face definitions from FRAME,
;; so that the display will reflect the frame that was selected.
(setq face 'default))
(if (not (listp face))
(setq face (list face)))
- (with-output-to-temp-buffer (help-buffer)
+ (with-help-window (help-buffer)
(save-excursion
(set-buffer standard-output)
(dolist (f face)
(re-search-backward ": \\([^:]+\\)" nil t)
(help-xref-button 1 'help-face attr)))
(insert "\n")))))
- (terpri)))
- (print-help-return-message))))
+ (terpri))))))
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(get face 'saved-face)
(face-default-spec face)))
-(defsubst face-normalize-spec (spec)
- "Return a normalized face-spec of SPEC."
- (let (normalized-spec)
- (while spec
- (let ((attribute (car spec))
- (value (car (cdr spec))))
- ;; Support some old-style attribute names and values.
- (case attribute
- (:bold (setq attribute :weight value (if value 'bold 'normal)))
- (:italic (setq attribute :slant value (if value 'italic 'normal)))
- ((:foreground :background)
- ;; Compatibility with 20.x. Some bogus face specs seem to
- ;; exist containing things like `:foreground nil'.
- (if (null value) (setq value 'unspecified)))
- (t (unless (assq attribute face-x-resources)
- (setq attribute nil))))
- (when attribute
- (push attribute normalized-spec)
- (push value normalized-spec)))
- (setq spec (cdr (cdr spec))))
- (nreverse normalized-spec)))
-
\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Frame-type independent color support.
;; be unmodified, so we can avoid consing in the common case.
(dolist (face (face-list))
(when (not (face-spec-match-p face
- (face-normalize-spec
- (face-user-default-spec face))
+ (face-user-default-spec face)
(selected-frame)))
(push face locally-modified-faces)))
;; Now change to the new frame parameters
(x-handle-reverse-video frame parameters)
(frame-set-background-mode frame)
(face-set-after-frame-default frame)
- ;; Arrange for the kill and yank functions to set and check the clipboard.
- (modify-frame-parameters
- frame '((interprogram-cut-function . x-select-text)))
- (modify-frame-parameters
- frame '((interprogram-paste-function . x-cut-buffer-or-selection-value)))
;; Make sure the tool-bar is ready to be enabled. The
;; `tool-bar-lines' frame parameter will not take effect
;; without this call.
(with-selected-frame frame
(tty-handle-reverse-video frame (frame-parameters frame))
- ;; Make sure the kill and yank functions do not touch the X clipboard.
- (modify-frame-parameters frame '((interprogram-cut-function . nil)))
- (modify-frame-parameters frame '((interprogram-paste-function . nil)))
-
(unless (terminal-parameter frame 'terminal-initted)
(set-terminal-parameter frame 'terminal-initted t)
(set-locale-environment nil frame)