From beb99bf0ba11fb4746c4673be4617e11a4a3888d Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Fri, 22 Sep 2017 18:57:02 +0200 Subject: [PATCH] [Packages] Update --- .../hydra-autoloads.el | 4 +- .../hydra-examples.el | 0 .../hydra-ox.el | 0 .../hydra-pkg.el | 2 +- .../hydra.el | 167 +++++++++--------- .../lv.el | 0 .../multiple-cursors-pkg.el | 5 - .../mc-cycle-cursors.el | 0 .../mc-edit-lines.el | 0 .../mc-hide-unmatched-lines-mode.el | 0 .../mc-mark-more.el | 0 .../mc-mark-pop.el | 0 .../mc-separate-operations.el | 0 .../multiple-cursors-autoloads.el | 22 +-- .../multiple-cursors-core.el | 25 ++- .../multiple-cursors-pkg.el | 5 + .../multiple-cursors.el | 0 .../rectangular-region-mode.el | 0 .../page-break-lines-pkg.el | 2 - .../page-break-lines-autoloads.el | 4 +- .../page-break-lines-pkg.el | 2 + .../page-break-lines.el | 54 +++--- 22 files changed, 160 insertions(+), 132 deletions(-) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/hydra-autoloads.el (95%) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/hydra-examples.el (100%) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/hydra-ox.el (100%) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/hydra-pkg.el (64%) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/hydra.el (92%) rename elpa/{hydra-20170813.1058 => hydra-20170903.218}/lv.el (100%) delete mode 100644 elpa/multiple-cursors-20170813.38/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-cycle-cursors.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-edit-lines.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-hide-unmatched-lines-mode.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-mark-more.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-mark-pop.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/mc-separate-operations.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/multiple-cursors-autoloads.el (95%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/multiple-cursors-core.el (97%) create mode 100644 elpa/multiple-cursors-20170908.1452/multiple-cursors-pkg.el rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/multiple-cursors.el (100%) rename elpa/{multiple-cursors-20170813.38 => multiple-cursors-20170908.1452}/rectangular-region-mode.el (100%) delete mode 100644 elpa/page-break-lines-20170517.235/page-break-lines-pkg.el rename elpa/{page-break-lines-20170517.235 => page-break-lines-20170829.157}/page-break-lines-autoloads.el (98%) create mode 100644 elpa/page-break-lines-20170829.157/page-break-lines-pkg.el rename elpa/{page-break-lines-20170517.235 => page-break-lines-20170829.157}/page-break-lines.el (74%) diff --git a/elpa/hydra-20170813.1058/hydra-autoloads.el b/elpa/hydra-20170903.218/hydra-autoloads.el similarity index 95% rename from elpa/hydra-20170813.1058/hydra-autoloads.el rename to elpa/hydra-20170903.218/hydra-autoloads.el index b7e07e3..e02a331 100644 --- a/elpa/hydra-20170813.1058/hydra-autoloads.el +++ b/elpa/hydra-20170903.218/hydra-autoloads.el @@ -3,7 +3,7 @@ ;;; Code: (add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) -;;;### (autoloads nil "hydra" "hydra.el" (22942 51276 155994 337000)) +;;;### (autoloads nil "hydra" "hydra.el" (22981 14450 559411 900000)) ;;; Generated autoloads from hydra.el (autoload 'defhydra "hydra" "\ @@ -65,7 +65,7 @@ result of `defhydra'. ;;;*** ;;;### (autoloads nil nil ("hydra-examples.el" "hydra-ox.el" "hydra-pkg.el" -;;;;;; "lv.el") (22942 51276 167994 399000)) +;;;;;; "lv.el") (22981 14450 567411 943000)) ;;;*** diff --git a/elpa/hydra-20170813.1058/hydra-examples.el b/elpa/hydra-20170903.218/hydra-examples.el similarity index 100% rename from elpa/hydra-20170813.1058/hydra-examples.el rename to elpa/hydra-20170903.218/hydra-examples.el diff --git a/elpa/hydra-20170813.1058/hydra-ox.el b/elpa/hydra-20170903.218/hydra-ox.el similarity index 100% rename from elpa/hydra-20170813.1058/hydra-ox.el rename to elpa/hydra-20170903.218/hydra-ox.el diff --git a/elpa/hydra-20170813.1058/hydra-pkg.el b/elpa/hydra-20170903.218/hydra-pkg.el similarity index 64% rename from elpa/hydra-20170813.1058/hydra-pkg.el rename to elpa/hydra-20170903.218/hydra-pkg.el index 8736d59..05f762f 100644 --- a/elpa/hydra-20170813.1058/hydra-pkg.el +++ b/elpa/hydra-20170903.218/hydra-pkg.el @@ -1,4 +1,4 @@ -(define-package "hydra" "20170813.1058" "Make bindings that stick around." +(define-package "hydra" "20170903.218" "Make bindings that stick around." '((cl-lib "0.5")) :url "https://github.com/abo-abo/hydra" :keywords '("bindings")) diff --git a/elpa/hydra-20170813.1058/hydra.el b/elpa/hydra-20170903.218/hydra.el similarity index 92% rename from elpa/hydra-20170813.1058/hydra.el rename to elpa/hydra-20170903.218/hydra.el index c8f9d92..2eff8fe 100644 --- a/elpa/hydra-20170813.1058/hydra.el +++ b/elpa/hydra-20170903.218/hydra.el @@ -639,91 +639,92 @@ HEAD's binding is returned as a string wrapped with [] or {}." \"%`...\" expressions are extracted into \"%S\". _NAME, BODY, DOCSTRING and HEADS are parameters of `defhydra'. The expressions can be auto-expanded according to NAME." - (setq docstring (hydra--strip-align-markers docstring)) - (setq docstring (replace-regexp-in-string "___" "_β_" docstring)) - (let ((rest (if (eq (plist-get (cddr body) :hint) 'none) - "" - (hydra--hint body heads))) - (start 0) - varlist - offset) - (while (setq start - (string-match - (format - "\\(?:%%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:[_?]\\(%s\\)\\(%s\\)[_?]\\)" - hydra-width-spec-regex - hydra-key-regex) - docstring start)) - (cond ((eq ?? (aref (match-string 0 docstring) 0)) - (let* ((key (match-string 4 docstring)) - (head (assoc key heads))) - (if head - (progn - (push (nth 2 head) varlist) - (setq docstring - (replace-match - (or - hydra-doc-format-spec - (concat "%" (match-string 3 docstring) "s")) - t nil docstring))) - (setq start (match-end 0)) - (warn "Unrecognized key: ?%s?" key)))) - ((eq ?_ (aref (match-string 0 docstring) 0)) - (let* ((key (match-string 4 docstring)) - (key (if (equal key "β") "_" key)) - normal-key - (head (or (assoc key heads) - (when (setq normal-key - (cdr (assoc - key hydra-docstring-keys-translate-alist))) - (assoc normal-key heads))))) - (if head - (progn - (push (hydra-fontify-head (if normal-key - (cons key (cdr head)) - head) - body) - varlist) - (let ((replacement - (or - hydra-key-format-spec - (concat "%" (match-string 3 docstring) "s")))) + (unless (memq 'elisp--witness--lisp (mapcar #'cadr heads)) + (setq docstring (hydra--strip-align-markers docstring)) + (setq docstring (replace-regexp-in-string "___" "_β_" docstring)) + (let ((rest (if (eq (plist-get (cddr body) :hint) 'none) + "" + (hydra--hint body heads))) + (start 0) + varlist + offset) + (while (setq start + (string-match + (format + "\\(?:%%\\( ?-?[0-9]*s?\\)\\(`[a-z-A-Z/0-9]+\\|(\\)\\)\\|\\(?:[_?]\\(%s\\)\\(%s\\)[_?]\\)" + hydra-width-spec-regex + hydra-key-regex) + docstring start)) + (cond ((eq ?? (aref (match-string 0 docstring) 0)) + (let* ((key (match-string 4 docstring)) + (head (assoc key heads))) + (if head + (progn + (push (nth 2 head) varlist) (setq docstring - (replace-match replacement t nil docstring)) - (setq start (+ start (length replacement))))) - (setq start (match-end 0)) - (warn "Unrecognized key: _%s_" key)))) + (replace-match + (or + hydra-doc-format-spec + (concat "%" (match-string 3 docstring) "s")) + t nil docstring))) + (setq start (match-end 0)) + (warn "Unrecognized key: ?%s?" key)))) + ((eq ?_ (aref (match-string 0 docstring) 0)) + (let* ((key (match-string 4 docstring)) + (key (if (equal key "β") "_" key)) + normal-key + (head (or (assoc key heads) + (when (setq normal-key + (cdr (assoc + key hydra-docstring-keys-translate-alist))) + (assoc normal-key heads))))) + (if head + (progn + (push (hydra-fontify-head (if normal-key + (cons key (cdr head)) + head) + body) + varlist) + (let ((replacement + (or + hydra-key-format-spec + (concat "%" (match-string 3 docstring) "s")))) + (setq docstring + (replace-match replacement t nil docstring)) + (setq start (+ start (length replacement))))) + (setq start (match-end 0)) + (warn "Unrecognized key: _%s_" key)))) - (t - (let* ((varp (if (eq ?` (aref (match-string 2 docstring) 0)) 1 0)) - (spec (match-string 1 docstring)) - (lspec (length spec))) - (setq offset - (with-temp-buffer - (insert (substring docstring (+ 1 start varp - (length spec)))) - (goto-char (point-min)) - (push (read (current-buffer)) varlist) - (- (point) (point-min)))) - (when (or (zerop lspec) - (/= (aref spec (1- (length spec))) ?s)) - (setq spec (concat spec "S"))) - (setq docstring - (concat - (substring docstring 0 start) - "%" spec - (substring docstring (+ start offset 1 lspec varp)))))))) - (if (eq ?\n (aref docstring 0)) - `(concat (format ,(substring docstring 1) ,@(nreverse varlist)) - ,rest) - (let ((r `(replace-regexp-in-string - " +$" "" - (concat ,docstring ": " - (replace-regexp-in-string - "\\(%\\)" "\\1\\1" ,rest))))) - (if (stringp rest) - `(format ,(eval r)) - `(format ,r)))))) + (t + (let* ((varp (if (eq ?` (aref (match-string 2 docstring) 0)) 1 0)) + (spec (match-string 1 docstring)) + (lspec (length spec))) + (setq offset + (with-temp-buffer + (insert (substring docstring (+ 1 start varp + (length spec)))) + (goto-char (point-min)) + (push (read (current-buffer)) varlist) + (- (point) (point-min)))) + (when (or (zerop lspec) + (/= (aref spec (1- (length spec))) ?s)) + (setq spec (concat spec "S"))) + (setq docstring + (concat + (substring docstring 0 start) + "%" spec + (substring docstring (+ start offset 1 lspec varp)))))))) + (if (eq ?\n (aref docstring 0)) + `(concat (format ,(substring docstring 1) ,@(nreverse varlist)) + ,rest) + (let ((r `(replace-regexp-in-string + " +$" "" + (concat ,docstring ": " + (replace-regexp-in-string + "\\(%\\)" "\\1\\1" ,rest))))) + (if (stringp rest) + `(format ,(eval r)) + `(format ,r))))))) (defun hydra--complain (format-string &rest args) "Forward to (`message' FORMAT-STRING ARGS) unless `hydra-verbose' is nil." diff --git a/elpa/hydra-20170813.1058/lv.el b/elpa/hydra-20170903.218/lv.el similarity index 100% rename from elpa/hydra-20170813.1058/lv.el rename to elpa/hydra-20170903.218/lv.el diff --git a/elpa/multiple-cursors-20170813.38/multiple-cursors-pkg.el b/elpa/multiple-cursors-20170813.38/multiple-cursors-pkg.el deleted file mode 100644 index e393c7a..0000000 --- a/elpa/multiple-cursors-20170813.38/multiple-cursors-pkg.el +++ /dev/null @@ -1,5 +0,0 @@ -(define-package "multiple-cursors" "20170813.38" "Multiple cursors for Emacs." - '((cl-lib "0.5"))) -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/multiple-cursors-20170813.38/mc-cycle-cursors.el b/elpa/multiple-cursors-20170908.1452/mc-cycle-cursors.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-cycle-cursors.el rename to elpa/multiple-cursors-20170908.1452/mc-cycle-cursors.el diff --git a/elpa/multiple-cursors-20170813.38/mc-edit-lines.el b/elpa/multiple-cursors-20170908.1452/mc-edit-lines.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-edit-lines.el rename to elpa/multiple-cursors-20170908.1452/mc-edit-lines.el diff --git a/elpa/multiple-cursors-20170813.38/mc-hide-unmatched-lines-mode.el b/elpa/multiple-cursors-20170908.1452/mc-hide-unmatched-lines-mode.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-hide-unmatched-lines-mode.el rename to elpa/multiple-cursors-20170908.1452/mc-hide-unmatched-lines-mode.el diff --git a/elpa/multiple-cursors-20170813.38/mc-mark-more.el b/elpa/multiple-cursors-20170908.1452/mc-mark-more.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-mark-more.el rename to elpa/multiple-cursors-20170908.1452/mc-mark-more.el diff --git a/elpa/multiple-cursors-20170813.38/mc-mark-pop.el b/elpa/multiple-cursors-20170908.1452/mc-mark-pop.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-mark-pop.el rename to elpa/multiple-cursors-20170908.1452/mc-mark-pop.el diff --git a/elpa/multiple-cursors-20170813.38/mc-separate-operations.el b/elpa/multiple-cursors-20170908.1452/mc-separate-operations.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/mc-separate-operations.el rename to elpa/multiple-cursors-20170908.1452/mc-separate-operations.el diff --git a/elpa/multiple-cursors-20170813.38/multiple-cursors-autoloads.el b/elpa/multiple-cursors-20170908.1452/multiple-cursors-autoloads.el similarity index 95% rename from elpa/multiple-cursors-20170813.38/multiple-cursors-autoloads.el rename to elpa/multiple-cursors-20170908.1452/multiple-cursors-autoloads.el index 8e752e7..9b20d7e 100644 --- a/elpa/multiple-cursors-20170813.38/multiple-cursors-autoloads.el +++ b/elpa/multiple-cursors-20170908.1452/multiple-cursors-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) -;;;### (autoloads nil "mc-edit-lines" "mc-edit-lines.el" (22942 51258 -;;;;;; 659903 701000)) +;;;### (autoloads nil "mc-edit-lines" "mc-edit-lines.el" (22981 14420 +;;;;;; 295246 728000)) ;;; Generated autoloads from mc-edit-lines.el (autoload 'mc/edit-lines "mc-edit-lines" "\ @@ -34,7 +34,7 @@ Add one cursor to the beginning of each line in the active region. ;;;*** ;;;### (autoloads nil "mc-hide-unmatched-lines-mode" "mc-hide-unmatched-lines-mode.el" -;;;;;; (22942 51258 691903 867000)) +;;;;;; (22981 14420 327246 904000)) ;;; Generated autoloads from mc-hide-unmatched-lines-mode.el (autoload 'mc-hide-unmatched-lines-mode "mc-hide-unmatched-lines-mode" "\ @@ -48,8 +48,8 @@ mode. To leave this mode press or \"C-g\" ;;;*** -;;;### (autoloads nil "mc-mark-more" "mc-mark-more.el" (22942 51258 -;;;;;; 711903 971000)) +;;;### (autoloads nil "mc-mark-more" "mc-mark-more.el" (22981 14420 +;;;;;; 355247 56000)) ;;; Generated autoloads from mc-mark-more.el (autoload 'mc/mark-next-like-this "mc-mark-more" "\ @@ -246,8 +246,8 @@ Mark the tag we're in and its pair for renaming. ;;;*** -;;;### (autoloads nil "mc-mark-pop" "mc-mark-pop.el" (22942 51258 -;;;;;; 679903 805000)) +;;;### (autoloads nil "mc-mark-pop" "mc-mark-pop.el" (22981 14420 +;;;;;; 311246 816000)) ;;; Generated autoloads from mc-mark-pop.el (autoload 'mc/mark-pop "mc-mark-pop" "\ @@ -259,7 +259,7 @@ to the popped mark. ;;;*** ;;;### (autoloads nil "mc-separate-operations" "mc-separate-operations.el" -;;;;;; (22942 51258 695903 888000)) +;;;;;; (22981 14420 335246 947000)) ;;; Generated autoloads from mc-separate-operations.el (autoload 'mc/insert-numbers "mc-separate-operations" "\ @@ -299,7 +299,7 @@ Aligns all cursors with whitespace like `mc/vertical-align' does ;;;*** ;;;### (autoloads nil "multiple-cursors-core" "multiple-cursors-core.el" -;;;;;; (22942 51258 651903 661000)) +;;;;;; (22981 14420 263246 553000)) ;;; Generated autoloads from multiple-cursors-core.el (autoload 'multiple-cursors-mode "multiple-cursors-core" "\ @@ -310,7 +310,7 @@ Mode while multiple cursors are active. ;;;*** ;;;### (autoloads nil "rectangular-region-mode" "rectangular-region-mode.el" -;;;;;; (22942 51258 667903 743000)) +;;;;;; (22981 14420 303246 772000)) ;;; Generated autoloads from rectangular-region-mode.el (autoload 'set-rectangular-region-anchor "rectangular-region-mode" "\ @@ -329,7 +329,7 @@ A mode for creating a rectangular region to edit ;;;*** ;;;### (autoloads nil nil ("mc-cycle-cursors.el" "multiple-cursors-pkg.el" -;;;;;; "multiple-cursors.el") (22942 51258 715903 992000)) +;;;;;; "multiple-cursors.el") (22981 14420 371247 144000)) ;;;*** diff --git a/elpa/multiple-cursors-20170813.38/multiple-cursors-core.el b/elpa/multiple-cursors-20170908.1452/multiple-cursors-core.el similarity index 97% rename from elpa/multiple-cursors-20170813.38/multiple-cursors-core.el rename to elpa/multiple-cursors-20170908.1452/multiple-cursors-core.el index 96c4631..d448617 100644 --- a/elpa/multiple-cursors-20170813.38/multiple-cursors-core.el +++ b/elpa/multiple-cursors-20170908.1452/multiple-cursors-core.el @@ -330,6 +330,11 @@ cursor with updated info." :type '(boolean) :group 'multiple-cursors) +(defcustom mc/always-repeat-command nil + "Disables confirmation for `mc/repeat-command' command." + :type '(boolean) + :group 'multiple-cursors) + (defun mc/prompt-for-inclusion-in-whitelist (original-command) "Asks the user, then adds the command either to the once-list or the all-list." (let ((all-p (y-or-n-p (format "Do %S for all cursors?" original-command)))) @@ -442,6 +447,17 @@ you should disable multiple-cursors-mode." (multiple-cursors-mode 0) (deactivate-mark))) +(defun mc/repeat-command () + "Run last command from `command-history' for every fake cursor." + (interactive) + (when (or mc/always-repeat-command + (y-or-n-p (format "[mc] repeat complex command: %s? " (caar command-history)))) + (mc/execute-command-for-all-fake-cursors + (lambda () (interactive) + (cl-letf (((symbol-function 'read-from-minibuffer) + (lambda (p &optional i k r h d m) (read i)))) + (repeat-complex-command 0)))))) + (defvar mc/keymap nil "Keymap while multiple cursors are active. Main goal of the keymap is to rebind C-g and to conclude @@ -450,6 +466,7 @@ multiple cursors editing.") (setq mc/keymap (make-sparse-keymap)) (define-key mc/keymap (kbd "C-g") 'mc/keyboard-quit) (define-key mc/keymap (kbd "") 'multiple-cursors-mode) + (define-key mc/keymap (kbd "C-:") 'mc/repeat-command) (when (fboundp 'phi-search) (define-key mc/keymap (kbd "C-s") 'phi-search)) (when (fboundp 'phi-search-backward) @@ -551,7 +568,8 @@ from being executed if in multiple-cursors-mode." (unsupported-cmd isearch-backward ". Feel free to add a compatible version.") ;; Make sure pastes from other programs are added to all kill-rings when yanking -(defadvice current-kill (before interprogram-paste-for-all-cursors activate) +(defadvice current-kill (before interprogram-paste-for-all-cursors + (n &optional do-not-move) activate) (let ((interprogram-paste (and (= n 0) interprogram-paste-function (funcall interprogram-paste-function)))) @@ -656,6 +674,7 @@ for running commands with multiple cursors." mc/skip-to-previous-like-this rrm/switch-to-multiple-cursors mc-hide-unmatched-lines-mode + mc/repeat-command hum/keyboard-quit hum/unhide-invisible-overlays save-buffer @@ -664,6 +683,7 @@ for running commands with multiple cursors." exit-minibuffer minibuffer-complete-and-exit execute-extended-command + eval-expression undo redo undo-tree-undo @@ -697,7 +717,8 @@ for running commands with multiple cursors." windmove-left windmove-right windmove-up - windmove-down)) + windmove-down + repeat-complex-command)) (defvar mc--default-cmds-to-run-for-all nil "Default set of commands that should be mirrored by all cursors") diff --git a/elpa/multiple-cursors-20170908.1452/multiple-cursors-pkg.el b/elpa/multiple-cursors-20170908.1452/multiple-cursors-pkg.el new file mode 100644 index 0000000..8bcf41e --- /dev/null +++ b/elpa/multiple-cursors-20170908.1452/multiple-cursors-pkg.el @@ -0,0 +1,5 @@ +(define-package "multiple-cursors" "20170908.1452" "Multiple cursors for Emacs." + '((cl-lib "0.5"))) +;; Local Variables: +;; no-byte-compile: t +;; End: diff --git a/elpa/multiple-cursors-20170813.38/multiple-cursors.el b/elpa/multiple-cursors-20170908.1452/multiple-cursors.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/multiple-cursors.el rename to elpa/multiple-cursors-20170908.1452/multiple-cursors.el diff --git a/elpa/multiple-cursors-20170813.38/rectangular-region-mode.el b/elpa/multiple-cursors-20170908.1452/rectangular-region-mode.el similarity index 100% rename from elpa/multiple-cursors-20170813.38/rectangular-region-mode.el rename to elpa/multiple-cursors-20170908.1452/rectangular-region-mode.el diff --git a/elpa/page-break-lines-20170517.235/page-break-lines-pkg.el b/elpa/page-break-lines-20170517.235/page-break-lines-pkg.el deleted file mode 100644 index d2ed1e1..0000000 --- a/elpa/page-break-lines-20170517.235/page-break-lines-pkg.el +++ /dev/null @@ -1,2 +0,0 @@ -;;; -*- no-byte-compile: t -*- -(define-package "page-break-lines" "20170517.235" "Display ugly ^L page breaks as tidy horizontal lines" 'nil :commit "82f9100312dcc922fb66ff289faf5d4795d8ca7a" :url "https://github.com/purcell/page-break-lines" :keywords '("convenience" "faces")) diff --git a/elpa/page-break-lines-20170517.235/page-break-lines-autoloads.el b/elpa/page-break-lines-20170829.157/page-break-lines-autoloads.el similarity index 98% rename from elpa/page-break-lines-20170517.235/page-break-lines-autoloads.el rename to elpa/page-break-lines-20170829.157/page-break-lines-autoloads.el index bbb5d5a..9a598e1 100644 --- a/elpa/page-break-lines-20170517.235/page-break-lines-autoloads.el +++ b/elpa/page-break-lines-20170829.157/page-break-lines-autoloads.el @@ -3,8 +3,8 @@ ;;; Code: (add-to-list 'load-path (directory-file-name (or (file-name-directory #$) (car load-path)))) -;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (22830 -;;;;;; 24428 923863 486000)) +;;;### (autoloads nil "page-break-lines" "page-break-lines.el" (22981 +;;;;;; 14380 755029 874000)) ;;; Generated autoloads from page-break-lines.el (defvar page-break-lines-char 9472 "\ diff --git a/elpa/page-break-lines-20170829.157/page-break-lines-pkg.el b/elpa/page-break-lines-20170829.157/page-break-lines-pkg.el new file mode 100644 index 0000000..0717389 --- /dev/null +++ b/elpa/page-break-lines-20170829.157/page-break-lines-pkg.el @@ -0,0 +1,2 @@ +;;; -*- no-byte-compile: t -*- +(define-package "page-break-lines" "20170829.157" "Display ^L page breaks as tidy horizontal lines" 'nil :commit "913732ad06d838661989fb1fef05fcc9ca88f725" :url "https://github.com/purcell/page-break-lines" :keywords '("convenience" "faces")) diff --git a/elpa/page-break-lines-20170517.235/page-break-lines.el b/elpa/page-break-lines-20170829.157/page-break-lines.el similarity index 74% rename from elpa/page-break-lines-20170517.235/page-break-lines.el rename to elpa/page-break-lines-20170829.157/page-break-lines.el index a26d3ee..b7ba50a 100644 --- a/elpa/page-break-lines-20170517.235/page-break-lines.el +++ b/elpa/page-break-lines-20170829.157/page-break-lines.el @@ -1,11 +1,11 @@ -;;; page-break-lines.el --- Display ugly ^L page breaks as tidy horizontal lines +;;; page-break-lines.el --- Display ^L page breaks as tidy horizontal lines ;; Copyright (C) 2012-2015 Steve Purcell ;; Author: Steve Purcell ;; URL: https://github.com/purcell/page-break-lines -;; Package-Version: 20170517.235 -;; Package-X-Original-Version: DEV +;; Package-Version: 20170829.157 +;; Package-X-Original-Version: 0 ;; Keywords: convenience, faces ;; This program is free software; you can redistribute it and/or modify @@ -37,7 +37,7 @@ ;; If `page-break-lines-char' is displayed at a different width to ;; regular characters, the rule may be either too short or too long: -;; rules may then wrap if `truncate-lines' is nil. On some systems, +;; rules may then wrap if `truncate-lines' is nil. On some systems, ;; Emacs may erroneously choose a different font for the page break ;; symbol, which choice can be overridden using code such as: @@ -108,7 +108,8 @@ horizontal line of `page-break-string-char' characters." (dolist (hook '(window-configuration-change-hook 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)) @@ -118,28 +119,32 @@ horizontal line of `page-break-string-char' characters." If the buffer inside WINDOW has `page-break-lines-mode' enabled, its display table will be modified as necessary." (with-current-buffer (window-buffer window) - (if page-break-lines-mode - (progn - (unless buffer-display-table - (setq buffer-display-table (make-display-table))) - (let ((default-height (face-attribute 'default :height nil 'default))) - (set-face-attribute 'page-break-lines nil :height default-height) - (let* ((cwidth (char-width page-break-lines-char)) - (wwidth (window-width window)) - (width (if (zerop (% wwidth cwidth)) - (1- (/ wwidth cwidth)) - (/ wwidth cwidth))) - (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) - buffer-display-table) - (aset buffer-display-table ?\^L nil))))) + (with-selected-window window + (if page-break-lines-mode + (progn + (unless buffer-display-table + (setq buffer-display-table (make-display-table))) + (let ((default-height (face-attribute 'default :height nil 'default))) + (set-face-attribute 'page-break-lines nil :height default-height) + (let* ((cwidth (char-width page-break-lines-char)) + (wwidth (- (window-width) + (if (bound-and-true-p display-line-numbers) + (+ (line-number-display-width) 2) + 0) + (if (display-graphic-p) 0 1))) + (width (/ wwidth cwidth)) + (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) + buffer-display-table) + (aset buffer-display-table ?\^L nil)))))) (defun page-break-lines--update-display-tables (&optional frame) "Function called for updating display table in windows of FRAME." - (mapc 'page-break-lines--update-display-table (window-list frame 'no-minibuffer))) + (unless (minibufferp) + (mapc 'page-break-lines--update-display-table (window-list frame 'no-minibuffer)))) @@ -155,6 +160,7 @@ When `major-mode' is listed in `page-break-lines-modes', then ;;;###autoload (define-global-minor-mode global-page-break-lines-mode page-break-lines-mode page-break-lines-mode-maybe + :require 'page-break-lines :group 'page-break-lines)