X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/4c14013dbec3a2f130a38e61e885f1e8cc6c325b..7e09ef09a479731d01b1ca46e94ddadd73ac98e3:/lisp/ps-def.el diff --git a/lisp/ps-def.el b/lisp/ps-def.el index 9122b8fdc9..5107329f59 100644 --- a/lisp/ps-def.el +++ b/lisp/ps-def.el @@ -1,6 +1,6 @@ ;;; ps-def.el --- XEmacs and Emacs definitions for ps-print -;; Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 2007-2015 Free Software Foundation, Inc. ;; Author: Vinicius Jose Latorre ;; Kenichi Handa (multi-byte characters) @@ -32,7 +32,7 @@ ;;; Code: (eval-and-compile - (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) + (unless (fboundp 'declare-function) (defmacro declare-function (&rest _r)))) (declare-function ps-plot-with-face "ps-print" (from to face)) (declare-function ps-plot-string "ps-print" (string)) @@ -60,13 +60,13 @@ ;; ps-mule (or (fboundp 'charset-dimension) - (defun charset-dimension (charset) 1)) ; ascii + (defun charset-dimension (_charset) 1)) ; ascii (or (fboundp 'char-width) - (defun char-width (char) 1)) ; ascii + (defun char-width (_char) 1)) ; ascii (or (fboundp 'encode-char) - (defun encode-char (ch ccs) + (defun encode-char (ch _ccs) ch)) ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -325,8 +325,6 @@ ;; Emacs (property-change from) (overlay-change from) - (save-buffer-invisibility-spec buffer-invisibility-spec) - (buffer-invisibility-spec nil) before-string after-string) (while (< from to) (and (< property-change to) ; Don't search for property change @@ -339,53 +337,11 @@ (setq position (min property-change overlay-change) before-string nil after-string nil) - ;; The code below is not quite correct, - ;; because a non-nil overlay invisible property - ;; which is inactive according to the current value - ;; of buffer-invisibility-spec nonetheless overrides - ;; a face text property. (setq face - (cond ((let ((prop (get-text-property from 'invisible))) - ;; Decide whether this invisible property - ;; really makes the text invisible. - (if (eq save-buffer-invisibility-spec t) - (not (null prop)) - (or (memq prop save-buffer-invisibility-spec) - (assq prop save-buffer-invisibility-spec)))) + (cond ((invisible-p from) 'emacs--invisible--face) - ((get-text-property from 'face)) + ((get-char-property from 'face)) (t 'default))) - (let ((overlays (overlays-at from)) - (face-priority -1)) ; text-property - (while (and overlays - (not (eq face 'emacs--invisible--face))) - (let* ((overlay (car overlays)) - (overlay-invisible - (overlay-get overlay 'invisible)) - (overlay-priority - (or (overlay-get overlay 'priority) 0))) - (and (> overlay-priority face-priority) - (setq before-string - (or (overlay-get overlay 'before-string) - before-string) - after-string - (or (and (<= (overlay-end overlay) position) - (overlay-get overlay 'after-string)) - after-string) - face-priority overlay-priority - face - (cond - ((if (eq save-buffer-invisibility-spec t) - (not (null overlay-invisible)) - (or (memq overlay-invisible - save-buffer-invisibility-spec) - (assq overlay-invisible - save-buffer-invisibility-spec))) - 'emacs--invisible--face) - ((overlay-get overlay 'face)) - (t face) - )))) - (setq overlays (cdr overlays)))) ;; Plot up to this record. (and before-string (ps-plot-string before-string)) @@ -402,5 +358,4 @@ (provide 'ps-def) -;; arch-tag: 4edde45b-af10-4685-b8ee-7cd0f951095a ;;; ps-def.el ends here