[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/zones 3d5fa31 08/43: no summary available
From: |
Stefan Monnier |
Subject: |
[elpa] externals/zones 3d5fa31 08/43: no summary available |
Date: |
Sun, 28 Oct 2018 15:05:54 -0400 (EDT) |
branch: externals/zones
commit 3d5fa31dfde2e8e9751c1cc71d4044cd4ed665c7
Author: DrewAdams <address@hidden>
Commit: Alex Schroeder <address@hidden>
no summary available
---
zones.el | 57 ++++++++++++++++++++++++++++++---------------------------
1 file changed, 30 insertions(+), 27 deletions(-)
diff --git a/zones.el b/zones.el
index fb4159b..5642ad7 100644
--- a/zones.el
+++ b/zones.el
@@ -8,9 +8,9 @@
;; Created: Sun Apr 18 12:58:07 2010 (-0700)
;; Version: 2015-08-16
;; Package-Requires: ()
-;; Last-Updated: Tue Aug 18 09:16:42 2015 (-0700)
+;; Last-Updated: Tue Aug 18 09:50:16 2015 (-0700)
;; By: dradams
-;; Update #: 1544
+;; Update #: 1550
;; URL: http://www.emacswiki.org/zones.el
;; Doc URL: http://www.emacswiki.org/Zones
;; Doc URL: http://www.emacswiki.org/MultipleNarrowings
@@ -374,7 +374,8 @@
;;(@* "Change log")
;;
;; 2015/08/18 dadams
-;; zz-narrow: Set zz-lighter-narrowing-part anyway, even if
mode-line-modes is not bound. (Can use in msgs.)
+;; zz-narrowing-lighter: Moved mode-line-modes boundp guard here.
+;; zz-narrow: Removed mode-line-modes boundp guard. OK to set
zz-lighter-narrowing-part here.
;; 2015/08/16 dadams
;; Merged content of wide-n.el here (wide-n.el is obsolete now - this
replaces it).
;; Added: zz-zone-has-other-buffer-marker-p.
@@ -912,13 +913,13 @@ With a numeric prefix arg N, widen abs(N) times (to the
abs(N)th
(/= (- (point-max) (point-min))
(buffer-size)))) ; = `buffer-narrowed-p'.
(widen)
(setq zz-lighter-narrowing-part "")
- (when (boundp 'mode-line-modes) (zz-narrowing-lighter))
+ (zz-narrowing-lighter)
(when msgp (message "No longer narrowed")))
((= (prefix-numeric-value arg) 0)
(set var ())
(widen)
(setq zz-lighter-narrowing-part "")
- (when (boundp 'mode-line-modes) (zz-narrowing-lighter))
+ (zz-narrowing-lighter)
(when msgp (message "No longer narrowed; no more narrowings")))
(t
(setq arg (prefix-numeric-value arg))
@@ -946,34 +947,36 @@ With a numeric prefix arg N, widen abs(N) times (to the
abs(N)th
(setq other-buf (marker-buffer other-buf)))
(pop-to-buffer other-buf))
(narrow-to-region beg end)
- (when (boundp 'mode-line-modes) (zz-narrowing-lighter)))
+ (zz-narrowing-lighter))
(args-out-of-range (set var (cdr val))
(error "Restriction removed because of
invalid limits"))
(error (error "%s" (error-message-string err)))))))))
(defun zz-narrowing-lighter ()
"Update minor-mode mode-line lighter to reflect narrowing/widening.
-Put `zz-narrow' on `mouse-2' for the lighter suffix."
- (let* ((%n-cons (zz-regexp-car-member "%n\\(.*\\)\\'" mode-line-modes)))
- (when %n-cons
- (setcar %n-cons (replace-regexp-in-string
- "%n\\(.*\\)"
- (if (/= (- (point-max) (point-min)) (buffer-size)) ;
`buffer-narrowed-p', for older Emacs
- zz-lighter-narrowing-part
- "")
- (car %n-cons) nil nil 1))
- (when (> (length (car %n-cons)) 2)
- (set-text-properties 2
- (length (car %n-cons))
- '(local-map (keymap (mode-line keymap (mouse-2 .
zz-narrow)))
- mouse-face mode-line-highlight
- help-echo "mouse-2: Next Restriction")
- (car %n-cons)))
- ;; Dunno why we need to do this. Tried adjusting `rear-sticky' and
`front-sticky',
- ;; but without this the whole field (not just the suffix) gets changed,
in effect, to the above spec.
- (set-text-properties 0 2 '(local-map (keymap (mode-line keymap (mouse-2
. mode-line-widen)))
- mouse-face mode-line-highlight help-echo
"mouse-2: Widen")
- (car %n-cons)))))
+Put `zz-narrow' on `mouse-2' for the lighter suffix.
+\(Do nothing unless `mode-line-modes' is bound (Emacs 22+).)"
+ (when (boundp 'mode-line-modes)
+ (let* ((%n-cons (zz-regexp-car-member "%n\\(.*\\)\\'" mode-line-modes)))
+ (when %n-cons
+ (setcar %n-cons (replace-regexp-in-string
+ "%n\\(.*\\)"
+ (if (/= (- (point-max) (point-min)) (buffer-size)) ;
`buffer-narrowed-p', for older Emacs
+ zz-lighter-narrowing-part
+ "")
+ (car %n-cons) nil nil 1))
+ (when (> (length (car %n-cons)) 2)
+ (set-text-properties 2
+ (length (car %n-cons))
+ '(local-map (keymap (mode-line keymap (mouse-2
. zz-narrow)))
+ mouse-face mode-line-highlight
+ help-echo "mouse-2: Next Restriction")
+ (car %n-cons)))
+ ;; Dunno why we need to do this. Tried adjusting `rear-sticky' and
`front-sticky',
+ ;; but without this the whole field (not just the suffix) gets
changed, in effect, to the above spec.
+ (set-text-properties 0 2 '(local-map (keymap (mode-line keymap
(mouse-2 . mode-line-widen)))
+ mouse-face mode-line-highlight help-echo
"mouse-2: Widen")
+ (car %n-cons))))))
(defun zz-regexp-car-member (regexp xs)
"Like `member', but tests by matching REGEXP against cars."
- [elpa] branch externals/zones created (now 2ebb425), Stefan Monnier, 2018/10/28
- [elpa] externals/zones a8512bd 05/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 642b1b2 02/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 86d73d1 03/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones f29e616 04/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones e61ac2c 07/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones f6a4c19 10/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones e28169f 11/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 08146ae 14/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones a8a4c72 16/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 3d5fa31 08/43: no summary available,
Stefan Monnier <=
- [elpa] externals/zones be810ac 26/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones eb696a2 13/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones b7c13db 01/43: New library: zones of text - like multiple regions., Stefan Monnier, 2018/10/28
- [elpa] externals/zones 309a1af 19/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 8c578ca 25/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones c9001d4 27/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 387b40f 30/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 222e9ee 34/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 7467046 12/43: no summary available, Stefan Monnier, 2018/10/28
- [elpa] externals/zones 3b8bdf1 18/43: no summary available, Stefan Monnier, 2018/10/28