Add missing stable version of `page-break-lines'
This commit is contained in:
parent
e6f0ee11f8
commit
5982ba4427
|
@ -10,42 +10,23 @@
|
||||||
;;;;;; 0 0 0))
|
;;;;;; 0 0 0))
|
||||||
;;; Generated autoloads from page-break-lines.el
|
;;; Generated autoloads from page-break-lines.el
|
||||||
|
|
||||||
(defvar page-break-lines-char 9472 "\
|
|
||||||
Character used to render page break lines.")
|
|
||||||
|
|
||||||
(custom-autoload 'page-break-lines-char "page-break-lines" t)
|
|
||||||
|
|
||||||
(defvar page-break-lines-lighter " PgLn" "\
|
|
||||||
Mode-line indicator for `page-break-lines-mode'.")
|
|
||||||
|
|
||||||
(custom-autoload 'page-break-lines-lighter "page-break-lines" t)
|
|
||||||
|
|
||||||
(defvar 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.")
|
|
||||||
|
|
||||||
(custom-autoload 'page-break-lines-max-width "page-break-lines" t)
|
|
||||||
|
|
||||||
(defvar 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'.")
|
|
||||||
|
|
||||||
(custom-autoload 'page-break-lines-modes "page-break-lines" t)
|
|
||||||
|
|
||||||
(defface page-break-lines '((t :inherit font-lock-comment-face :bold nil :italic nil)) "\
|
|
||||||
Face used to colorize page break lines.
|
|
||||||
If using :bold or :italic, please ensure `page-break-lines-char'
|
|
||||||
is available in that variant of your font, otherwise it may be
|
|
||||||
displayed as a junk character." :group (quote page-break-lines))
|
|
||||||
|
|
||||||
(autoload 'page-break-lines-mode "page-break-lines" "\
|
(autoload 'page-break-lines-mode "page-break-lines" "\
|
||||||
Toggle Page Break Lines mode.
|
Toggle Page Break Lines mode.
|
||||||
|
|
||||||
In Page Break mode, page breaks (^L characters) are displayed as a
|
In Page Break mode, page breaks (^L characters) are displayed as a
|
||||||
horizontal line of `page-break-lines-char' characters.
|
horizontal line of `page-break-string-char' characters.
|
||||||
|
|
||||||
\(fn &optional ARG)" t nil)
|
\(fn &optional ARG)" t nil)
|
||||||
|
|
||||||
(define-obsolete-function-alias 'turn-on-page-break-lines-mode 'page-break-lines-mode)
|
(autoload 'turn-on-page-break-lines-mode "page-break-lines" "\
|
||||||
|
Enable `page-break-lines-mode' in this buffer.
|
||||||
|
|
||||||
|
\(fn)" nil nil)
|
||||||
|
|
||||||
|
(autoload 'turn-off-page-break-lines-mode "page-break-lines" "\
|
||||||
|
Disable `page-break-lines-mode' in this buffer.
|
||||||
|
|
||||||
|
\(fn)" nil nil)
|
||||||
|
|
||||||
(autoload 'page-break-lines-mode-maybe "page-break-lines" "\
|
(autoload 'page-break-lines-mode-maybe "page-break-lines" "\
|
||||||
Enable `page-break-lines-mode' in the current buffer if desired.
|
Enable `page-break-lines-mode' in the current buffer if desired.
|
||||||
|
@ -76,7 +57,7 @@ See `page-break-lines-mode' for more information on Page-Break-Lines mode.
|
||||||
|
|
||||||
\(fn &optional ARG)" t nil)
|
\(fn &optional ARG)" t nil)
|
||||||
|
|
||||||
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "page-break-lines" '("page-break-lines--update-display-table")))
|
(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "page-break-lines" '("page-break-lines-")))
|
||||||
|
|
||||||
;;;***
|
;;;***
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
;;; -*- no-byte-compile: t -*-
|
||||||
|
(define-package "page-break-lines" "0.11" "Display ugly ^L page breaks as tidy horizontal lines" 'nil :commit "67b5928a7f14568baf2716b5741e13659a86b9ea" :keywords '("convenience" "faces") :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :url "https://github.com/purcell/page-break-lines")
|
|
@ -1,12 +1,11 @@
|
||||||
;;; page-break-lines.el --- Display ^L page breaks as tidy horizontal lines
|
;;; page-break-lines.el --- Display ugly ^L page breaks as tidy horizontal lines
|
||||||
|
|
||||||
;; Copyright (C) 2012-2015 Steve Purcell
|
;; Copyright (C) 2012-2015 Steve Purcell
|
||||||
|
|
||||||
;; Author: Steve Purcell <steve@sanityinc.com>
|
;; Author: Steve Purcell <steve@sanityinc.com>
|
||||||
;; URL: https://github.com/purcell/page-break-lines
|
;; URL: https://github.com/purcell/page-break-lines
|
||||||
;; Package-Version: 20190519.2238
|
;; Package-Version: 0.11
|
||||||
;; Package-X-Original-Version: 0
|
;; Package-X-Original-Version: DEV
|
||||||
;; Package-Requires: ((emacs "24.4"))
|
|
||||||
;; Keywords: convenience, faces
|
;; Keywords: convenience, faces
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -64,33 +63,22 @@
|
||||||
:prefix "page-break-lines-"
|
:prefix "page-break-lines-"
|
||||||
:group 'faces)
|
:group 'faces)
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defcustom page-break-lines-char ?─
|
(defcustom page-break-lines-char ?─
|
||||||
"Character used to render page break lines."
|
"Character used to render page break lines."
|
||||||
:type 'character
|
:type 'character
|
||||||
:group 'page-break-lines)
|
:group 'page-break-lines)
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defcustom page-break-lines-lighter " PgLn"
|
(defcustom page-break-lines-lighter " PgLn"
|
||||||
"Mode-line indicator for `page-break-lines-mode'."
|
"Mode-line indicator for `page-break-lines-mode'."
|
||||||
:type '(choice (const :tag "No lighter" "") string)
|
:type '(choice (const :tag "No lighter" "") string)
|
||||||
:group 'page-break-lines)
|
: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)
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defcustom page-break-lines-modes
|
(defcustom page-break-lines-modes
|
||||||
'(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode help-mode)
|
'(emacs-lisp-mode lisp-mode scheme-mode compilation-mode outline-mode help-mode)
|
||||||
"Modes in which to enable `page-break-lines-mode'."
|
"Modes in which to enable `page-break-lines-mode'."
|
||||||
:type '(repeat symbol)
|
:type '(repeat symbol)
|
||||||
:group 'page-break-lines)
|
:group 'page-break-lines)
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defface page-break-lines
|
(defface page-break-lines
|
||||||
'((t :inherit font-lock-comment-face :bold nil :italic nil))
|
'((t :inherit font-lock-comment-face :bold nil :italic nil))
|
||||||
"Face used to colorize page break lines.
|
"Face used to colorize page break lines.
|
||||||
|
@ -106,18 +94,25 @@ displayed as a junk character."
|
||||||
"Toggle Page Break Lines mode.
|
"Toggle Page Break Lines mode.
|
||||||
|
|
||||||
In Page Break mode, page breaks (^L characters) are displayed as a
|
In Page Break mode, page breaks (^L characters) are displayed as a
|
||||||
horizontal line of `page-break-lines-char' characters."
|
horizontal line of `page-break-string-char' characters."
|
||||||
:lighter page-break-lines-lighter
|
:lighter page-break-lines-lighter
|
||||||
:group 'page-break-lines
|
:group 'page-break-lines
|
||||||
(page-break-lines--update-display-tables))
|
(page-break-lines--update-display-tables))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-obsolete-function-alias 'turn-on-page-break-lines-mode 'page-break-lines-mode)
|
(defun turn-on-page-break-lines-mode ()
|
||||||
|
"Enable `page-break-lines-mode' in this buffer."
|
||||||
|
(page-break-lines-mode 1))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun turn-off-page-break-lines-mode ()
|
||||||
|
"Disable `page-break-lines-mode' in this buffer."
|
||||||
|
(page-break-lines-mode -1))
|
||||||
|
|
||||||
|
|
||||||
(dolist (hook '(window-configuration-change-hook
|
(dolist (hook '(window-configuration-change-hook
|
||||||
window-size-change-functions
|
window-size-change-functions
|
||||||
after-setting-font-hook
|
after-setting-font-hook))
|
||||||
display-line-numbers-mode-hook))
|
|
||||||
(add-hook hook 'page-break-lines--update-display-tables))
|
(add-hook hook 'page-break-lines--update-display-tables))
|
||||||
|
|
||||||
|
|
||||||
|
@ -127,35 +122,23 @@ horizontal line of `page-break-lines-char' characters."
|
||||||
If the buffer inside WINDOW has `page-break-lines-mode' enabled,
|
If the buffer inside WINDOW has `page-break-lines-mode' enabled,
|
||||||
its display table will be modified as necessary."
|
its display table will be modified as necessary."
|
||||||
(with-current-buffer (window-buffer window)
|
(with-current-buffer (window-buffer window)
|
||||||
(with-selected-window window
|
|
||||||
(if page-break-lines-mode
|
(if page-break-lines-mode
|
||||||
(progn
|
(progn
|
||||||
(unless buffer-display-table
|
(unless buffer-display-table
|
||||||
(setq buffer-display-table (make-display-table)))
|
(setq buffer-display-table (make-display-table)))
|
||||||
(let ((default-height (face-attribute 'default :height nil 'default)))
|
(let ((default-height (face-attribute 'default :height nil 'default)))
|
||||||
(set-face-attribute 'page-break-lines nil :height default-height)
|
(set-face-attribute 'page-break-lines nil :height default-height)
|
||||||
(let* ((cwidth (char-width page-break-lines-char))
|
(let* ((width (- (window-width window) 1))
|
||||||
(wwidth-pix (- (window-width nil t)
|
|
||||||
(if (bound-and-true-p display-line-numbers)
|
|
||||||
(line-number-display-width t)
|
|
||||||
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))
|
(glyph (make-glyph-code page-break-lines-char 'page-break-lines))
|
||||||
(new-display-entry (vconcat (make-list width glyph))))
|
(new-display-entry (vconcat (make-list width glyph))))
|
||||||
(unless (equal new-display-entry (elt buffer-display-table ?\^L))
|
(unless (equal new-display-entry (elt buffer-display-table ?\^L))
|
||||||
(aset buffer-display-table ?\^L new-display-entry)))))
|
(aset buffer-display-table ?\^L new-display-entry)))))
|
||||||
(when (and (apply 'derived-mode-p page-break-lines-modes)
|
(when buffer-display-table
|
||||||
buffer-display-table)
|
(aset buffer-display-table ?\^L nil)))))
|
||||||
(aset buffer-display-table ?\^L nil))))))
|
|
||||||
|
|
||||||
(defun page-break-lines--update-display-tables (&optional frame)
|
(defun page-break-lines--update-display-tables (&optional frame)
|
||||||
"Function called for updating display table in windows of FRAME."
|
"Function called for updating display table in windows of FRAME."
|
||||||
(unless (minibufferp)
|
(mapc 'page-break-lines--update-display-table (window-list frame 'no-minibuffer)))
|
||||||
(mapc 'page-break-lines--update-display-table (window-list frame 'no-minibuffer))))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,7 +154,6 @@ When `major-mode' is listed in `page-break-lines-modes', then
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-global-minor-mode global-page-break-lines-mode
|
(define-global-minor-mode global-page-break-lines-mode
|
||||||
page-break-lines-mode page-break-lines-mode-maybe
|
page-break-lines-mode page-break-lines-mode-maybe
|
||||||
:require 'page-break-lines
|
|
||||||
:group 'page-break-lines)
|
:group 'page-break-lines)
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,6 +161,7 @@ When `major-mode' is listed in `page-break-lines-modes', then
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; coding: utf-8
|
;; coding: utf-8
|
||||||
|
;; byte-compile-warnings: (not cl-functions)
|
||||||
;; checkdoc-minor-mode: t
|
;; checkdoc-minor-mode: t
|
||||||
;; End:
|
;; End:
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
;;; -*- no-byte-compile: t -*-
|
|
||||||
(define-package "page-break-lines" "20190519.2238" "Display ^L page breaks as tidy horizontal lines" '((emacs "24.4")) :commit "6f19d894bda6a981c10a58df5e23419f4d2ba353" :keywords '("convenience" "faces") :authors '(("Steve Purcell" . "steve@sanityinc.com")) :maintainer '("Steve Purcell" . "steve@sanityinc.com") :url "https://github.com/purcell/page-break-lines")
|
|
Loading…
Reference in New Issue