Update page-break-lines.el to latest version
This commit is contained in:
parent
5735221365
commit
fcb79bf55b
|
@ -63,26 +63,28 @@
|
|||
:prefix "page-break-lines-"
|
||||
:group 'faces)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-char ?─
|
||||
"Character used to render page break lines."
|
||||
:type 'character
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-lighter " PgLn"
|
||||
"Mode-line indicator for `page-break-lines-mode'."
|
||||
:type '(choice (const :tag "No lighter" "") string)
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defcustom page-break-lines-max-width nil
|
||||
"If non-nil, maximum width (in characters) of page break indicator.
|
||||
If nil, indicator will span the width of the frame."
|
||||
:type '(choice integer (const :tag "Full width" nil))
|
||||
:group 'page-break-lines)
|
||||
|
||||
(defcustom page-break-lines-modes
|
||||
'(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode help-mode)
|
||||
"Modes in which to enable `page-break-lines-mode'."
|
||||
:type '(repeat symbol)
|
||||
:group 'page-break-lines)
|
||||
|
||||
;;;###autoload
|
||||
(defface page-break-lines
|
||||
'((t :inherit font-lock-comment-face :bold nil :italic nil))
|
||||
"Face used to colorize page break lines.
|
||||
|
@ -98,7 +100,7 @@ displayed as a junk character."
|
|||
"Toggle Page Break Lines mode.
|
||||
|
||||
In Page Break mode, page breaks (^L characters) are displayed as a
|
||||
horizontal line of `page-break-string-char' characters."
|
||||
horizontal line of `page-break-lines-char' characters."
|
||||
:lighter page-break-lines-lighter
|
||||
:group 'page-break-lines
|
||||
(page-break-lines--update-display-tables))
|
||||
|
@ -133,11 +135,14 @@ its display table will be modified as necessary."
|
|||
0)))
|
||||
(width (- (/ wwidth-pix (frame-char-width) cwidth)
|
||||
(if (display-graphic-p) 0 1)))
|
||||
(width (if page-break-lines-max-width
|
||||
(min width page-break-lines-max-width)
|
||||
width))
|
||||
(glyph (make-glyph-code page-break-lines-char 'page-break-lines))
|
||||
(new-display-entry (vconcat (make-list width glyph))))
|
||||
(unless (equal new-display-entry (elt buffer-display-table ?\^L))
|
||||
(aset buffer-display-table ?\^L new-display-entry)))))
|
||||
(when (and (member major-mode page-break-lines-modes)
|
||||
(when (and (apply 'derived-mode-p page-break-lines-modes)
|
||||
buffer-display-table)
|
||||
(aset buffer-display-table ?\^L nil))))))
|
||||
|
||||
|
@ -165,10 +170,5 @@ When `major-mode' is listed in `page-break-lines-modes', then
|
|||
|
||||
|
||||
(provide 'page-break-lines)
|
||||
|
||||
;; Local Variables:
|
||||
;; coding: utf-8
|
||||
;; checkdoc-minor-mode: t
|
||||
;; End:
|
||||
|
||||
;;; page-break-lines.el ends here
|
||||
|
|
Loading…
Reference in a new issue