[elpa] externals/zones 3a74e55: * zones.el: Fix copyright, version number, and maintainer's email

2018-10-30 Thread Stefan Monnier
branch: externals/zones
commit 3a74e5597ea7d03c1c7db01391756365291f6926
Author: Stefan Monnier 
Commit: Stefan Monnier 

* zones.el: Fix copyright, version number, and maintainer's email
---
 zones.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/zones.el b/zones.el
index 44d0323..e950ce0 100644
--- a/zones.el
+++ b/zones.el
@@ -1,12 +1,13 @@
 ;;; zones.el --- Zones of text - like multiple regions
 ;;
+;; Copyright (C) 2010-2018  Free Software Foundation, Inc.
+;;
 ;; Filename: zones.el
 ;; Description:  Zones of text - like multiple regions
 ;; Author: Drew Adams
-;; Maintainer: Drew Adams
-;; Copyright (C) 2010-2018, Drew Adams, all rights reserved.
+;; Maintainer: Drew Adams 
 ;; Created: Sun Apr 18 12:58:07 2010 (-0700)
-;; Version: 2018-10-28
+;; Version: 2018.10.28
 ;; Package-Requires: ()
 ;; Last-Updated: Sun Oct 28 18:46:30 2018 (-0700)
 ;;   By: dradams



[elpa] externals/zones 50ad43b: Forked Emacs 20-21 stuff off as zones20.el (not in elpa.git)

2018-10-30 Thread Stefan Monnier
branch: externals/zones
commit 50ad43b301f6736a6c26a093f0a328db68a966d6
Author: Stefan Monnier 
Commit: Stefan Monnier 

Forked Emacs 20-21 stuff off as zones20.el (not in elpa.git)

Added: zz-buffer-narrowed-p (for Emacs 22-23).
narrow-to-(defun|page): Use defadvice instead of redefining.
narrow-to-defun: Updated to Emacs 26 definition.
---
 zones.el | 348 +--
 1 file changed, 180 insertions(+), 168 deletions(-)

diff --git a/zones.el b/zones.el
index e950ce0..605bb08 100644
--- a/zones.el
+++ b/zones.el
@@ -9,14 +9,14 @@
 ;; Created: Sun Apr 18 12:58:07 2010 (-0700)
 ;; Version: 2018.10.28
 ;; Package-Requires: ()
-;; Last-Updated: Sun Oct 28 18:46:30 2018 (-0700)
+;; Last-Updated: Tue Oct 30 13:07:40 2018 (-0700)
 ;;   By: dradams
-;; Update #: 2075
+;; Update #: 2152
 ;; URL: https://www.emacswiki.org/emacs/download/zones.el
 ;; Doc URL: https://www.emacswiki.org/emacs/Zones
 ;; Doc URL: https://www.emacswiki.org/emacs/MultipleNarrowings
 ;; Keywords: narrow restriction widen region zone
-;; Compatibility: GNU Emacs 20.x, 21.x, 22.x, 23.x, 24.x, 25.x, 26.x
+;; Compatibility: GNU Emacs 22.x, 23.x, 24.x, 25.x, 26.x
 ;;
 ;; Features that might be required by this library:
 ;;
@@ -38,11 +38,11 @@
 ;;  Index
 ;;  -
 ;;
-;;  If you have library `linkd.el' and Emacs 22 or later, load
-;;  `linkd.el' and turn on `linkd-mode' now.  It lets you easily
-;;  navigate around the sections of this doc.  Linkd mode will
-;;  highlight this Index, as well as the cross-references and section
-;;  headings throughout this file.  You can get `linkd.el' here:
+;;  If you have library `linkd.el', load `linkd.el' and turn on
+;;  `linkd-mode' now.  It lets you easily navigate around the sections
+;;  of this doc.  Linkd mode will highlight this Index, as well as the
+;;  cross-references and section headings throughout this file.  You
+;;  can get `linkd.el' here:
 ;;  https://www.emacswiki.org/emacs/download/linkd.el.
 ;;
 ;;  (@> "Things Defined Here")
@@ -84,7 +84,8 @@
 ;;
 ;;  Non-interactive functions defined here:
 ;;
-;;`zz-buffer-of-markers', `zz-car-<', `zz-dot-pairs', `zz-every',
+;;`zz-buffer-narrowed-p' (Emacs 22-23), `zz-buffer-of-markers',
+;;`zz-car-<', `zz-dot-pairs', `zz-every',
 ;;`zz-izone-has-other-buffer-marker-p', `zz-izone-limits',
 ;;`zz-izone-limits-in-bufs', `zz-izones',
 ;;`zz-izones-from-noncontiguous-region' (Emacs 25+),
@@ -119,15 +120,9 @@
 ;;`zz-user-error'.
 ;;
 ;;
-;;  * NOTE: This EMACS PRIMITIVE has been ADVISED HERE:
+;;  * NOTE: These EMACS PRIMITIVES have been ADVISED HERE:
 ;;
-;;`narrow-to-region'.
-;;
-;;
-;;  * NOTE: The following functions defined in `lisp.el' and
-;;  `page.el' have been REDEFINED here:
-;;
-;;`narrow-to-defun', `narrow-to-page'.
+;;`narrow-to-defun', `narrow-to-page', `narrow-to-region'.
 
 ;;(@* "Documentation")
 ;;
@@ -216,8 +211,17 @@
 ;;
 ;;  Emacs overlays have a lot in common with zones: overlays have an
 ;;  associated buffer, two limits (positions), and a list of
-;;  properties.  You can create zones from overlays, and vice versa,
-;;  using functions `zz-overlay-to-zone', `zz-zone-to-overlay',
+;;  properties.
+;;
+;;  Zones are different, in that:
+;;
+;;  * They can have identifiers (izones).
+;;  * They can have a readable Lisp form, by using numbers or readable
+;;markers.
+;;  * They can be persistent, by bookmarking them.
+;;
+;;  You can create zones from overlays, and vice versa, using
+;;  functions `zz-overlay-to-zone', `zz-zone-to-overlay',
 ;;  `zz-overlays-to-zones', and `zz-zones-to-overlays'.
 ;;
 ;;  When creating zones from overlays you can specify how to represent
@@ -469,7 +473,13 @@
 ;;
 ;;(@* "Change log")
 ;;
-;; 2018/10/18 dadams
+;; 2018/10/30 dadams
+;; Forked Emacs 20-21 stuff off as zones20.el.
+;;   Require cl-lib.el for Emacs 23+, cl.el for Emacs 22.
+;;   Added: zz-buffer-narrowed-p (for Emacs 22-23).
+;;   narrow-to-(defun|page): Use defadvice instead of redefining.
+;;   narrow-to-defun: Updated to Emacs 26 definition.
+;; 2018/10/28 dadams
 ;; Added: zz-set-zones-from-highlighting.
 ;; zz-add-zones-from-highlighting: Prefix arg >=0: prompt for the face, <= 
0: use font-lock-face.
 ;; Bind in eval-after-load of highlight.el: 
zz-(add|set)-zones-from-highlighting (to C-x n [lL]),
@@ -734,7 +744,7 @@
 
 
 (defmacro zz-user-error (&rest args)
-  `(if (fboundp 'user-error) (user-error ,@args) (error ,@args)))
+  `(if (fboundp 'user-error) (user-error ,@args) (error ,@args))) ; For Emacs 
22-23. 
 
 (defgroup zones nil
   "Zones of text - like multiple regions."
@@ -769,7 +779,7 @@ Don't forget to mention your Emacs and library versions."))
 
   (defun zz-set-fringe-for-narrowing ()
 "Set fringe face if buffer is narrowed."
-(if (buffer-narrowed-p)
+(if (zz-buffer-narrowed-p)
 (copy-face 'zz-fringe-for-narrow

[elpa] externals/zones aed6ee5: * zones.el: Improve pieces of advice

2018-10-30 Thread Stefan Monnier
branch: externals/zones
commit aed6ee5fb5bc0e320065e8a2eac7ae9e4a48d21e
Author: Stefan Monnier 
Commit: Stefan Monnier 

* zones.el: Improve pieces of advice

(zz-user-error): Make it a function.
(narrow-to-defun, narrow-to-page): Make the advice less invasive.
* .gitignore: New file.
---
 .gitignore |  3 ++
 zones.el   | 93 +++---
 2 files changed, 13 insertions(+), 83 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..ac49de9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+zones-autoloads.el
+zones-pkg.el
+*.elc
diff --git a/zones.el b/zones.el
index 605bb08..1140d81 100644
--- a/zones.el
+++ b/zones.el
@@ -743,8 +743,8 @@
 ;;
 
 
-(defmacro zz-user-error (&rest args)
-  `(if (fboundp 'user-error) (user-error ,@args) (error ,@args))) ; For Emacs 
22-23. 
+(defalias 'zz-user-error
+  (if (fboundp 'user-error) #'user-error #'error)) ; For Emacs 22-23.
 
 (defgroup zones nil
   "Zones of text - like multiple regions."
@@ -1860,6 +1860,8 @@ current zones instead of adding to them."
 
 ;;-
 
+;; FIXME: Just loading this file shouldn't overwrite bindings a user may
+;; have put into narrow-map.
 (cond ((boundp 'narrow-map) ; Emacs 23+
(define-key narrow-map "a"'zz-add-zone)
(define-key narrow-map "A"'zz-add-zone-and-unite)
@@ -1912,100 +1914,25 @@ value can be modified."
 
 ;; Call `zz-add-zone' if interactive or if `zz-add-zone-anyway-p'.
 ;;
-(defadvice narrow-to-defun (around zz-add-zone--defun activate)
+(defadvice narrow-to-defun (after zz-add-zone--defun activate)
   "Push the defun limits to the current `zz-izones-var'.
 You can use `C-x n x' to widen to a previous buffer restriction.
 
 This is a destructive operation. The list structure of the variable
 value can be modified."
-  (interactive (and (boundp 'narrow-to-defun-include-comments) ; Emacs 24+
-(list narrow-to-defun-include-comments)))
-  (save-excursion
-(widen)
-(let ((opoint (point))
- beg end)
-  ;; Try first in this order for the sake of languages with nested 
functions where several can end at the same
-  ;; place as with the offside rule, e.g. Python.
-  ;; Finding the start of the function is a bit problematic since 
`beginning-of-defun' when we are on the
-  ;; first character of the function might go to the previous function.
-  ;; Therefore we first move one character forward and then call 
`beginning-of-defun'.  However now we must
-  ;; check that we did not move into the next function.
-  (let ((here  (point)))
-(unless (eolp) (forward-char))
-(beginning-of-defun)
-(when (< (point) here)
-  (goto-char here)
-  (beginning-of-defun)))
-  (setq beg  (point))
-  (end-of-defun)
-  (setq end  (point))
-  (while (looking-at "^\n")(forward-line 1))
-  (unless (> (point) opoint) ; `beginning-of-defun' moved back one defun 
so we got the wrong one.
-   (goto-char opoint)
-   (end-of-defun)
-   (setq end  (point))
-   (beginning-of-defun)
-   (setq beg  (point)))
-  (when (ad-get-arg 0) ; Argument INCLUDE-COMMENTS
-   (goto-char beg)
-   (when (forward-comment -1) ; Move back past all preceding comments (and 
whitespace).
- (while (forward-comment -1))
- ;; Move forward past any page breaks within these comments.
- (when (and page-delimiter  (not (string= page-delimiter "")))
-   (while (re-search-forward page-delimiter beg t)))
- ;; Lastly, move past any empty lines.
- (skip-chars-forward "[:space:]\n")
- (beginning-of-line)
- (setq beg (point
-  (goto-char end)
-  (re-search-backward "^\n" (- (point) 1) t)
-  ;; THIS IS THE ONLY CHANGE FOR `zones.el'.
-  (when (or (interactive-p)  zz-add-zone-anyway-p) (zz-add-zone beg end 
nil nil nil 'MSG))
-  (narrow-to-region beg end
+  (when (or (interactive-p)  zz-add-zone-anyway-p)
+(zz-add-zone (point-min) (point-max) nil nil nil 'MSG)))
 
 ;; Call `zz-add-zone' if interactive or `zz-add-zone-anyway-p'.
 ;;
-(defadvice narrow-to-page (around zz-add-zone--defun activate)
+(defadvice narrow-to-page (after zz-add-zone--defun activate)
   "Push the page limits to the current `zz-izones-var'.
 You can use `C-x n x' to widen to a previous buffer restriction.
 
 This is a destructive operation. The list structure of the variable
 value can be modified."
-  (interactive "P")
-  (setq arg  (if arg (prefix-numeric-value arg) 0))
-  (save-excursion
-(widen)
-(if (> arg 0)
-   (forward-page arg)
-  (if (< arg 0)
- (let ((adjust  0)
-   (opoint  (point)))
-   ;; If not now at the beginning of a page, move back one extra time, 
to get to start of this page.
-   (save-excursion
- (beginning-of-line)
-

[elpa] master 7303ba0: * externals-list (zones): New package

2018-10-30 Thread Stefan Monnier
branch: master
commit 7303ba003d1303df229d1361e15d0225e508a46a
Author: Stefan Monnier 
Commit: Stefan Monnier 

* externals-list (zones): New package
---
 .gitignore | 3 +++
 externals-list | 1 +
 2 files changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index 7202a14..363f7e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,7 @@ packages/ebdb/
 packages/eglot/
 packages/ergoemacs-mode/
 packages/exwm/
+packages/fountain-mode/
 packages/hyperbole/
 packages/jsonrpc/
 packages/let-alist/
@@ -33,8 +34,10 @@ packages/python/
 packages/rudel/
 packages/soap-client/
 packages/sql-indent/
+packages/ssh-deploy/
 packages/w3/
 packages/xelb/
+packages/zones/
 
 # Testing file
 /archive
diff --git a/externals-list b/externals-list
index f502be4..8271e4d 100644
--- a/externals-list
+++ b/externals-list
@@ -150,5 +150,6 @@
  ("which-key"   :subtree "https://github.com/justbur/emacs-which-key";)
  ("xelb"   :external "https://github.com/ch11ng/xelb.git";)
  ("yasnippet"  :subtree 
"https://github.com/capitaomorte/yasnippet.git";)
+ ("zones"  :external nil)  
;https://www.emacswiki.org/emacs/zones.el
  ("ztree"  :subtree "https://github.com/fourier/ztree";)
  )