[elpa] externals/org a0755ebccf: doc/org-manual.org: Fix a typo in the manual

2022-04-15 Thread ELPA Syncer
branch: externals/org
commit a0755ebccf538ed839baa05f1f15a44d61b3ba4e
Author: Cody Harris 
Commit: Ihor Radchenko 

doc/org-manual.org: Fix a typo in the manual

Also automatically fix up a few lines of indentation that had mixed
tabs and spaces.

TINYCHANGE
---
 doc/org-manual.org | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 49d906c27b..14fea0f2b5 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -3579,7 +3579,7 @@ replacement text.  Here is an example:
 (setq org-link-abbrev-alist
   '(("bugzilla". "http://10.1.2.9/bugzilla/show_bug.cgi?id=";)
 ("Nu Html Checker" . "https://validator.w3.org/nu/?doc=%h";)
-   ("duckduckgo"  . "https://duckduckgo.com/?q=%s";)
+("duckduckgo"  . "https://duckduckgo.com/?q=%s";)
 ("omap". 
"http://nominatim.openstreetmap.org/search?q=%s&polygon=1";)
 ("ads" . 
"https://ui.adsabs.harvard.edu/search/q=%20author%3A\"%s\"";)))
 #+end_src
@@ -9415,11 +9415,11 @@ the Internet, and outside of business hours, with 
something like this:
 #+begin_src emacs-lisp
 (defun my-auto-exclude-fn (tag)
   (when (cond ((string= tag "net")
-  (/= 0 (call-process "/sbin/ping" nil nil nil
-  "-c1" "-q" "-t1" "mail.gnu.org")))
+   (/= 0 (call-process "/sbin/ping" nil nil nil
+   "-c1" "-q" "-t1" "mail.gnu.org")))
   ((member tag '("errand" "call"))
-  (let ((hr (nth 2 (decode-time
-(or (< hr 8) (> hr 21)
+   (let ((hr (nth 2 (decode-time
+ (or (< hr 8) (> hr 21)
 (concat "-" tag)))
 
 (setq org-agenda-auto-exclude-function #'my-auto-exclude-fn)
@@ -16258,7 +16258,7 @@ Settings]]), however, override everything.
 | ~:html-preamble-format~| ~org-html-preamble-format~  
  |
 | ~:html-preamble~   | ~org-html-preamble~ 
  |
 | ~:html-self-link-headlines~| 
~org-html-self-link-headlines~|
-| ~:html-table-align-individual-field~   | 
~de{org-html-table-align-individual-fields~   |
+| ~:html-table-align-individual-field~   | 
~org-html-table-align-individual-fields~  |
 | ~:html-table-attributes~   | 
~org-html-table-default-attributes~   |
 | ~:html-table-caption-above~| 
~org-html-table-caption-above~|
 | ~:html-table-data-tags~| ~org-html-table-data-tags~  
  |



[elpa] externals/tempel 76da9c2f39: README: Use lisp-data mode

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 76da9c2f39df9938055b3387aa7620e10fa6ff45
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Use lisp-data mode
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 9146d6e864..bbb1783e45 100644
--- a/README.org
+++ b/README.org
@@ -110,7 +110,7 @@ Pre- and post-expansion operations can be specified per 
template by the optional
 keys =:pre= and =:post=.
 
 #+begin_src emacs-lisp
-  ;; -*- mode: lisp -*-
+  ;; -*- mode: lisp-data -*-
 
   fundamental-mode ;; Available everywhere
 



[elpa] externals/consult 32a33c3bdf: Update changelog

2022-04-15 Thread ELPA Syncer
branch: externals/consult
commit 32a33c3bdf788b53f2ef0af65c4681b653e44515
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update changelog
---
 CHANGELOG.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index a824fdc75b..de096fd2e1 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,6 +4,7 @@
 
 * Development
 
+- Bugfixes
 - Drop Emacs 26 support.
 - =consult-goto-line=: Use =goto-line-history= on Emacs 28.
 - =consult-customize=: Evaluate settings at runtime. This change makes it 
possible



[nongnu] elpa/evil 41006dc73d: Preserve non-blank last line when :move ing

2022-04-15 Thread ELPA Syncer
branch: elpa/evil
commit 41006dc73d8c850d2a6378a3c026aedb16b80813
Author: Tom Dalziel 
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

Preserve non-blank last line when :move ing

Fixes #1595
---
 evil-commands.el |  5 -
 evil-tests.el| 17 +++--
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index 24e4953091..ad57b22010 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -1754,8 +1754,11 @@ of the block."
 (forward-line address)
 (let* ((m (set-marker (make-marker) (point)))
(txt (buffer-substring-no-properties beg end))
-   (len (length txt)))
+   (len (length txt))
+   (last-line-blank (progn (goto-char (point-max)) (bolp
   (delete-region beg end)
+  (unless last-line-blank ; as vim, preserve lack of blank last line
+(progn (goto-char (point-max)) (when (bolp) (delete-char -1
   (goto-char m)
   (set-marker m nil)
   ;; ensure text consists of complete lines
diff --git a/evil-tests.el b/evil-tests.el
index b0d2ce1c08..028a10560c 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8386,12 +8386,17 @@ Source
 (evil-test-buffer
   "5\n4\n3\n2\n1\n"
   (":g/^/m0")
-  "1\n2\n3\n4\n5\n"))
-  (ert-info ("Move with global, and visual selection")
-(evil-test-buffer
-  "<5\n4\n3\n2\n[1]>\n"
-  (":g/^/m0")
-  "1\n2\n3\n4\n5\n")))
+  "1\n2\n3\n4\n5\n")
+(ert-info ("... and visual selection")
+  (evil-test-buffer
+"<5\n4\n3\n2\n[1]>\n"
+(":g/^/m0")
+"1\n2\n3\n4\n5\n"))
+(ert-info ("... and no last blank line")
+  (evil-test-buffer
+"5\n4\n3\n2\n1"
+(":g/^/m0")
+"1\n2\n3\n4\n5"
 
 (ert-deftest evil-test-write ()
   :tags '(evil ex)



[elpa] externals/compat updated (d9643bb45d -> d1be4aa2f6)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch externals/compat.

  from  d9643bb45d Revert 81358f53 (completion-pcm--all-completions)
   new  ed62b3f985 Use gv-define-expander instead of gv-define-simple-setter
   new  61d31970e2 Check version before defaliasing a prefixed function
   new  d1be4aa2f6 Mention the Compat issue tracker in README and MANUAL


Summary of changes:
 MANUAL |  7 ---
 README.md  |  8 ++--
 compat-26.el   | 25 -
 compat-macs.el |  4 ++--
 4 files changed, 24 insertions(+), 20 deletions(-)



[elpa] externals/compat 61d31970e2 2/3: Check version before defaliasing a prefixed function

2022-04-15 Thread ELPA Syncer
branch: externals/compat
commit 61d31970e21a2d23fb0d113fb4ff3ab3b100ca8c
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Check version before defaliasing a prefixed function

Since :cond cannot be combined with :prefix, the previous check was
meaningless.  What actually should be expressed is that a
compatibility function should only then do the same thing, if we know
by the indicated version that the actual function implements the right
behaviour.
---
 compat-macs.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index a53404b0eb..d95e3529ee 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -111,8 +111,8 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
  ((and (plist-get attr :prefix) (memq type '(func macro))
(string-match "\\`compat-\\(.+\\)\\'" (symbol-name name))
(let* ((actual-name (intern (match-string 1 (symbol-name name
-  (body (funcall install-fn actual-name  version)))
- (when (and (or (null cond) (eval cond t))
+  (body (funcall install-fn actual-name version)))
+ (when (and (version<= version emacs-version)
 (fboundp actual-name))
`(,@check
  ,(if feature



[elpa] externals/compat ed62b3f985 1/3: Use gv-define-expander instead of gv-define-simple-setter

2022-04-15 Thread ELPA Syncer
branch: externals/compat
commit ed62b3f9850cbda1b1e56dfb666fd9e2c0644ffc
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Use gv-define-expander instead of gv-define-simple-setter
---
 compat-26.el | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/compat-26.el b/compat-26.el
index 92339a97ff..0aa1dd03bc 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -445,19 +445,18 @@ If VALUE is nil, PROPERTY is removed from IMAGE."
   (plist-get (cdr image) property))
 
 ;;* UNTESTED
-(gv-define-simple-setter
- image-property
- (lambda (image property value)
-   (if (null value)
-   (while (cdr image)
- ;; IMAGE starts with the symbol `image', and the rest is a
- ;; plist.  Decouple plist entries where the key matches
- ;; the property.
- (if (eq (cadr image) property)
- (setcdr image (cdddr image))
-   (setq image (cddr image
- ;; Just enter the new value.
- (setcdr image (plist-put (cdr image) property value)
+(gv-define-expander image-property
+  (lambda (image property value)
+(if (null value)
+(while (cdr image)
+  ;; IMAGE starts with the symbol `image', and the rest is a
+  ;; plist.  Decouple plist entries where the key matches
+  ;; the property.
+  (if (eq (cadr image) property)
+  (setcdr image (cdddr image))
+(setq image (cddr image
+  ;; Just enter the new value.
+  (setcdr image (plist-put (cdr image) property value)
 
 (provide 'compat-26)
 ;;; compat-26.el ends here



[elpa] externals/compat d1be4aa2f6 3/3: Mention the Compat issue tracker in README and MANUAL

2022-04-15 Thread ELPA Syncer
branch: externals/compat
commit d1be4aa2f6f6ea1574d8a0d264ae7f100125ad65
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Mention the Compat issue tracker in README and MANUAL
---
 MANUAL| 7 ---
 README.md | 8 ++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/MANUAL b/MANUAL
index 51b08fe145..9756ef9d4b 100644
--- a/MANUAL
+++ b/MANUAL
@@ -458,9 +458,10 @@ implemented in 28.1:
 Compat is developed on [[https://sr.ht/~pkal/compat][SourceHut]]. A restricted 
[[https://github.com/phikal/compat.el][GitHub mirror]] is also
 maintained.
 
-Patches, bug reports and comments can be sent to the 
[[https://lists.sr.ht/~pkal/compat-devel][development
-mailing list]] 
([[mailto:~pkal/compat-de...@lists.sr.ht][~pkal/compat-de...@lists.sr.ht]]).  
The GitHub mirror can
-also be used to submit patches.  These may include issues in the
+Patches and comments can be sent to the 
[[https://lists.sr.ht/~pkal/compat-devel][development mailing list]]
+([[mailto:~pkal/compat-de...@lists.sr.ht][~pkal/compat-de...@lists.sr.ht]]).  
Bug reports are best sent to the
+[[https://todo.sr.ht/~pkal/compat][issue tracker]] 
([[mailto:~pkal/com...@todo.sr.ht][~pkal/com...@todo.sr.ht]]).  The GitHub 
mirror can also
+be used to submit patches.  These may include issues in the
 compatibility code, missing definitions or performance issues.
 
 Please note that as a GNU ELPA package, Compat requires contributors
diff --git a/README.md b/README.md
index 3f2353c106..7b64ccb10e 100644
--- a/README.md
+++ b/README.md
@@ -71,8 +71,10 @@ also provided.
 Bug and patches
 ---
 
-Patches, bug reports and comments can be sent to the [development
-mailing list][compat-devel].  [GitHub] can also be used to submit
+Patches and comments can be sent to the [development mailing
+list][compat-devel].  Bug reports and issues should be directed to the
+[issue tracker][compat-tracker] (also accessible via
+[Email][compat-tracker-mailto]).  [GitHub] can also be used to submit
 patches ("Pull Request").  These may include issues in the
 compatibility code, missing definitions or performance issues.
 
@@ -95,3 +97,5 @@ the GPL, Version 3 (like Emacs itself).
 [GitHub]: https://github.com/phikal/compat.el
 [compat-announce]: https://lists.sr.ht/~pkal/compat-announce
 [compat-devel]: https://lists.sr.ht/~pkal/compat-devel
+[compat-tracker]: https://todo.sr.ht/~pkal/compat
+[compat-tracker-mailto]: mailto:~pkal/com...@todo.sr.ht



[elpa] scratch/javaimp-wip 606cb3f08a: *** empty log message ***

2022-04-15 Thread Filipp Gunbin
branch: scratch/javaimp-wip
commit 606cb3f08a10bf5e6571657fbec6b13f019a5ead
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

*** empty log message ***
---
 javaimp-parse.el |  4 +--
 javaimp-util.el  |  7 +
 javaimp.el   | 86 
 3 files changed, 65 insertions(+), 32 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index a07c059267..89b296b2b5 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -547,8 +547,8 @@ them should move point."
 res))
 
 (defun javaimp--parse-get-enclosing-scope (&optional pred parent-pred)
-  "Return innermost enclosing scope at point which satisfies PRED,
-with parents filtered by PARENT-PRED."
+  "Return innermost enclosing scope at point, optionally checking
+it with PRED, and its parents with PARENT-PRED."
   (save-excursion
 (javaimp--parse-all-scopes))
   (when-let ((scope (javaimp--parse-enclosing-scope pred)))
diff --git a/javaimp-util.el b/javaimp-util.el
index 0379a9e308..df9913a9ef 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -153,6 +153,13 @@ left."
   (setq res (memq (javaimp-scope-type scope) parent-types)))
 res))
 
+(defun javaimp--defun-scope-pred (&optional only-classes)
+  (let ((leaf-types (append javaimp--classlike-scope-types
+(unless only-classes '(method)
+(lambda (s)
+  (javaimp-test-scope-type s
+leaf-types javaimp--classlike-scope-types
+
 
 ;; Tree
 
diff --git a/javaimp.el b/javaimp.el
index 81d9d6d11d..082773d7b4 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -573,7 +573,7 @@ If there's no such directive, then the last resort is just
   "Return fully-qualified names of all class-like scopes in the
 current buffer."
   (let ((package (javaimp--parse-get-package))
-(scopes (javaimp--get-defun-scopes t)))
+(scopes (javaimp--parse-get-all-scopes (javaimp--defun-scope-pred t)))
 (mapcar (lambda (class)
   (if package
   (concat package "." class)
@@ -717,7 +717,8 @@ in a major mode hook."
   entries)
 
 (defun javaimp-imenu--get-forest ()
-  (let* ((defun-scopes (javaimp--get-defun-scopes))
+  (let* ((defun-scopes
+  (javaimp--parse-get-all-scopes (javaimp--defun-scope-pred)))
  (methods (seq-filter
(lambda (scope)
  (eq (javaimp-scope-type scope) 'method))
@@ -815,7 +816,7 @@ opening brace."
  (save-excursion
(save-restriction
  (widen)
- (javaimp--get-defun-scopes
+ (javaimp--parse-get-all-scopes (javaimp--defun-scope-pred)
 (source-buf (current-buffer))
 (source-default-dir default-directory)
 (buf (get-buffer-create "*javaimp-scopes*")))
@@ -878,29 +879,64 @@ opening brace."
 
 (defun javaimp-beginning-of-defun (arg)
   "Function to be used as `beginning-of-defun-function'."
-  (unless (zerop arg)
-(let (enclosing scopes)
-  (save-excursion
-(save-restriction
-  (widen)
-  ;; TODO pass pred
-  (setq enclosing (javaimp--parse-get-enclosing-scope)
-;; TODO leave only enclosing's siblings
-scopes (javaimp--get-defun-scopes
-  ;; TODO leave siblings from enclosing in scopes; take ARGth
-  ;; relative sibling;
-
-  ;; ? if not found
-  (goto-char (if (< 0 arg)
- (point-min)
-   (point-max)))
-(zerop arg
+  (if (zerop arg)
+  t
+(when (> arg 0) (setq arg (1- arg)))
+(let (found)
+  (when-let* ((tmp (javaimp--get-sibling-defuns))
+  (enc-idx (car tmp))
+  (siblings (cdr tmp))
+  (target-idx
+   (let ((val (- enc-idx arg)))
+ (cond ((< val 0)
+0)
+   ((>= val (length siblings))
+(1- (length siblings)))
+   (t
+(setq found t)
+val)
+(goto-char (javaimp-scope-open-brace
+(nth target-idx siblings
+  found)))
 
 (defun javaimp-end-of-defun ()
   "Function to be used as `end-of-defun-function'."
   ;; TODO where we start?
   )
 
+(defun javaimp--get-sibling-defuns ()
+  "Return list of the form (ENCLOSING-INDEX . SIBLINGS), where
+SIBLINGS is a list of all sibling defun scopes.  ENCLOSING-INDEX,
+if non-nil, is an index of the enclosing scope in this list.  If
+it's nil then we're between top-level defuns."
+  (save-excursion
+(save-restriction
+  (widen)
+  (let* ((defun-pred (javaimp--defun-scope-pred))
+ (enc (javaimp--parse-get-enclosing-scope defun-pred))
+ (sibling-pred
+  (if (and enc (javaimp-scope-parent enc))
+  ;; scopes with same parent
+  (lambda (s)
+(and (javaimp-sco

[elpa] externals/tempel 304d0725b6 1/4: tempel-complete: Simplify

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 304d0725b63277a8672eab74d2962a648045f800
Author: Daniel Mendler 
Commit: Daniel Mendler 

tempel-complete: Simplify
---
 tempel.el | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/tempel.el b/tempel.el
index eeda56042c..8135d6730b 100644
--- a/tempel.el
+++ b/tempel.el
@@ -639,12 +639,7 @@ If INTERACTIVE is nil the function acts like a capf."
   :exclusive 'no
   :company-kind (lambda (_) 'snippet)
   :exit-function (apply-partially #'tempel--exit templates region)
-  :company-prefix-length
-  (and tempel-trigger-prefix
-   (save-excursion
- (goto-char (car bounds))
- (search-forward tempel-trigger-prefix (cdr bounds) 
'noerror) t)
-   t)
+  :company-prefix-length (and tempel-trigger-prefix t)
   :annotation-function
   (and tempel-complete-annotation
(apply-partially #'tempel--annotate



[elpa] externals/tempel 517b9faa81 4/4: Rename :condition to :when

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 517b9faa81ed470ab6c68766941cf4bf81f8055a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename :condition to :when
---
 README.org | 4 ++--
 tempel.el  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 16dc5f11f2..7d33c9d3be 100644
--- a/README.org
+++ b/README.org
@@ -103,7 +103,7 @@ on =use-package=.
 
 The templates are defined in a Lisp file configured by ~tempel-path~. By 
default
 the file =~/.config/emacs/templates= is used. The templates are grouped by 
major
-mode with an optional ~:condition~. Each template is a list in the concise 
form of
+mode with an optional ~:when~ condition. Each template is a list in the 
concise form of
 the Emacs Tempo syntax. The first element of each list is the name of the
 template. Behind the name, the Tempo syntax elements follow. Pre- and
 post-expansion operations can be specified per template by the optional keys
@@ -177,7 +177,7 @@ post-expansion operations can be specified per template by 
the optional keys
 
   (class "public class " (p (file-name-base (or (buffer-file-name) 
(buffer-name " {" n> r> n "}")
 
-  c-mode :condition (re-search-backward "^\\w*$" (line-beginning-position) 
'noerror)
+  c-mode :when (re-search-backward "^\\w*$" (line-beginning-position) 'noerror)
 
   (inc "#include <" (p (concat (file-name-base (or (buffer-file-name) 
(buffer-name))) ".h")) ">")
   (incc "#include \"" (p (concat (file-name-base (or (buffer-file-name) 
(buffer-name))) ".h")) "\"")
diff --git a/tempel.el b/tempel.el
index c82a2f9050..67eb44133d 100644
--- a/tempel.el
+++ b/tempel.el
@@ -456,11 +456,11 @@ This is meant to be a source in 
`tempel-template-sources'."
 for m in modes thereis
 (or (eq m #'fundamental-mode)
 (derived-mode-p m)))
-   (or (not (plist-member plist :condition))
+   (or (not (plist-member plist :when))
(save-excursion
  (save-restriction
(save-match-data
- (eval (plist-get plist :condition) 'lexical)))
+ (eval (plist-get plist :when) 'lexical)))
 
 (defun tempel--templates ()
   "Return templates for current mode."



[elpa] externals/tempel updated (76da9c2f39 -> 517b9faa81)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch externals/tempel.

  from  76da9c2f39 README: Use lisp-data mode
   new  304d0725b6 tempel-complete: Simplify
   new  662b99d33d tempel-path: Use wildcards instead of directories (Fix 
#51)
   new  235e066fe3 Improve docstring
   new  517b9faa81 Rename :condition to :when


Summary of changes:
 README.org | 14 +++---
 tempel.el  | 43 ---
 2 files changed, 23 insertions(+), 34 deletions(-)



[elpa] externals/tempel 235e066fe3 3/4: Improve docstring

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 235e066fe3b0815149e6fe79d978fdc0cff74ff0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve docstring
---
 tempel.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tempel.el b/tempel.el
index a1b9bc53c8..c82a2f9050 100644
--- a/tempel.el
+++ b/tempel.el
@@ -49,7 +49,7 @@
   :prefix "tempel-")
 
 (defcustom tempel-path (expand-file-name "templates" user-emacs-directory)
-  "A file or a list of files containing templates.
+  "A file or a list of template files.
 The file paths can contain wildcards."
   :type '(choice string (repeat string)))
 



[elpa] externals/tempel 662b99d33d 2/4: tempel-path: Use wildcards instead of directories (Fix #51)

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 662b99d33d0990eb1bf6541ecd1f7329c5575ca5
Author: Daniel Mendler 
Commit: Daniel Mendler 

tempel-path: Use wildcards instead of directories (Fix #51)
---
 README.org | 12 ++--
 tempel.el  | 32 +---
 2 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/README.org b/README.org
index bbb1783e45..16dc5f11f2 100644
--- a/README.org
+++ b/README.org
@@ -102,12 +102,12 @@ on =use-package=.
 * Template file format
 
 The templates are defined in a Lisp file configured by ~tempel-path~. By 
default
-the file or directory =~/.config/emacs/templates= is used. The templates are
-grouped by major mode with an optional ~:condition~. Each template is a list in
-the concise form of the Emacs Tempo syntax. The first element of each list is
-the name of the template. Behind the name, the Tempo syntax elements follow.
-Pre- and post-expansion operations can be specified per template by the 
optional
-keys =:pre= and =:post=.
+the file =~/.config/emacs/templates= is used. The templates are grouped by 
major
+mode with an optional ~:condition~. Each template is a list in the concise 
form of
+the Emacs Tempo syntax. The first element of each list is the name of the
+template. Behind the name, the Tempo syntax elements follow. Pre- and
+post-expansion operations can be specified per template by the optional keys
+=:pre= and =:post=.
 
 #+begin_src emacs-lisp
   ;; -*- mode: lisp-data -*-
diff --git a/tempel.el b/tempel.el
index 8135d6730b..a1b9bc53c8 100644
--- a/tempel.el
+++ b/tempel.el
@@ -49,7 +49,8 @@
   :prefix "tempel-")
 
 (defcustom tempel-path (expand-file-name "templates" user-emacs-directory)
-  "A file or a list of files and/or directories, containing templates."
+  "A file or a list of files containing templates.
+The file paths can contain wildcards."
   :type '(choice string (repeat string)))
 
 (defcustom tempel-trigger-prefix nil
@@ -160,16 +161,6 @@ may be named with `tempel--name' or carry an evaluatable 
Lisp expression
 ((or 'n 'n> '> '& '% 'o) " ")
 (_ "_")))
 
-(defun tempel--expand-path ()
-  "Return the list of files specified by `tempel-path'."
-  (let (files)
-(dolist (path (if (listp tempel-path) tempel-path (list tempel-path)))
-  (when (file-exists-p path)
-(if (file-directory-p path)
-(setq files (nconc files (directory-files-recursively path "")))
-  (push path files
-files))
-
 (defun tempel--annotate (templates width ellipsis sep name)
   "Annotate template NAME given the list of TEMPLATES.
 WIDTH, SEP and ELLIPSIS configure the formatting."
@@ -439,14 +430,17 @@ PROMPT is the optional prompt/default value."
 Additionally, save any files in `tempel-template-sources' that have been
 modified since the last time this function was called.
 This is meant to be a source in `tempel-template-sources'."
-  (when tempel-auto-reload
-(let* ((files (tempel--expand-path))
-   (timestamps (cl-loop
-for f in files collect
-(cons f (time-convert
- (file-attribute-modification-time
-  (file-attributes f))
- 'integer)
+  (when (or (not tempel--path-templates) tempel-auto-reload)
+(let* ((files
+(cl-loop for path in (if (listp tempel-path) tempel-path (list 
tempel-path))
+ nconc (file-expand-wildcards path t)))
+   (timestamps
+(cl-loop
+ for f in files collect
+ (cons f (time-convert
+  (file-attribute-modification-time
+   (file-attributes f))
+  'integer)
   (unless (equal tempel--path-timestamps timestamps)
 (setq tempel--path-timestamps timestamps
   tempel--path-templates (mapcan #'tempel--file-read files)



[elpa] externals/tempel a3b35cf243: Improve tempel-trigger-prefix scanning (See #50)

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit a3b35cf2432b4614aeae7c3382a8b1e7bfaf4002
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve tempel-trigger-prefix scanning (See #50)

if there is a space after the trigger prefix,
completion should not set in.
---
 tempel.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tempel.el b/tempel.el
index 67eb44133d..4a3ed0ca83 100644
--- a/tempel.el
+++ b/tempel.el
@@ -586,14 +586,14 @@ The completion table specifies the category `tempel'."
 (defun tempel--prefix-bounds ()
   "Return prefix bounds."
   (if tempel-trigger-prefix
-  (save-excursion
-(let ((end (point))
-  (beg (re-search-backward
-(concat (regexp-quote tempel-trigger-prefix) "\\S-*")
-(line-beginning-position) 'noerror)))
-  (when beg
-(cons (+ beg (length tempel-trigger-prefix)) end
-  (bounds-of-thing-at-point 'symbol)))
+  (let ((end (point))
+(beg (save-excursion
+   (search-backward tempel-trigger-prefix
+(line-beginning-position) 'noerror
+(when (and beg (save-excursion
+ (not (re-search-backward "\\s-" beg 'noerror
+  (cons (+ beg (length tempel-trigger-prefix)) end)))
+(bounds-of-thing-at-point 'symbol)))
 
 ;;;###autoload
 (defun tempel-expand (&optional interactive)



[nongnu] elpa/evil fd0644ebfc: Allow vim-style regexp for :global command

2022-04-15 Thread ELPA Syncer
branch: elpa/evil
commit fd0644ebfc7e827ea790a7b8fb6c590aada6b225
Author: Tom Dalziel 
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

Allow vim-style regexp for :global command
---
 evil-commands.el | 2 ++
 evil-tests.el| 8 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/evil-commands.el b/evil-commands.el
index ad57b22010..94b1ba7f33 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -3992,6 +3992,8 @@ This is the same as :%s//~/&"
   (deactivate-mark deactivate-mark)
   match markers)
   (when (and pattern command)
+(when evil-ex-search-vim-style-regexp
+  (setq pattern (evil-transform-vim-style-regexp pattern)))
 (setq isearch-string pattern)
 (isearch-update-ring pattern t)
 (goto-char beg)
diff --git a/evil-tests.el b/evil-tests.el
index 028a10560c..65fd8f4fd2 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8269,7 +8269,13 @@ maybe we need one line more with some text\n")
(evil-test-buffer
  "this\nThis\n"
  (":g/This/d" [return])
- "this\n")
+ "this\n"
+  (ert-info (":global should transform vim-style regexp when appropriate")
+(let ((evil-ex-search-vim-style-regexp t))
+  (evil-test-buffer
+"a\n1\nb\n2\nc\n3\n"
+(":g/\\d/>")
+"a\n1\nb\n2\nc\n3\n"
 
 (ert-deftest evil-test-normal ()
   "Test `evil-ex-normal'."



[elpa] main 2bb8321d5d: * elpa-packages ("vundo"): New package.

2022-04-15 Thread Philip Kaludercic
branch: main
commit 2bb8321d5d6eb2fb1ea9dbb31efb20ea968df6c7
Author: Yuan Fu 
Commit: Philip Kaludercic 

* elpa-packages ("vundo"): New package.
---
 elpa-packages | 5 +
 1 file changed, 5 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 6446298046..d13aa159c0 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -637,6 +637,11 @@
  ("vertico-posframe"
   :url "https://github.com/tumashu/vertico-posframe";
   :auto-sync t)
+ ("vundo"
+  :url "https://github.com/casouri/vundo";
+  :ignored-files ("test")
+  :news "NEWS.txt"
+  :auto-sync t)
  ("wcheck-mode":url "https://github.com/tlikonen/wcheck-mode";)
  ("wconf"  :url "https://github.com/ilohmar/wconf";)
  ("web-server" :url "https://github.com/eschulte/emacs-web-server.git";)



[elpa] scratch/javaimp-wip 544e9d428c: *** empty log message ***

2022-04-15 Thread Filipp Gunbin
branch: scratch/javaimp-wip
commit 544e9d428c9283cfb0649e8a3894b9760655dd9d
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

*** empty log message ***
---
 javaimp-parse.el |  4 ++--
 javaimp-util.el  |  9 +
 javaimp.el   | 56 +++-
 3 files changed, 42 insertions(+), 27 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index 89b296b2b5..fb1d6bc6b7 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -429,8 +429,8 @@ is intended to use already set properties."
   (with-syntax-table javaimp-syntax-table
 (let ((state (syntax-ppss)))
   ;; Move out of any comment/string
-  (when (nth 8 ppss)
-   (goto-char (nth 8 ppss))
+  (when (nth 8 state)
+   (goto-char (nth 8 state))
(setq state (syntax-ppss)))
   ;; Go up until we get something
   (catch 'found
diff --git a/javaimp-util.el b/javaimp-util.el
index df9913a9ef..3faa8fad57 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -160,6 +160,15 @@ left."
   (javaimp-test-scope-type s
 leaf-types javaimp--classlike-scope-types
 
+(defun javaimp--scope-same-parent-pred (parent)
+  (if parent
+  (lambda (s)
+(and (javaimp-scope-parent s)
+ (= (javaimp-scope-open-brace (javaimp-scope-parent s))
+(javaimp-scope-open-brace parent
+(lambda (s)
+  (not (javaimp-scope-parent s)
+
 
 ;; Tree
 
diff --git a/javaimp.el b/javaimp.el
index 082773d7b4..5ccc37f847 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -573,7 +573,7 @@ If there's no such directive, then the last resort is just
   "Return fully-qualified names of all class-like scopes in the
 current buffer."
   (let ((package (javaimp--parse-get-package))
-(scopes (javaimp--parse-get-all-scopes (javaimp--defun-scope-pred t)))
+(scopes (javaimp--parse-get-all-scopes (javaimp--defun-scope-pred t
 (mapcar (lambda (class)
   (if package
   (concat package "." class)
@@ -884,10 +884,10 @@ opening brace."
 (when (> arg 0) (setq arg (1- arg)))
 (let (found)
   (when-let* ((tmp (javaimp--get-sibling-defuns))
-  (enc-idx (car tmp))
+  (prev-idx (or (car tmp) -1))
   (siblings (cdr tmp))
   (target-idx
-   (let ((val (- enc-idx arg)))
+   (let ((val (- prev-idx arg)))
  (cond ((< val 0)
 0)
((>= val (length siblings))
@@ -905,36 +905,42 @@ opening brace."
   )
 
 (defun javaimp--get-sibling-defuns ()
-  "Return list of the form (ENCLOSING-INDEX . SIBLINGS), where
-SIBLINGS is a list of all sibling defun scopes.  ENCLOSING-INDEX,
-if non-nil, is an index of the enclosing scope in this list.  If
-it's nil then we're between top-level defuns."
+  "Return list of the form (PREV-INDEX . SIBLINGS), where SIBLINGS
+is a list of all sibling defun scopes.  PREV-INDEX is the index
+of the \"previous\" (relative to point) scope in this list, or
+nil."
   (save-excursion
 (save-restriction
   (widen)
-  (let* ((defun-pred (javaimp--defun-scope-pred))
+  (let* ((pos (point))
+ (defun-pred (javaimp--defun-scope-pred))
  (enc (javaimp--parse-get-enclosing-scope defun-pred))
  (sibling-pred
-  (if (and enc (javaimp-scope-parent enc))
-  ;; scopes with same parent
-  (lambda (s)
-(and (javaimp-scope-parent s)
- (= (javaimp-scope-open-brace (javaimp-scope-parent s))
-(javaimp-scope-open-brace (javaimp-scope-parent 
enc)
-;; we're in a top-level scope or outside it, and
-;; need other top-level scopes
-(lambda (s)
-  (not (javaimp-scope-parent s)
+  (if (and enc (eq (javaimp-scope-type enc) 'method))
+  ;; We're inside a method, and need to look at
+  ;; sibling methods within same parent (it's ok for
+  ;; parent to be nil)
+  (javaimp--scope-same-parent-pred (javaimp-scope-parent enc))
+;; We're either inside a type (but not within its
+;; methods), or just at top-level.  Look at defuns
+;; whose parent is enc.
+(javaimp--scope-same-parent-pred enc)))
  (siblings (javaimp--parse-get-all-scopes
 (lambda (s)
   (and (funcall defun-pred s)
-   (funcall sibling-pred s))
-(cons (and enc
-   (seq-position
-siblings enc
-(lambda (s1 s2)
-  (= (javaimp-scope-open-brace s1)
- (javaimp-scope-open-brace s2)
+   (funcall sibling-pred s))

[elpa] externals/consult b670d9a6d5: consult--source-project-recent-file: Handle directories in recentf-list

2022-04-15 Thread ELPA Syncer
branch: externals/consult
commit b670d9a6d5c2a8062391bd5b972172061b65d8f6
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult--source-project-recent-file: Handle directories in recentf-list

In my config, I add opened directories to recentf-list. If the project
root directory is in the recentf-list we got an empty candidate.
---
 consult.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/consult.el b/consult.el
index 6f7f74d639..031c66559b 100644
--- a/consult.el
+++ b/consult.el
@@ -4197,6 +4197,7 @@ If NORECORD is non-nil, do not record the buffer switch 
in the buffer list."
   (ht (consult--buffer-file-hash)))
   (mapcar (lambda (file)
 (let ((part (substring file len)))
+  (when (equal part "") (setq part "./"))
   (put-text-property 0 (length part)
  'multi-category `(file . ,file) part)
   part))



[elpa] externals/vundo ab84e87522 01/58: init

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit ab84e87522d5b34167bd6d044752e4edec93b356
Author: Yuan Fu 
Commit: Yuan Fu 

init
---
 vundo.el | 905 +++
 1 file changed, 905 insertions(+)

diff --git a/vundo.el b/vundo.el
new file mode 100644
index 00..8e1241cc79
--- /dev/null
+++ b/vundo.el
@@ -0,0 +1,905 @@
+;;; vundo.el --- Visual undo tree  -*- lexical-binding: t; -*-
+
+;; Author: Yuan Fu 
+;; Package-Requires: ((emacs "28.0"))
+
+;;; This file is NOT part of GNU Emacs
+
+;;; Commentary:
+;;
+;; To use vundo, type M-x vundo RET in the buffer you want to undo.
+;; A undo tree buffer should pop up. To move around, type:
+;;
+;;   f   to go forward
+;;   b   to go backward
+;;   n   to go to the node below when you at a branching point
+;;   p   to go to the node above
+;;   q   to quit, you can also type C-g
+;;
+;; By default, you need to press RET to “commit” your change and if
+;; you quit with q or C-g, the change made by vundo are rolled back.
+;; You can set ‘vundo-roll-back-on-quit’ to nil to disable rolling
+;; back.
+;;
+;; If you bring up the vundo buffer and make some modification in the
+;; original buffer, the tree in the vundo buffer doesn’t automatically
+;; update. Vundo catches up the next time you invoke any command:
+;; instead of performing that command, it updates the tree.
+
+;;; Developer:
+;;
+;; In the comments, when I say node, modification, mod, buffer state,
+;; they all mean one thing: `vundo-m'. I.e., `vundo-m' represents
+;; multiple things at once: it represents an modification recorded in
+;; `buffer-undo-list', it represents the state of the buffer after
+;; that modification took place, and it represents the node in the
+;; undo tree in the vundo buffer representing that buffer state.
+;;
+;; The basic flow of the program:
+;;
+;; `vundo' calls `vundo--refresh-buffer' to setup the tree structure
+;; and draw it in the buffer. We have two data structures:
+;; `vundo--prev-mod-list' which stores a list of `vundo-m'. This list
+;; is generated from `buffer-undo-list' by `vundo--mod-list-from'. We
+;; also have a hash table `vundo--prev-mod-hash' generated by
+;; `vundo--update-mapping', which maps undo-lists back to the
+;; `vundo-m' object corresponding to it. Once we have the mod-list and
+;; hash table, we connect the nodes in mod-list to form a tree in
+;; `vundo--build-tree'. We build the tree by a simple observation:
+;; only non-undo modifications creates new unique buffer states and
+;; need to be drawn in the tree. For undo modifications, they
+;; associates equivalent nodes.
+;;
+;; Once we have generated the data structure and drawn the tree, vundo
+;; commands can move around on that tree by calling
+;; `vundo--move-to-node'. It will construct the correct undo-list and
+;; feed it to `primitive-undo'. After each movement,
+;; `vundo--move-to-node' also trims the undo list when possible.
+;;
+;; Finally, to avoid generating everything from scratch every time we
+;; moves on the tree, `vundo--refresh-buffer' can incrementally update
+;; the data structures (`vundo--prev-mod-list' and
+;; `vundo--prev-mod-hash'). If the undo list expands, we only process
+;; the new entries, if the undo list shrinks (trimmed), we remove
+;; modifications accordingly.
+;;
+;; For a high-level explanation of how this package works, see
+;; https://archive.casouri.cat/note/2021/visual-undo-tree.
+
+;;; Code:
+
+(require 'pcase)
+(require 'cl-lib)
+(require 'seq)
+
+;;; Customization
+
+(defgroup vundo nil
+  "Visual undo tree."
+  :group 'undo)
+
+(defface vundo-default '((t . (:inherit 'default)))
+  "Default face used in vundo buffer.")
+
+(defface vundo-node '((t . (:inherit 'vundo-default)))
+  "Face for nodes in the undo tree.")
+
+(defface vundo-stem '((t . (:inherit 'vundo-default)))
+  "Face for stems between nodes in the undo tree.")
+
+(defface vundo-highlight '((t . (:inherit 'vundo-node)))
+  "Face for the highlighted node in the undo tree.")
+
+(defcustom vundo-roll-back-on-quit t
+  "If non-nil, vundo will roll back the change when it quits."
+  :type 'boolean)
+
+(defcustom vundo--window-max-height 3
+  "The maximum height of the vundo window."
+  :type 'integer)
+
+(defvar vundo-translation-alist nil
+  "An alist mapping text to their translations.
+E.g., mapping ○ to o, ● to *. Keys and values must be characters,
+not strings.")
+
+;;;###autoload
+(define-minor-mode vundo-ascii-mode
+  "Display the undo tree with ASCII characters."
+  :global t
+  (if vundo-ascii-mode
+  (progn
+(put 'vundo-translation-alist 'before-ascii
+ vundo-translation-alist)
+(setq vundo-translation-alist
+  '((?○ . ?o)
+(?● . ?*)
+(?─ . ?-)
+(?│ . ?|)
+(?├ . ?|)
+(?└ . ?+
+(setq vundo-translation-alist
+  (get 'vundo-translation-alist 'before-ascii
+
+;;; Undo list to mod list
+
+(cl-defstruc

[elpa] externals/vundo 3a569de421 15/58: * README.txt (Changelog): Recording breaking change

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 3a569de421503e990814b157470d6a5e9fa75f2d
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt (Changelog): Recording breaking change
---
 README.txt | 8 
 1 file changed, 8 insertions(+)

diff --git a/README.txt b/README.txt
index 749d7f1bab..95b856db9b 100644
--- a/README.txt
+++ b/README.txt
@@ -21,5 +21,13 @@ Note: vundo.el requires Emacs 28.
 
 Changelog:
 
+<2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
+differently now, it now draws
+
+o--o--o instead of  o--o--o
+|  `--x |  +--*
+|--o|--o
+`--o+--o
+
 <2021-11-26 Fri>: Variable vundo-translate-alist changed to
 vundo-glyph=alist and has different value now.



[elpa] externals/vundo c92f6a1f3f 08/58: Prevent others from muddling the buffer

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit c92f6a1f3f9be3bc0820dc566e64917d01ed32b6
Author: Yuan Fu 
Commit: Yuan Fu 

Prevent others from muddling the buffer

* vundo.el (vundo-quit, vundo--move-to-node): Set read-only variables.
---
 vundo.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/vundo.el b/vundo.el
index a01fbc4ba2..e87b93f0b9 100644
--- a/vundo.el
+++ b/vundo.el
@@ -634,6 +634,9 @@ Roll back changes if `vundo-roll-back-on-quit' is non-nil."
   (vundo--current-node vundo--prev-mod-list)
   vundo--roll-back-to-this
   vundo--orig-buffer vundo--prev-mod-list))
+   (with-current-buffer vundo--orig-buffer
+ (setq-local inhibit-modification-hooks nil
+ buffer-read-only nil))
(kill-buffer-and-window)))
 
 ;;; Traverse undo tree
@@ -714,6 +717,8 @@ after calling this function."
 undo-list-at-source undo-list-at-dest))
  trimmed)
 (with-current-buffer orig-buffer
+  (setq-local inhibit-modification-hooks t
+  buffer-read-only t)
   ;; 2. Undo. This will undo modifications in PLANNED-UNDO and
   ;; add new entries to ‘buffer-undo-list’.
   (let ((undo-in-progress t))



[elpa] branch externals/vundo created (now 377194b705)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch externals/vundo.

at  377194b705 * vundo.el: Fix dependency tag.

This branch includes the following new commits:

   new  ab84e87522 init
   new  5373b94737 Add tests
   new  2e23d5cfb6 * vundo.el (vundo--check-for-command): Add option to 
kill buffer.
   new  2bb4bc8404 Fix nodes' face
   new  a3e27e84f1 Add an option that controls the side on which we display 
vundo window
   new  4b6551748b * README.txt: New file.
   new  e136164f77 * vundo.el (vundo-next): move till end when asked to 
move too far
   new  c92f6a1f3f Prevent others from muddling the buffer
   new  b40f5fcd52 Fix: closing vundo with RET makes the buffer read-only
   new  578a9f6be1 Update tests to accommodate read-only-ness
   new  4fddb2b004 Use vundo-glyph-alist, and overlay for highlight
   new  b996e201d8 * README.txt: Add notice
   new  1da75782e0 Remove inhibit-modification-hooks
   new  549efe15c3 UI change: default to ASCII and more
   new  3a569de421 * README.txt (Changelog): Recording breaking change
   new  39d80d2093 * README.txt: Add detail and tips.
   new  24f99e54b2 Fix face definitions
   new  1737bcee28 Add vundo-compact-display
   new  e89a292c15 Rename vundo--mode to vundo-mode
   new  928c60747a * test/vundo-test.el (vundo-test--setup): Fix test to 
use Unicode.
   new  67e797bc14 * README.txt (Changelog): Record vundo--mode and 
vundo-compact-display.
   new  81d126cfab Fix vundo-stem-root and vundo-stem-end
   new  429e3a2397 Format fix
   new  06de574d4f Ignore position-only records when generating mod-list
   new  b27ddfecfd Handle user quit gracefully
   new  ac37626525 Fix test
   new  b7e2119191 Change i.e. to ie, e.g. to eg
   new  42c8e4adc1 Remove nth in vundo--mod-list-from
   new  8a2f09ae42 Merge branch 'pr-avoid-list-nth'
   new  f8cd72b611 * test/vundo-test.el (vundo-test--skip-position-only): 
New test.
   new  31b1491178 * README.txt: Add comparison.
   new  8c0ff18e7f * README.txt: Reword comparison.
   new  1b98c3708c * vundo.el (vundo--eqv-merge): Replace nth for 
performance.
   new  aefb233005 Fix #9: Disable evil-mode in vundo-mode
   new  a66bb05062 Merge branch 'pr-evil-mode-disable'
   new  76a54ce79d * README.txt (Tests): New section.
   new  7cafb7aac5 Merge branch 'pr-readme-test'
   new  ed0d7d42d8 Replace lists with vectors for the main vundo-m lists
   new  6a408d000f * vundo.el (vundo--check-for-command): Add declaration 
for edebug.
   new  8d7e80d149 * vundo.el (vundo--refresh-buffer): Update docstring.
   new  978534ad68 Trim once after all movements
   new  6acda40607 Fix vundo-forward
   new  0dc3ac6d42 * vundo.el (vundo--replace-at-col): Remove unused 
function.
   new  4341d838aa * vundo.el (vundo-glyph-alist): Escape backtick in 
docstring.
   new  22345f42b1 * vundo.el (vundo): Replace let* with let.
   new  9edd0ca36b * vundo.el (vundo--eqv-list-of): Replace reverse with 
nreverse.
   new  0e3af84944 Prepare for publish
   new  acdc70671a Improve README for publishing
   new  d833570d47 Update README per request
   new  b93e15e0c2 * vundo.el: Sync from README.
   new  9657909b43 Trim a nreverse call in vundo--eqv-list-of
   new  c9e8909c50 Merge branch 'pr-no-nreverse'
   new  7ddb684eb5 * vundo.el (vundo--draw-tree): Set 
inhibit-modification-hooks to t.
   new  00e5c4e73c * vundo.el (vundo-mode): Avoid duplicates in 
evil-emacs-state-modes.
   new  c44a2787ea Remove redundant list creation from vundo--eqv-list-of
   new  8067005e53 Merge branch 'pr-remove-redundant-eqv-list-of'
   new  6c15a96fb6 * test/vundo-test.el (vundo-test--3): Skip this test in 
batch mode.
   new  377194b705 * vundo.el: Fix dependency tag.




[elpa] externals/vundo 5373b94737 02/58: Add tests

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 5373b94737a5f806cfa5eaccdd8db55b8554207b
Author: Yuan Fu 
Commit: Yuan Fu 

Add tests

* test/test-2.txt: New file.
* test/vundo-test.el: New file.
---
 test/test-2.txt|   2 +
 test/vundo-test.el | 239 +
 2 files changed, 241 insertions(+)

diff --git a/test/test-2.txt b/test/test-2.txt
new file mode 100644
index 00..1cf31fd5a2
--- /dev/null
+++ b/test/test-2.txt
@@ -0,0 +1,2 @@
+○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○
+   
   
└──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○──○
diff --git a/test/vundo-test.el b/test/vundo-test.el
new file mode 100644
index 00..cc7c9c0b2d
--- /dev/null
+++ b/test/vundo-test.el
@@ -0,0 +1,239 @@
+;;; vundo-test.el --- Tests for vundo  -*- lexical-binding: t; -*-
+
+;; Author: Yuan Fu 
+
+;;; This file is NOT part of GNU Emacs
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+(require 'vundo)
+(require 'subr-x)
+(require 'cl-lib)
+
+(ert-deftest vundo-test--mod-list ()
+  "Tests for mod-list generation and incremental extension."
+  (let* ((ul3 '(3 2 1))
+ (ul6 (append '(6 5 4 nil) ul3))
+ (ul9 (append '(9 8 7 nil) ul6))
+ (ml6 (vundo--mod-list-from ul6 7 nil))
+ (ml9 (vundo--mod-list-from ul9 4 ml6)))
+(should (equal (mapcar #'vundo-m-undo-list ml6)
+   (list nil ul3 ul6)))
+(should (equal (mapcar #'vundo-m-undo-list ml9)
+   (list nil ul3 ul6 ul9)))
+
+(let ((ht6 (vundo--update-mapping ml6 nil 0)))
+  (should (eq (gethash ul3 ht6) (nth 1 ml6)))
+  (should (eq (gethash ul6 ht6) (nth 2 ml6)))
+
+  (let ((ht9 (vundo--update-mapping ml9 ht6 3)))
+(should (eq (gethash ul9 ht9) (nth 3 ml9
+
+  (should (equal (mapcar #'vundo-m-idx ml9)
+ '(0 1 2 3))
+
+(defsubst vundo-test--buf-str-np ()
+  "(buffer-substring-no-properties (point-min) (point-max))."
+  (buffer-substring-no-properties
+   (point-min) (point-max)))
+
+(defsubst vundo-test--current-idx ()
+  "(vundo-m-idx (vundo--current-node vundo--prev-mod-list))."
+  (vundo-m-idx (vundo--current-node vundo--prev-mod-list)))
+
+(defsubst vundo-test--last-idx ()
+  "(vundo-m-idx (car (last vundo--prev-mod-list)))."
+  (vundo-m-idx (car (last vundo--prev-mod-list
+
+(defmacro vundo-test--setup (&rest body)
+  "Setup and evaluate BODY."
+  `(with-temp-buffer
+ (buffer-enable-undo)
+ (let ((vundo-translation-alist nil))
+   ,@body)))
+
+(ert-deftest vundo-test--1 ()
+  "Tests for simple movements.
+Tests backward/forward, previous/next, undo list trimming."
+  (vundo-test--setup
+   (insert "a")
+   (undo-boundary)
+   (undo)
+   (undo-boundary)
+   (insert "a")
+   (undo-boundary)
+
+   (with-current-buffer (vundo-1 (current-buffer))
+ (should (equal (vundo-test--buf-str-np)
+"○──○\n└──○"))
+ (should (eq (vundo-test--current-idx) 3))
+
+ (vundo-next 1)
+ (should (eq (vundo-test--current-idx) 1))
+
+ (vundo-backward 1)
+ (should (eq (vundo-test--current-idx) 0))
+
+ (vundo-forward 1)
+ (should (eq (vundo-test--current-idx) 3))
+
+ (dotimes (_ 20)
+   (vundo-backward 1)
+   (vundo-forward 1))
+ (should (eq (length vundo--prev-mod-list) 4))
+
+ (dotimes (_ 20)
+   (vundo-next 1)
+   (vundo-previous 1))
+ (should (eq (length vundo--prev-mod-list) 4)
+
+(defun vundo--file-content (file)
+  "Return the content of FILE as a string."
+  (with-temp-buffer
+(insert-file-contents file)
+(vundo-test--buf-str-np)))
+
+(defvar vundo--test-directory
+  (or (and load-file-name
+   (file-name-directory load-file-name))
+  default-directory)
+  "Path to test directory under project root.")
+
+(defun vundo--test-file (file)
+  "Return the content of FILE under test directory.
+Sans ending newline."
+  (string-trim (vundo--file-content
+(expand-file-name file vundo--test-directory))
+   "\n"))
+
+(defun vundo-test--insert (&rest strings)
+  "Insert STRINGS, delimit them with (undo-boundary)."
+  (dolist (str strings)
+(insert str)
+(undo-boundary)))
+
+(defun vundo-test--exec (cmds)
+  "Run commands in CMDS like interactive commands."
+  (dolist (cmd cmds)
+(setq last-command this-command)
+(setq this-command cmd)
+(run-hooks 'pre-command-hook)
+(command-execute cmd)
+(run-hooks 'post-command-hook)
+(undo-boundary)))
+
+(ert-deftest 

[elpa] externals/vundo 928c60747a 20/58: * test/vundo-test.el (vundo-test--setup): Fix test to use Unicode.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 928c60747ab0b448c731d5bf67c0952eebfa678a
Author: Yuan Fu 
Commit: Yuan Fu 

* test/vundo-test.el (vundo-test--setup): Fix test to use Unicode.
---
 test/vundo-test.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index 49788d794a..2ca910f6ca 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -52,7 +52,7 @@
   "Setup and evaluate BODY."
   `(with-temp-buffer
  (buffer-enable-undo)
- (let ((vundo-translation-alist nil))
+ (let ((vundo-glyph-alist vundo-unicode-symbols))
,@body)))
 
 (ert-deftest vundo-test--1 ()



[elpa] externals/vundo a3e27e84f1 05/58: Add an option that controls the side on which we display vundo window

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit a3e27e84f1e4c6859157cb926b49fe4a53563c3e
Author: Nasy 
Commit: Yuan Fu 

Add an option that controls the side on which we display vundo window

* vundo.el (vundo-window-side): New custom option.
(vundo): Use 'vundo-window-side'.
---
 vundo.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index da2def666e..99685bf9eb 100644
--- a/vundo.el
+++ b/vundo.el
@@ -98,6 +98,11 @@
   "The maximum height of the vundo window."
   :type 'integer)
 
+(defcustom vundo-window-side 'bottom
+  "The vundo window pops up on this side."
+  :type '(choice (const :tag "Bottom" bottom)
+ (const :tag "Top"top)))
+
 (defvar vundo-translation-alist nil
   "An alist mapping text to their translations.
 E.g., mapping ○ to o, ● to *. Keys and values must be characters,
@@ -563,7 +568,7 @@ Highlight if ARG >= 0, de-highlight if ARG < 0."
 (select-window
  (display-buffer-in-side-window
   vundo-buf
-  '((side . bottom)
+  `((side . ,vundo-window-side)
 (window-height . 3
 (set-window-dedicated-p nil t)
 (let ((window-min-height 3))



[elpa] externals/vundo 2bb4bc8404 04/58: Fix nodes' face

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 2bb4bc840456d096f76d2ac338be3e72a6be3c03
Author: Yuan Fu 
Commit: Yuan Fu 

Fix nodes' face

* vundo.el (vundo--draw-tree): Put face from -3 to -1, instead of -4
to -1, when we only insert a stem that is 3 characters long.
---
 vundo.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vundo.el b/vundo.el
index f0be981cd4..da2def666e 100644
--- a/vundo.el
+++ b/vundo.el
@@ -386,13 +386,14 @@ Translate according to `vundo-translation-alist'."
 (delete-char 3))
   ;; Insert the new node.
   (if (eq (point) planned-point)
-  (insert (vundo--translate "──○"))
+  (progn (insert (vundo--translate "──○"))
+ (vundo--put-face -3 -1 'vundo-stem))
 ;; Delete the previously inserted |.
 (delete-char -1)
 (if node-last-child-p
 (insert (vundo--translate "└──○"))
-  (insert (vundo--translate "├──○"
-  (vundo--put-face -4 -1 'vundo-stem)
+  (insert (vundo--translate "├──○")))
+(vundo--put-face -4 -1 'vundo-stem))
   (vundo--put-face -1 0 'vundo-node
 ;; Store point so we can later come back to this node.
 (setf (vundo-m-point node) (point))



[elpa] externals/vundo 4fddb2b004 11/58: Use vundo-glyph-alist, and overlay for highlight

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 4fddb2b00422c062839320470070cf71b9114655
Author: Philip Kaludercic 
Commit: Yuan Fu 

Use vundo-glyph-alist, and overlay for highlight

1. Replace vundo-ascii-mode with vundo-glyph-alist

The new user option maps symbols designating parts of a tree to
characters used to draw these trees.  The two constants
`vundo-ascii-symbols' and `vundo-unicode-symbols' are two examples for
alist that can be assigned to vundo-symbol-alist.

2. Re-implement node highlighting using overlays

* vundo.el (vundo-ascii-symbols, vundo-ascii-mode): Remove.
(vundo-ascii-symbols, vundo-unicode-symbols, vundo-glyph-alist): New
variables.
(vundo--translate): Use the new vundo-glyph-alist.
(vundo--next-line-at-column): Remove function.
(vundo--draw-tree): Replace vundo--put-face with just propertize.
(vundo--highlight-overlay): New variable.
(vundo--refresh-buffer): Don't need to de-highlight anymore. Replace
vundo--toggle-highlight with vundo--highlight-node. Go to the
highlighted node explicitly.
(vundo--toggle-highlight): Remove function.
(vundo--highlight-node): New function, replaces
vundo--toggle-highlight.

Co-Authored-By: Yuan Fu 
---
 vundo.el | 143 ---
 1 file changed, 83 insertions(+), 60 deletions(-)

diff --git a/vundo.el b/vundo.el
index 9a7b78ce04..df72ed8dbc 100644
--- a/vundo.el
+++ b/vundo.el
@@ -103,28 +103,46 @@
   :type '(choice (const :tag "Bottom" bottom)
  (const :tag "Top"top)))
 
-(defvar vundo-translation-alist nil
-  "An alist mapping text to their translations.
-E.g., mapping ○ to o, ● to *. Keys and values must be characters,
-not strings.")
-
-;;;###autoload
-(define-minor-mode vundo-ascii-mode
-  "Display the undo tree with ASCII characters."
-  :global t
-  (if vundo-ascii-mode
-  (progn
-(put 'vundo-translation-alist 'before-ascii
- vundo-translation-alist)
-(setq vundo-translation-alist
-  '((?○ . ?o)
-(?● . ?*)
-(?─ . ?-)
-(?│ . ?|)
-(?├ . ?|)
-(?└ . ?+
-(setq vundo-translation-alist
-  (get 'vundo-translation-alist 'before-ascii
+(defconst vundo-ascii-symbols
+  '((selected-node . ?*)
+(node . ?o)
+(horizontal-stem . ?-)
+(vertical-stem . ?|)
+(branch . ?|)
+(last-branch . ?+))
+  "ASCII symbols to draw vundo tree.")
+
+(defconst vundo-unicode-symbols
+  '((selected-node . ?●)
+(node . ?○)
+(horizontal-stem . ?─)
+(vertical-stem . ?│)
+(branch . ?├)
+(last-branch . ?└))
+  "Unicode symbols to draw vundo tree.")
+
+(defcustom vundo-glyph-alist vundo-unicode-symbols
+  "Alist mapping tree parts to characters used to draw a tree.
+Keys are names for different parts of a tree, values are
+characters for that part. Possible keys include
+
+nodewhich represents ○
+selected-node   which represents ●
+horizontal-stem which represents ─
+vertical-stem   which represents │
+branch  which represents ├
+last-branch which represents └
+
+in a tree like
+
+○──○──○
+│  └──●
+├──○
+└──○"
+  :type `(alist :tag "Translation alist"
+   :key-type (symbol :tag "Part of tree")
+   :value-type (character :tag "Draw using")
+   :options ,(mapcar #'car vundo-unicode-symbols)))
 
 ;;; Undo list to mod list
 
@@ -343,17 +361,21 @@ If a line is not COL columns long, skip that line."
   (indent-to-column col
 
 (defun vundo--translate (text)
-  "Translate each character in TEXT and return it.
-Translate according to `vundo-translation-alist'."
-  (seq-mapcat (lambda (c)
+  "Translate each character in TEXT and return translated TEXT.
+Translate according to ‘vundo-glyph-alist’."
+  (seq-mapcat (lambda (ch)
 (char-to-string
- (alist-get c vundo-translation-alist c)))
+ (alist-get
+  (pcase ch
+(?○ 'node)
+(?● 'selected-node)
+(?─ 'horizontal-stem)
+(?│ 'vertical-stem)
+(?├ 'branch)
+(?└ 'last-branch))
+  vundo-glyph-alist)))
   text 'string))
 
-(defun vundo--put-face (beg end face)
-  "Add FACE to the text between (+ (point) BEG) and (+ (point) END)."
-  (put-text-property (+ (point) beg) (+ (point) end) 'face face))
-
 (defun vundo--draw-tree (mod-list)
   "Draw the tree in MOD-LIST in current buffer."
   (let* ((root (nth 0 mod-list))
@@ -372,8 +394,8 @@ Translate according to `vundo-translation-alist'."
 (if parent (goto-char (vundo-m-point parent)))
 (let ((col (max 0 (1- (current-column)
   (if (null parent)
-  (progn (insert (vundo--translate "○"))
- (vund

[elpa] externals/vundo 6a408d000f 39/58: * vundo.el (vundo--check-for-command): Add declaration for edebug.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 6a408d000fd9a50142af9b63a301689a5f543e8b
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--check-for-command): Add declaration for edebug.
---
 vundo.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/vundo.el b/vundo.el
index 27c63dbe0f..5f0e030ac8 100644
--- a/vundo.el
+++ b/vundo.el
@@ -702,6 +702,7 @@ BUFFER must have a valid `buffer-undo-list'."
 (defmacro vundo--check-for-command (&rest body)
   "Sanity check before running interactive commands.
 Do sanity check, then evaluate BODY."
+  (declare (debug (&rest form)))
   `(progn
  (when (not (derived-mode-p 'vundo-mode))
(user-error "Not in vundo buffer"))



[elpa] externals/vundo 31b1491178 31/58: * README.txt: Add comparison.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 31b1491178944f53a2654e0e80bc931d7b00193d
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt: Add comparison.
---
 README.txt | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README.txt b/README.txt
index 29e0695fb6..13f482299f 100644
--- a/README.txt
+++ b/README.txt
@@ -60,3 +60,13 @@ differently now, it now draws
 
 <2021-11-26 Fri>: Variable vundo-translate-alist changed to
 vundo-glyph-alist and has different value now.
+
+
+Comparing to undo-tree:
+
+I don’t think vundo has any real advantage over undo-tree. On the
+contrary, undo-tree has much more features like diff, etc. (And vundo
+most probably will not add these features.) Vundo is really just a
+code challenge (can we construct an undo tree from linear history)
+came true. One thing I like about vundo is that it lays out the undo
+tree horizontally instead of horizontally.



[elpa] externals/vundo 2e23d5cfb6 03/58: * vundo.el (vundo--check-for-command): Add option to kill buffer.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 2e23d5cfb61b72537ae944146dd7d59af9a34ecb
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--check-for-command): Add option to kill buffer.
---
 vundo.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 8e1241cc79..f0be981cd4 100644
--- a/vundo.el
+++ b/vundo.el
@@ -594,7 +594,10 @@ Do sanity check, then evaluate BODY."
  (when (not (derived-mode-p 'vundo--mode))
(user-error "Not in vundo buffer"))
  (when (not (buffer-live-p vundo--orig-buffer))
-   (user-error "Original buffer is gone"))
+   (when (y-or-n-p "Original buffer is gone, kill vundo buffer? ")
+ (kill-buffer-and-window))
+   ;; Non-local exit.
+   (user-error ""))
  ;; If ORIG-BUFFER changed since we last synced the vundo buffer
  ;; (e.g., user left vundo buffer and did some edit in ORIG-BUFFER
  ;; then comes back), refresh to catch up.



[elpa] externals/vundo ac37626525 26/58: Fix test

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit ac376265251db93211f3326e729c2aac47c4eba8
Author: Yuan Fu 
Commit: Yuan Fu 

Fix test

* test/vundo-test.el (vundo-test--mod-list): Replace integers with
symbols in test undo-list. Because now integers are skipped (06de574).
---
 test/vundo-test.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index 2ca910f6ca..f2e7c13667 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -15,9 +15,9 @@
 
 (ert-deftest vundo-test--mod-list ()
   "Tests for mod-list generation and incremental extension."
-  (let* ((ul3 '(3 2 1))
- (ul6 (append '(6 5 4 nil) ul3))
- (ul9 (append '(9 8 7 nil) ul6))
+  (let* ((ul3 '(m3 m2 m1))
+ (ul6 (append '(m6 m5 m4 nil) ul3))
+ (ul9 (append '(m9 m8 m7 nil) ul6))
  (ml6 (vundo--mod-list-from ul6 7 nil))
  (ml9 (vundo--mod-list-from ul9 4 ml6)))
 (should (equal (mapcar #'vundo-m-undo-list ml6)



[elpa] externals/vundo 0e3af84944 47/58: Prepare for publish

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 0e3af84944c2c69ddaf5364868fe77c31f62527e
Author: Yuan Fu 
Commit: Yuan Fu 

Prepare for publish

* README.txt: Move changelog to the bottom.
* vundo.el: Add copyright, etc, Set to version 1.0.0. Copy over some
README to Commentary.
---
 README.txt | 21 -
 vundo.el   | 49 +++--
 2 files changed, 59 insertions(+), 11 deletions(-)

diff --git a/README.txt b/README.txt
index e966e21562..5fdc205a5e 100644
--- a/README.txt
+++ b/README.txt
@@ -55,8 +55,20 @@ to run those tests interactively, or use the following batch 
command:
-l test/vundo-test.el \
-f ert-run-tests-batch-and-exit
 
+Comparing to undo-tree:
+
+Vundo doesn’t need to be turned on all the time nor replace the undo
+commands like undo-tree does. Vundo displays the tree horizontally,
+whereas undo-tree displays a tree vertically. Vundo doesn’t have many
+advanced features that undo-tree does (like showing diff), and most
+probably will not add those features in the future.
+
+
+
 Changelog:
 
+<2022-04-04 Mon> Version 1.0.0
+
 <2022-03-29 Tue> vundo--mode and vundo--mode-map are now vundo-mode
 and vundo-mode-map. A new custom option vundo-compact-display is added.
 
@@ -70,12 +82,3 @@ differently now, it now draws
 
 <2021-11-26 Fri>: Variable vundo-translate-alist changed to
 vundo-glyph-alist and has different value now.
-
-
-Comparing to undo-tree:
-
-Vundo doesn’t need to be turned on all the time nor replace the undo
-commands like undo-tree does. Vundo displays the tree horizontally,
-whereas undo-tree displays a tree vertically. Vundo doesn’t have many
-advanced features that undo-tree does (like showing diff), and most
-probably will not add those features in the future.
diff --git a/vundo.el b/vundo.el
index d87f475e9d..27a6368811 100644
--- a/vundo.el
+++ b/vundo.el
@@ -1,9 +1,28 @@
 ;;; vundo.el --- Visual undo tree  -*- lexical-binding: t; -*-
 
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
+;;
 ;; Author: Yuan Fu 
+;; Maintainer: Yuan Fu 
+;; URL: https://github.com/casouri/vundo
+;; Version: 1.0.0
+;; Keywords: undo, text
 ;; Package-Requires: ((emacs "28.0"))
-
-;;; This file is NOT part of GNU Emacs
+;;
+;; This file is part of GNU Emacs.
+;;
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
 
 ;;; Commentary:
 ;;
@@ -25,6 +44,32 @@
 ;; original buffer, the tree in the vundo buffer doesn’t automatically
 ;; update. Vundo catches up the next time you invoke any command:
 ;; instead of performing that command, it updates the tree.
+;;
+;; Faces:
+;;
+;; - vundo-default
+;; - vundo-node
+;; - vundo-stem
+;; - vundo-highlight
+;;
+;; If you want to use prettier Unicode characters to draw the tree like
+;; this:
+;;
+;; ○──○──○
+;; │  └──●
+;; ├──○
+;; └──○
+;;
+;; set vundo-glyph-alist by
+;;
+;; (setq vundo-glyph-alist vundo-unicode-symbols)
+;;
+;; Your default font needs to contain these Unicode characters, otherwise
+;; they look terrible and don’t align. You can find a font that covers
+;; these characters (eg, Symbola, Unifont), and set ‘vundo-default’ face
+;; to use that font:
+;;
+;; (set-face-attribute 'vundo-default nil :family "Symbola")
 
 ;;; Developer:
 ;;



[elpa] externals/vundo aefb233005 34/58: Fix #9: Disable evil-mode in vundo-mode

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit aefb2330050932b153530674e7e45063f8bc2dd0
Author: Campbell Barton 
Commit: Yuan Fu 

Fix #9: Disable evil-mode in vundo-mode

Evil-mode binds arrow keys which we want vundo to use.

* vundo.el (vundo-mode): Add code to exclude vundo from evil-mode.
---
 vundo.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 94b7d03375..fbf371fdb2 100644
--- a/vundo.el
+++ b/vundo.el
@@ -538,7 +538,12 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
 truncate-lines t
 cursor-type nil)
   (jit-lock-mode -1)
-  (face-remap-add-relative 'default 'vundo-default))
+  (face-remap-add-relative 'default 'vundo-default)
+
+  ;; Disable evil-mode, as normal-mode
+  ;; key bindings override the ones set by vundo.
+  (when (boundp 'evil-emacs-state-modes)
+(push 'vundo-mode evil-emacs-state-modes)))
 
 (defvar-local vundo--prev-mod-list nil
   "Modification list generated by ‘vundo--mod-list-from’.")



[elpa] externals/vundo 1737bcee28 18/58: Add vundo-compact-display

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 1737bcee281256e6cb1f51073b245ed62d4c8a64
Author: Campbell Barton 
Commit: Yuan Fu 

Add vundo-compact-display

* vundo.el (vundo-compact-display): New option.
(vundo--draw-tree): Draw shorter stem according to vundo-compact-display.
---
 vundo.el | 28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/vundo.el b/vundo.el
index 1f1f346714..5ba9ad4180 100644
--- a/vundo.el
+++ b/vundo.el
@@ -125,6 +125,17 @@
 (last-branch . ?└))
   "Unicode symbols to draw vundo tree.")
 
+(defcustom vundo-compact-display nil
+  "Show a more compact tree display if non-nil.
+Basically we display
+
+○─○─○  instead of  ○──○──○
+│ └─●  │  └──●
+├─○├──○
+└─○└──○
+"
+  :type 'boolean)
+
 (defcustom vundo-glyph-alist vundo-ascii-symbols
   "Alist mapping tree parts to characters used to draw a tree.
 Keys are names for different parts of a tree, values are
@@ -423,18 +434,23 @@ Translate according to ‘vundo-glyph-alist’."
 'face 'vundo-stem)))
   ;; Make room for inserting the new node.
   (unless (looking-at "$")
-(delete-char 3))
+(delete-char (if vundo-compact-display 2 3)))
   ;; Insert the new node.
   (if (eq (point) planned-point)
-  (insert (propertize (vundo--translate "──")
-  'face 'vundo-stem)
+  (insert (propertize
+   (vundo--translate
+(if vundo-compact-display "─" "──"))
+   'face 'vundo-stem)
   (propertize (vundo--translate "○")
   'face 'vundo-node))
 ;; Delete the previously inserted |.
 (delete-char -1)
-(insert (propertize (vundo--translate
- (if node-last-child-p "└──" "├──"))
-'face 'vundo-stem))
+(insert (propertize
+ (vundo--translate
+  (if node-last-child-p
+  (if vundo-compact-display "└─" "└──")
+(if vundo-compact-display "├─" "├──")))
+ 'face 'vundo-stem))
 (insert (propertize (vundo--translate "○")
 'face 'vundo-node))
 ;; Store point so we can later come back to this node.



[elpa] externals/vundo 4b6551748b 06/58: * README.txt: New file.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 4b6551748b205dde157bccafcfdd4637071939c7
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt: New file.
---
 README.txt | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/README.txt b/README.txt
new file mode 100644
index 00..a419b9df37
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,18 @@
+To use vundo, type M-x vundo RET in the buffer you want to undo.
+A undo tree buffer should pop up. To move around, type:
+
+  f   to go forward
+  b   to go backward
+  n   to go to the node below when you at a branching point
+  p   to go to the node above
+  q   to quit, you can also type C-g
+
+By default, you need to press RET to “commit” your change and if
+you quit with q or C-g, the change made by vundo are rolled back.
+You can set ‘vundo-roll-back-on-quit’ to nil to disable rolling
+back.
+
+If you bring up the vundo buffer and make some modification in the
+original buffer, the tree in the vundo buffer doesn’t automatically
+update. Vundo catches up the next time you invoke any command:
+instead of performing that command, it updates the tree.



[elpa] externals/vundo 4341d838aa 44/58: * vundo.el (vundo-glyph-alist): Escape backtick in docstring.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 4341d838aa37f1d1eff0292a0afb242957d130de
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo-glyph-alist): Escape backtick in docstring.
---
 vundo.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vundo.el b/vundo.el
index 66afec7e05..6dcd6cb20c 100644
--- a/vundo.el
+++ b/vundo.el
@@ -176,9 +176,9 @@ in a tree like
 By default, the tree is drawn with ASCII characters like this:
 
 o--o--o
-|  `--x
+|  \\=`--x
 |--o
-`--o
+\\=`--o
 
 Set this variable to ‘vundo-unicode-symbols’ to use Unicode
 characters."



[elpa] externals/vundo 578a9f6be1 10/58: Update tests to accommodate read-only-ness

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 578a9f6be1a8d4827d05888aa10539989976e696
Author: Yuan Fu 
Commit: Yuan Fu 

Update tests to accommodate read-only-ness

* test/vundo-test.el (vundo-test--insert, vundo-test--4): Add
inhibit-read-only.
---
 test/vundo-test.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index cc7c9c0b2d..49788d794a 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -111,9 +111,10 @@ Sans ending newline."
 
 (defun vundo-test--insert (&rest strings)
   "Insert STRINGS, delimit them with (undo-boundary)."
-  (dolist (str strings)
-(insert str)
-(undo-boundary)))
+  (let ((inhibit-read-only t))
+(dolist (str strings)
+  (insert str)
+  (undo-boundary
 
 (defun vundo-test--exec (cmds)
   "Run commands in CMDS like interactive commands."
@@ -196,7 +197,8 @@ Sans ending newline."
   "This tests large buffers."
   (vundo-test--setup
(let ((undo-limit most-positive-fixnum)
- (undo-strong-limit most-positive-fixnum))
+ (undo-strong-limit most-positive-fixnum)
+ (inhibit-read-only t))
  (dotimes (_1 100)
(dotimes (_2 5000)
  ;; Not DRY, but I like to write it.



[elpa] externals/vundo 42c8e4adc1 28/58: Remove nth in vundo--mod-list-from

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 42c8e4adc149d5bd6ebed6ae7c779cb8c51685be
Author: Campbell Barton 
Commit: Yuan Fu 

Remove nth in vundo--mod-list-from

Avoid O(n^2) list lookups in vundo--mod-list-from by removing nth,
because nth steps through the list every time.

* vundo.el (vundo--position-only-p, vundo--mod-list-from): Replace nth
with popping.
* test/vundo-test.el (vundo-test--position-only-p): New test.
---
 test/vundo-test.el | 13 
 vundo.el   | 58 --
 2 files changed, 43 insertions(+), 28 deletions(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index 2ca910f6ca..ae510995d1 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -35,6 +35,19 @@
   (should (equal (mapcar #'vundo-m-idx ml9)
  '(0 1 2 3))
 
+(ert-deftest vundo-test--position-only-p ()
+  "Tests for ‘vundo--position-only-p’."
+  (let* ((ul1 '(9 nil 8 nil 7 nil))
+ (ul2 '(9 nil 8 stuff nil 7 nil)))
+(should (vundo--position-only-p ul1))
+(should (vundo--position-only-p (nthcdr 2 ul1)))
+(should (vundo--position-only-p (nthcdr 4 ul1)))
+(should (vundo--position-only-p (last ul1)))
+
+(should (vundo--position-only-p ul2))
+(should (not (vundo--position-only-p (nthcdr 2 ul2
+(should (vundo--position-only-p (nthcdr 5 ul2)
+
 (defsubst vundo-test--buf-str-np ()
   "(buffer-substring-no-properties (point-min) (point-max))."
   (buffer-substring-no-properties
diff --git a/vundo.el b/vundo.el
index bed630736c..11e1ad81a5 100644
--- a/vundo.el
+++ b/vundo.el
@@ -223,44 +223,46 @@ modification."
:type integer
:documentation "Marks the text node in the vundo buffer if drawn."))
 
-(defsubst vundo--position-only-p (idx undo-list)
-  "Check if the records at IDX in UNDO-LIST is position-only.
-Position-only means all records from IDX to the next undo
+(defun vundo--position-only-p (undo-list)
+  "Check if the records at the start of UNDO-LIST are position-only.
+Position-only means all records until to the next undo
 boundary are position records. Position record is just an
-integer (see ‘buffer-undo-list’). Assumes the beginning of the
-UNDO-LIST is not nil."
-  (catch 'ret
-(while (nth idx undo-list)
-  (when (not (integerp (nth idx undo-list)))
-(throw 'ret nil))
-  (cl-incf idx))
-t))
+integer (see ‘buffer-undo-list’). Assumes the first element
+of UNDO-LIST is not nil."
+  (let ((pos-only t))
+(while (car undo-list)
+  (when (not (integerp (pop undo-list)))
+(setq pos-only nil)
+(setq undo-list nil)))
+pos-only))
 
 (defun vundo--mod-list-from (undo-list &optional n mod-list)
   "Generate and return a modification list from UNDO-LIST.
 If N non-nil, only look at the first N entries in UNDO-LIST.
 If MOD-LIST non-nil, extend on MOD-LIST."
-  (let ((bound (or n (length undo-list)))
-(uidx 0)
+  (let ((uidx 0)
 (mod-list (or mod-list (list (make-vundo-m
 new-mlist)
-(while (and (consp undo-list) (< uidx bound))
+(while (and undo-list (or (null n) (< uidx n)))
   ;; Skip leading nils.
-  (while (and (< uidx bound) (null (nth uidx undo-list)))
+  (while (and undo-list (null (car undo-list)))
+(setq undo-list (cdr undo-list))
 (cl-incf uidx))
-  ;; Add modification.
-  (unless (vundo--position-only-p uidx undo-list)
-;; If this record is position-only, we skip it and don’t add a
-;; mod for it. Effectively taking it out of the undo tree.
-;; Read ‘Position-only records’ section in Commentary for more
-;; explanation.
-(when (< uidx bound)
-  (cl-assert (not (null (nth uidx undo-list
-  (push (make-vundo-m :undo-list (nthcdr uidx undo-list))
-new-mlist)))
-  ;; Skip through the content of this modification.
-  (while (nth uidx undo-list)
-(cl-incf uidx)))
+  ;; It's possible the index was exceeded stepping over nil.
+  (when (or (null n) (< uidx n))
+;; Add modification.
+(unless (vundo--position-only-p undo-list)
+  ;; If this record is position-only, we skip it and don’t add a
+  ;; mod for it. Effectively taking it out of the undo tree.
+  ;; Read ‘Position-only records’ section in Commentary for more
+  ;; explanation.
+  (cl-assert (not (null (car undo-list
+  (push (make-vundo-m :undo-list undo-list)
+new-mlist))
+;; Skip through the content of this modification.
+(while (car undo-list)
+  (setq undo-list (cdr undo-list))
+  (cl-incf uidx
 (append mod-list new-mlist)))
 
 (defun vundo--update-mapping (mod-list &optional hash-table n)



[elpa] externals/vundo b996e201d8 12/58: * README.txt: Add notice

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit b996e201d8adbf1b7d2a0a4914675d31e2c69a2c
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt: Add notice
---
 README.txt | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/README.txt b/README.txt
index a419b9df37..749d7f1bab 100644
--- a/README.txt
+++ b/README.txt
@@ -16,3 +16,10 @@ If you bring up the vundo buffer and make some modification 
in the
 original buffer, the tree in the vundo buffer doesn’t automatically
 update. Vundo catches up the next time you invoke any command:
 instead of performing that command, it updates the tree.
+
+Note: vundo.el requires Emacs 28.
+
+Changelog:
+
+<2021-11-26 Fri>: Variable vundo-translate-alist changed to
+vundo-glyph=alist and has different value now.



[elpa] externals/vundo 24f99e54b2 17/58: Fix face definitions

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 24f99e54b27efd61c6bba98711db3af545529d68
Author: Yuan Fu 
Commit: Yuan Fu 

Fix face definitions

* vundo.el (vundo-default, vundo-node, vundo-stem): Remove quote.
(vundo-highlight): Add bold and color.
---
 vundo.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index 05fd2cf6fe..1f1f346714 100644
--- a/vundo.el
+++ b/vundo.el
@@ -78,16 +78,20 @@
   "Visual undo tree."
   :group 'undo)
 
-(defface vundo-default '((t . (:inherit 'default)))
+(defface vundo-default '((t . (:inherit default)))
   "Default face used in vundo buffer.")
 
-(defface vundo-node '((t . (:inherit 'vundo-default)))
+(defface vundo-node '((t . (:inherit vundo-default)))
   "Face for nodes in the undo tree.")
 
-(defface vundo-stem '((t . (:inherit 'vundo-default)))
+(defface vundo-stem '((t . (:inherit vundo-default)))
   "Face for stems between nodes in the undo tree.")
 
-(defface vundo-highlight '((t . (:inherit 'vundo-node)))
+(defface vundo-highlight
+  'background light)) .
+ (:inherit vundo-node :weight bold :foreground "red"))
+(((background dark)) .
+ (:inherit vundo-node :weight bold :foreground "yellow")))
   "Face for the highlighted node in the undo tree.")
 
 (defcustom vundo-roll-back-on-quit t



[elpa] externals/vundo a66bb05062 35/58: Merge branch 'pr-evil-mode-disable'

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit a66bb05062a0f48ecea1778493a2e75cc78323ba
Merge: 1b98c3708c aefb233005
Author: Yuan Fu 
Commit: Yuan Fu 

Merge branch 'pr-evil-mode-disable'
---
 vundo.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index eec59cc3c6..c50780dc4e 100644
--- a/vundo.el
+++ b/vundo.el
@@ -542,7 +542,12 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
 truncate-lines t
 cursor-type nil)
   (jit-lock-mode -1)
-  (face-remap-add-relative 'default 'vundo-default))
+  (face-remap-add-relative 'default 'vundo-default)
+
+  ;; Disable evil-mode, as normal-mode
+  ;; key bindings override the ones set by vundo.
+  (when (boundp 'evil-emacs-state-modes)
+(push 'vundo-mode evil-emacs-state-modes)))
 
 (defvar-local vundo--prev-mod-list nil
   "Modification list generated by ‘vundo--mod-list-from’.")



[elpa] externals/vundo f8cd72b611 30/58: * test/vundo-test.el (vundo-test--skip-position-only): New test.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit f8cd72b611d33a6daa8c890ec34722b92bec2a9e
Author: Yuan Fu 
Commit: Yuan Fu 

* test/vundo-test.el (vundo-test--skip-position-only): New test.
---
 test/vundo-test.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index 9629cfd758..d45323c7e1 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -48,6 +48,12 @@
 (should (not (vundo--position-only-p (nthcdr 2 ul2
 (should (vundo--position-only-p (nthcdr 5 ul2)
 
+(ert-deftest vundo-test--skip-position-only ()
+  "Tests for skipping position-only records."
+  (let* ((ul2 '(stuff nil 9 nil 8 stuff nil 7 nil)))
+(should (equal (length (vundo--mod-list-from ul2))
+   3
+
 (defsubst vundo-test--buf-str-np ()
   "(buffer-substring-no-properties (point-min) (point-max))."
   (buffer-substring-no-properties



[elpa] externals/vundo 81d126cfab 22/58: Fix vundo-stem-root and vundo-stem-end

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 81d126cfabb2dd91bd779015d41d7ad0ac60aa84
Author: Yuan Fu 
Commit: Yuan Fu 

Fix vundo-stem-root and vundo-stem-end

* vundo.el (vundo-stem-root): Don’t proceed if there is no parent.
(vundo-stem-end): Don’t proceed if there is no child.
---
 vundo.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index 7a9d96b8f1..11df966f5e 100644
--- a/vundo.el
+++ b/vundo.el
@@ -900,8 +900,10 @@ If ARG < 0, move forward."
   "Move to the beginning of the current stem."
   (interactive)
   (vundo--check-for-command
-   (let* ((this (vundo--current-node vundo--prev-mod-list))
-  (next (vundo-m-parent this)))
+   (when-let* ((this (vundo--current-node vundo--prev-mod-list))
+   (next (vundo-m-parent this)))
+ ;; If NEXT is nil, ie, this node doesn’t have a parent, do
+ ;; nothing.
  (vundo--move-to-node
   this next vundo--orig-buffer vundo--prev-mod-list)
  (setq this next
@@ -919,8 +921,10 @@ If ARG < 0, move forward."
   "Move to the end of the current stem."
   (interactive)
   (vundo--check-for-command
-   (let* ((this (vundo--current-node vundo--prev-mod-list))
-  (next (car (vundo-m-children this
+   (when-let* ((this (vundo--current-node vundo--prev-mod-list))
+   (next (car (vundo-m-children this
+ ;; If NEXT is nil, ie, this node doesn’t have a child, do
+ ;; nothing.
  (vundo--move-to-node
   this next vundo--orig-buffer vundo--prev-mod-list)
  (setq this next



[elpa] externals/vundo 67e797bc14 21/58: * README.txt (Changelog): Record vundo--mode and vundo-compact-display.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 67e797bc14bbee8f0fb9f612e0095dec70ce543c
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt (Changelog): Record vundo--mode and vundo-compact-display.
---
 README.txt | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/README.txt b/README.txt
index 0cf6bd322d..a073b74f27 100644
--- a/README.txt
+++ b/README.txt
@@ -46,6 +46,9 @@ to use that font:
 
 Changelog:
 
+<2022-03-29 Tue> vundo--mode and vundo--mode-map are now vundo-mode
+and vundo-mode-map. A new custom option vundo-compact-display is added.
+
 <2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
 differently now, it now draws
 
@@ -55,4 +58,4 @@ differently now, it now draws
 `--o+--o
 
 <2021-11-26 Fri>: Variable vundo-translate-alist changed to
-vundo-glyph=alist and has different value now.
+vundo-glyph-alist and has different value now.



[elpa] externals/vundo 429e3a2397 23/58: Format fix

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 429e3a2397bb26ebb46c3ef3dbe5d61a6a414293
Author: Yuan Fu 
Commit: Yuan Fu 

Format fix

* README.txt (Faces):
* vundo.el (vundo-compact-display):
(vundo--build-tree):
---
 README.txt | 3 ++-
 vundo.el   | 7 +++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.txt b/README.txt
index a073b74f27..29e0695fb6 100644
--- a/README.txt
+++ b/README.txt
@@ -26,7 +26,8 @@ Faces:
 - vundo-stem
 - vundo-highlight
 
-If you want to use prettier Unicode characters to draw the tree, like this:
+If you want to use prettier Unicode characters to draw the tree like
+this:
 
 ○──○──○
 │  └──●
diff --git a/vundo.el b/vundo.el
index 11df966f5e..872c4ac34e 100644
--- a/vundo.el
+++ b/vundo.el
@@ -132,8 +132,7 @@ Basically we display
 ○─○─○  instead of  ○──○──○
 │ └─●  │  └──●
 ├─○├──○
-└─○└──○
-"
+└─○└──○"
   :type 'boolean)
 
 (defcustom vundo-glyph-alist vundo-ascii-symbols
@@ -341,8 +340,8 @@ If FROM non-nil, build from FORM-th modification in 
MOD-LIST."
;; We sort in reverse order, i.e., later mod
;; comes first. Later in `vundo--build-tree' we
;; draw the tree depth-first.
-   (vundo--sort-mod (cons mod children) 'reverse))
- 
+   (vundo--sort-mod (cons mod children)
+'reverse))
 
 ;;; Draw tree
 



[elpa] externals/vundo e136164f77 07/58: * vundo.el (vundo-next): move till end when asked to move too far

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit e136164f779e9a91ef722778acc704048ba0809a
Author: Gábor Braun 
Commit: Yuan Fu 

* vundo.el (vundo-next): move till end when asked to move too far
---
 vundo.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index 99685bf9eb..a01fbc4ba2 100644
--- a/vundo.el
+++ b/vundo.el
@@ -805,11 +805,12 @@ If ARG < 0, move forward."
  (when parent
(let* ((siblings (vundo-m-children parent))
   (idx (seq-position siblings source))
-  (new-idx (+ idx arg))
-  ;; TODO: Move as far as possible instead of not
-  ;; moving when ARG is too large.
+  ;; If ARG is larger than the number of siblings,
+  ;; move as far as possible (to the end).
+  (new-idx (max 0 (min (+ idx arg)
+   (1- (length siblings)
   (dest (nth new-idx siblings)))
- (when (and dest (not (eq source dest)))
+ (when (not (eq source dest))
(vundo--move-to-node
 source dest vundo--orig-buffer vundo--prev-mod-list)
(vundo--refresh-buffer



[elpa] externals/vundo 0dc3ac6d42 43/58: * vundo.el (vundo--replace-at-col): Remove unused function.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 0dc3ac6d425ee8fd4dc5530ae1ee74ca6ab3621f
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--replace-at-col): Remove unused function.
---
 vundo.el | 17 -
 1 file changed, 17 deletions(-)

diff --git a/vundo.el b/vundo.el
index 2389ce1de2..66afec7e05 100644
--- a/vundo.el
+++ b/vundo.el
@@ -389,23 +389,6 @@ If FROM non-nil, build from FORM-th modification in 
MOD-LIST."
 
 ;;; Draw tree
 
-(defun vundo--replace-at-col (from to col &optional until)
-  "Replace FROM at COL with TO in each line of current buffer.
-If a line is not COL columns long, skip that line."
-  (save-excursion
-(let ((run t))
-  (goto-char (point-min))
-  (while run
-(move-to-column col)
-(if (and (eq (current-column) col)
- (looking-at (regexp-quote from)))
-(replace-match to))
-;; If ‘forward-line’ returns 0, we haven’t hit the end of
-;; buffer.
-(setq run (and (eq (forward-line) 0)
-   (not (eq (point) (point-max)))
-   (< (point) (or until (point-max)
-
 (defun vundo--put-node-at-point (node)
   "Store the corresponding NODE as text property at point."
   (put-text-property (1- (point)) (point)



[elpa] externals/vundo 1da75782e0 13/58: Remove inhibit-modification-hooks

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 1da75782e06a2febdd81c698d9ea15597e6102ba
Author: Yuan Fu 
Commit: Yuan Fu 

Remove inhibit-modification-hooks

* vundo.el (vundo-quit, vundo-confirm, vundo--move-to-node): Remove.
---
 vundo.el | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/vundo.el b/vundo.el
index df72ed8dbc..acd56deedc 100644
--- a/vundo.el
+++ b/vundo.el
@@ -658,16 +658,14 @@ Roll back changes if `vundo-roll-back-on-quit' is 
non-nil."
   vundo--roll-back-to-this
   vundo--orig-buffer vundo--prev-mod-list))
(with-current-buffer vundo--orig-buffer
- (setq-local inhibit-modification-hooks nil
- buffer-read-only nil))
+ (setq-local buffer-read-only nil))
(kill-buffer-and-window)))
 
 (defun vundo-confirm ()
   "Confirm change and close vundo window."
   (interactive)
   (with-current-buffer vundo--orig-buffer
-(setq-local inhibit-modification-hooks nil
-buffer-read-only nil))
+(setq-local buffer-read-only nil))
   (kill-buffer-and-window))
 
 ;;; Traverse undo tree
@@ -748,8 +746,7 @@ after calling this function."
 undo-list-at-source undo-list-at-dest))
  trimmed)
 (with-current-buffer orig-buffer
-  (setq-local inhibit-modification-hooks t
-  buffer-read-only t)
+  (setq-local buffer-read-only t)
   ;; 2. Undo. This will undo modifications in PLANNED-UNDO and
   ;; add new entries to ‘buffer-undo-list’.
   (let ((undo-in-progress t))



[elpa] externals/vundo 00e5c4e73c 54/58: * vundo.el (vundo-mode): Avoid duplicates in evil-emacs-state-modes.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 00e5c4e73ce7ee29ab5bc183e8da3a1d350e8958
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo-mode): Avoid duplicates in evil-emacs-state-modes.
---
 vundo.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 2f778ad768..9bb62d5527 100644
--- a/vundo.el
+++ b/vundo.el
@@ -597,7 +597,8 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
 
   ;; Disable evil-mode, as normal-mode
   ;; key bindings override the ones set by vundo.
-  (when (boundp 'evil-emacs-state-modes)
+  (when (and (boundp 'evil-emacs-state-modes)
+ (not (memq 'vundo-mode evil-emacs-state-modes)))
 (push 'vundo-mode evil-emacs-state-modes)))
 
 (defvar-local vundo--prev-mod-list nil



[elpa] externals/vundo 8a2f09ae42 29/58: Merge branch 'pr-avoid-list-nth'

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 8a2f09ae426b640a412337c0259a615ec32e153b
Merge: b7e2119191 42c8e4adc1
Author: Yuan Fu 
Commit: Yuan Fu 

Merge branch 'pr-avoid-list-nth'
---
 test/vundo-test.el | 13 
 vundo.el   | 58 --
 2 files changed, 43 insertions(+), 28 deletions(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index f2e7c13667..9629cfd758 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -35,6 +35,19 @@
   (should (equal (mapcar #'vundo-m-idx ml9)
  '(0 1 2 3))
 
+(ert-deftest vundo-test--position-only-p ()
+  "Tests for ‘vundo--position-only-p’."
+  (let* ((ul1 '(9 nil 8 nil 7 nil))
+ (ul2 '(9 nil 8 stuff nil 7 nil)))
+(should (vundo--position-only-p ul1))
+(should (vundo--position-only-p (nthcdr 2 ul1)))
+(should (vundo--position-only-p (nthcdr 4 ul1)))
+(should (vundo--position-only-p (last ul1)))
+
+(should (vundo--position-only-p ul2))
+(should (not (vundo--position-only-p (nthcdr 2 ul2
+(should (vundo--position-only-p (nthcdr 5 ul2)
+
 (defsubst vundo-test--buf-str-np ()
   "(buffer-substring-no-properties (point-min) (point-max))."
   (buffer-substring-no-properties
diff --git a/vundo.el b/vundo.el
index 99a267e101..94b7d03375 100644
--- a/vundo.el
+++ b/vundo.el
@@ -223,44 +223,46 @@ modification."
:type integer
:documentation "Marks the text node in the vundo buffer if drawn."))
 
-(defsubst vundo--position-only-p (idx undo-list)
-  "Check if the records at IDX in UNDO-LIST is position-only.
-Position-only means all records from IDX to the next undo
+(defun vundo--position-only-p (undo-list)
+  "Check if the records at the start of UNDO-LIST are position-only.
+Position-only means all records until to the next undo
 boundary are position records. Position record is just an
-integer (see ‘buffer-undo-list’). Assumes the beginning of the
-UNDO-LIST is not nil."
-  (catch 'ret
-(while (nth idx undo-list)
-  (when (not (integerp (nth idx undo-list)))
-(throw 'ret nil))
-  (cl-incf idx))
-t))
+integer (see ‘buffer-undo-list’). Assumes the first element
+of UNDO-LIST is not nil."
+  (let ((pos-only t))
+(while (car undo-list)
+  (when (not (integerp (pop undo-list)))
+(setq pos-only nil)
+(setq undo-list nil)))
+pos-only))
 
 (defun vundo--mod-list-from (undo-list &optional n mod-list)
   "Generate and return a modification list from UNDO-LIST.
 If N non-nil, only look at the first N entries in UNDO-LIST.
 If MOD-LIST non-nil, extend on MOD-LIST."
-  (let ((bound (or n (length undo-list)))
-(uidx 0)
+  (let ((uidx 0)
 (mod-list (or mod-list (list (make-vundo-m
 new-mlist)
-(while (and (consp undo-list) (< uidx bound))
+(while (and undo-list (or (null n) (< uidx n)))
   ;; Skip leading nils.
-  (while (and (< uidx bound) (null (nth uidx undo-list)))
+  (while (and undo-list (null (car undo-list)))
+(setq undo-list (cdr undo-list))
 (cl-incf uidx))
-  ;; Add modification.
-  (unless (vundo--position-only-p uidx undo-list)
-;; If this record is position-only, we skip it and don’t add a
-;; mod for it. Effectively taking it out of the undo tree.
-;; Read ‘Position-only records’ section in Commentary for more
-;; explanation.
-(when (< uidx bound)
-  (cl-assert (not (null (nth uidx undo-list
-  (push (make-vundo-m :undo-list (nthcdr uidx undo-list))
-new-mlist)))
-  ;; Skip through the content of this modification.
-  (while (nth uidx undo-list)
-(cl-incf uidx)))
+  ;; It's possible the index was exceeded stepping over nil.
+  (when (or (null n) (< uidx n))
+;; Add modification.
+(unless (vundo--position-only-p undo-list)
+  ;; If this record is position-only, we skip it and don’t add a
+  ;; mod for it. Effectively taking it out of the undo tree.
+  ;; Read ‘Position-only records’ section in Commentary for more
+  ;; explanation.
+  (cl-assert (not (null (car undo-list
+  (push (make-vundo-m :undo-list undo-list)
+new-mlist))
+;; Skip through the content of this modification.
+(while (car undo-list)
+  (setq undo-list (cdr undo-list))
+  (cl-incf uidx
 (append mod-list new-mlist)))
 
 (defun vundo--update-mapping (mod-list &optional hash-table n)



[elpa] externals/vundo ed0d7d42d8 38/58: Replace lists with vectors for the main vundo-m lists

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit ed0d7d42d8e620d4439932defe2295a6dca9b19a
Author: Campbell Barton 
Commit: Yuan Fu 

Replace lists with vectors for the main vundo-m lists

Prefer vectors as they can perform direct lookups without having to
iterate over all items.

* test/vundo-test.el (vundo-test--mod-list, vundo-test--last-idx,
vundo-test--2): Replace nth/car with aref.
* vundo.el (vundo--mod-list-from): Replace list with vector.
(vundo--update-mapping, vundo--build-tree, vundo--draw-tree,
vundo--mod-list-trim, vundo--current-node, vundo--latest-buffer-state,
vundo--move-to-node): Replace nth/car with aref.
---
 test/vundo-test.el | 14 +++---
 vundo.el   | 53 -
 2 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index d45323c7e1..ef97ebc9fe 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -26,11 +26,11 @@
(list nil ul3 ul6 ul9)))
 
 (let ((ht6 (vundo--update-mapping ml6 nil 0)))
-  (should (eq (gethash ul3 ht6) (nth 1 ml6)))
-  (should (eq (gethash ul6 ht6) (nth 2 ml6)))
+  (should (eq (gethash ul3 ht6) (aref ml6 1)))
+  (should (eq (gethash ul6 ht6) (aref ml6 2)))
 
   (let ((ht9 (vundo--update-mapping ml9 ht6 3)))
-(should (eq (gethash ul9 ht9) (nth 3 ml9
+(should (eq (gethash ul9 ht9) (aref ml9 3
 
   (should (equal (mapcar #'vundo-m-idx ml9)
  '(0 1 2 3))
@@ -65,7 +65,7 @@
 
 (defsubst vundo-test--last-idx ()
   "(vundo-m-idx (car (last vundo--prev-mod-list)))."
-  (vundo-m-idx (car (last vundo--prev-mod-list
+  (vundo-m-idx (aref vundo--prev-mod-list (1- (length vundo--prev-mod-list)
 
 (defmacro vundo-test--setup (&rest body)
   "Setup and evaluate BODY."
@@ -166,19 +166,19 @@ Sans ending newline."
  (vundo-forward 1)
  (vundo-next 1)
  (should (eq (vundo--get-node-at-point)
- (nth 51 vundo--prev-mod-list)))
+ (aref vundo--prev-mod-list 51)))
 
  (dotimes (_ 20)
(vundo-previous 1)
(vundo-next 1))
  (should (eq (vundo--get-node-at-point)
- (nth 51 vundo--prev-mod-list)))
+ (aref vundo--prev-mod-list 51)))
 
  (dotimes (_ 20)
(vundo-forward 49)
(vundo-backward 49))
  (should (eq (vundo--get-node-at-point)
- (nth 51 vundo--prev-mod-list))
+ (aref vundo--prev-mod-list 51))
 
 (ert-deftest vundo-test--3 ()
   "This tests regional undos."
diff --git a/vundo.el b/vundo.el
index c50780dc4e..27c63dbe0f 100644
--- a/vundo.el
+++ b/vundo.el
@@ -39,7 +39,7 @@
 ;;
 ;; `vundo' calls `vundo--refresh-buffer' to setup the tree structure
 ;; and draw it in the buffer. We have two data structures:
-;; `vundo--prev-mod-list' which stores a list of `vundo-m'. This list
+;; `vundo--prev-mod-list' which stores a vector of `vundo-m'. This vector
 ;; is generated from `buffer-undo-list' by `vundo--mod-list-from'. We
 ;; also have a hash table `vundo--prev-mod-hash' generated by
 ;; `vundo--update-mapping', which maps undo-lists back to the
@@ -241,7 +241,7 @@ of UNDO-LIST is not nil."
 If N non-nil, only look at the first N entries in UNDO-LIST.
 If MOD-LIST non-nil, extend on MOD-LIST."
   (let ((uidx 0)
-(mod-list (or mod-list (list (make-vundo-m
+(mod-list (or mod-list (vector (make-vundo-m
 new-mlist)
 (while (and undo-list (or (null n) (< uidx n)))
   ;; Skip leading nils.
@@ -263,7 +263,8 @@ If MOD-LIST non-nil, extend on MOD-LIST."
 (while (car undo-list)
   (setq undo-list (cdr undo-list))
   (cl-incf uidx
-(append mod-list new-mlist)))
+;; Convert to vector.
+(vconcat mod-list new-mlist)))
 
 (defun vundo--update-mapping (mod-list &optional hash-table n)
   "Update each modification in MOD-LIST.
@@ -272,8 +273,8 @@ modification in HASH-TABLE. If N non-nil, start from the Nth
 modification in MOD-LIST. Return HASH-TABLE."
   (let ((hash-table (or hash-table
 (make-hash-table :test #'eq :weakness t
-(cl-loop for mod in (nthcdr (or n 0) mod-list)
- for midx = (or n 0) then (1+ midx)
+(cl-loop for midx from (or n 0) to (1- (length mod-list))
+ for mod = (aref mod-list midx)
  do (cl-assert (null (vundo-m-idx mod)))
  do (cl-assert (null (gethash (vundo-m-undo-list mod)
   hash-table)))
@@ -346,7 +347,7 @@ MOD-HASH maps undo-lists to modifications.
 If FROM non-nil, build from FORM-th modification in MOD-LIST."
   (cl-loop
for m from (or from 0) to (1- (length mod-list))
-   for mod = (nth m mod-list)
+   for mod = (aref mod-list m)
;; If MOD is an undo, the buffer state it represents is equivalent
;; to a previous one.
do (let ((prev-undo (undo--last-change-was-undo-p

[elpa] externals/vundo acdc70671a 48/58: Improve README for publishing

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit acdc70671aa937c0bbd6c17a4871d165b92bd260
Author: Yuan Fu 
Commit: Yuan Fu 

Improve README for publishing

* NEWS.txt: New file.
* README.txt: Improve documentation.
* vundo.el: Improve Commentary section (which copies README). Fix
typoes in Developer section.
---
 NEWS.txt   | 15 +
 README.txt | 37 +++
 vundo.el   | 75 +++---
 3 files changed, 100 insertions(+), 27 deletions(-)

diff --git a/NEWS.txt b/NEWS.txt
new file mode 100644
index 00..976af819ba
--- /dev/null
+++ b/NEWS.txt
@@ -0,0 +1,15 @@
+<2022-04-04 Mon>: Version 1.0.0
+
+<2022-03-29 Tue>: vundo--mode and vundo--mode-map are now vundo-mode
+and vundo-mode-map. A new custom option vundo-compact-display is added.
+
+<2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
+differently now, it now draws
+
+o--o--o instead of  o--o--o
+|  `--x |  +--*
+|--o|--o
+`--o+--o
+
+<2021-11-26 Fri>: Variable vundo-translate-alist changed to
+vundo-glyph-alist and has different value now.
diff --git a/README.txt b/README.txt
index 5fdc205a5e..b9070356de 100644
--- a/README.txt
+++ b/README.txt
@@ -1,25 +1,34 @@
-To use vundo, type M-x vundo RET in the buffer you want to undo.
-A undo tree buffer should pop up. To move around, type:
+To use vundo, type M-x vundo RET in the buffer you want to undo. An
+undo tree buffer should pop up. To move around, type:
 
   f   to go forward
   b   to go backward
+
   n   to go to the node below when you at a branching point
   p   to go to the node above
+
+  a   to go back to the last branching point
+  e   to go forward to the end/tip of the branch
+
   q   to quit, you can also type C-g
 
-By default, you need to press RET to “commit” your change and if
-you quit with q or C-g, the change made by vundo are rolled back.
-You can set ‘vundo-roll-back-on-quit’ to nil to disable rolling
-back.
+n/p may need some more explanation. In the following tree, n/p can
+move between A and B because they share a parent (thus at a branching
+point), but not C and D.
+
+ A  C
+──○──○──○──○──○
+  │  ↕
+  └──○──○──○
+ B  D
 
-If you bring up the vundo buffer and make some modification in the
-original buffer, the tree in the vundo buffer doesn’t automatically
-update. Vundo catches up the next time you invoke any command:
-instead of performing that command, it updates the tree.
+By default, you need to press RET to “commit” your change and if you
+quit with q or C-g, the changes made by vundo are rolled back. You can
+set ‘vundo-roll-back-on-quit’ to nil to disable rolling back.
 
 Note: vundo.el requires Emacs 28.
 
-Faces:
+Customizable faces:
 
 - vundo-default
 - vundo-node
@@ -65,11 +74,11 @@ probably will not add those features in the future.
 
 
 
-Changelog:
+Changelog (full changelog in NEWS.txt):
 
-<2022-04-04 Mon> Version 1.0.0
+<2022-04-04 Mon>: Version 1.0.0
 
-<2022-03-29 Tue> vundo--mode and vundo--mode-map are now vundo-mode
+<2022-03-29 Tue>: vundo--mode and vundo--mode-map are now vundo-mode
 and vundo-mode-map. A new custom option vundo-compact-display is added.
 
 <2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
diff --git a/vundo.el b/vundo.el
index 27a6368811..52720e311b 100644
--- a/vundo.el
+++ b/vundo.el
@@ -26,26 +26,37 @@
 
 ;;; Commentary:
 ;;
-;; To use vundo, type M-x vundo RET in the buffer you want to undo.
-;; A undo tree buffer should pop up. To move around, type:
+;; To use vundo, type M-x vundo RET in the buffer you want to undo. An
+;; undo tree buffer should pop up. To move around, type:
 ;;
 ;;   f   to go forward
 ;;   b   to go backward
+;;
 ;;   n   to go to the node below when you at a branching point
 ;;   p   to go to the node above
+;;
+;;   a   to go back to the last branching point
+;;   e   to go forward to the end/tip of the branch
+;;
 ;;   q   to quit, you can also type C-g
 ;;
-;; By default, you need to press RET to “commit” your change and if
-;; you quit with q or C-g, the change made by vundo are rolled back.
-;; You can set ‘vundo-roll-back-on-quit’ to nil to disable rolling
-;; back.
+;; n/p may need some more explanation. In the following tree, n/p can
+;; move between A and B because they share a parent (thus at a branching
+;; point), but not C and D.
+;;
+;;  A  C
+;; ──○──○──○──○──○
+;;   │  ↕
+;;   └──○──○──○
+;;  B  D
+;;
+;; By default, you need to press RET to “commit” your change and if you
+;; quit with q or C-g, the changes made by vundo are rolled back. You can
+;; set ‘vundo-roll-back-on-quit’ to nil to disable rolling back.
 ;;
-;; If you bring up the vundo buffer and make some modification in the
-;; original buffer, the tree in the vundo buffer doesn’t automatically
-;; update. Vundo catches up the next time you invoke any 

[elpa] externals/vundo b93e15e0c2 50/58: * vundo.el: Sync from README.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit b93e15e0c2b95a2b0007c3b5cef2c170e734c4da
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el: Sync from README.
---
 vundo.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/vundo.el b/vundo.el
index 0b6cf2ef0d..7fb60f70ae 100644
--- a/vundo.el
+++ b/vundo.el
@@ -26,8 +26,10 @@
 
 ;;; Commentary:
 ;;
-;; To use vundo, type M-x vundo RET in the buffer you want to undo. An
-;; undo tree buffer should pop up. To move around, type:
+;; Vundo (visual undo) displays the undo history as a tree and lets you
+;; move in the tree to go back to previous buffer states. To use vundo,
+;; type M-x vundo RET in the buffer you want to undo. An undo tree buffer
+;; should pop up. To move around, type:
 ;;
 ;;   f   to go forward
 ;;   b   to go backward



[elpa] externals/vundo 39d80d2093 16/58: * README.txt: Add detail and tips.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 39d80d2093f0853dcfe3d06aae2cb54f55d7ef13
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt: Add detail and tips.
---
 README.txt | 25 +
 1 file changed, 25 insertions(+)

diff --git a/README.txt b/README.txt
index 95b856db9b..0cf6bd322d 100644
--- a/README.txt
+++ b/README.txt
@@ -19,6 +19,31 @@ instead of performing that command, it updates the tree.
 
 Note: vundo.el requires Emacs 28.
 
+Faces:
+
+- vundo-default
+- vundo-node
+- vundo-stem
+- vundo-highlight
+
+If you want to use prettier Unicode characters to draw the tree, like this:
+
+○──○──○
+│  └──●
+├──○
+└──○
+
+set vundo-glyph-alist by
+
+(setq vundo-glyph-alist vundo-unicode-symbols)
+
+Your default font needs to contain these Unicode characters, otherwise
+they look terrible and don’t align. You can find a font that covers
+these characters (eg, Symbola, Unifont), and set ‘vundo-default’ face
+to use that font:
+
+(set-face-attribute 'vundo-default nil :family "Symbola")
+
 Changelog:
 
 <2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws



[elpa] externals/vundo 6c15a96fb6 57/58: * test/vundo-test.el (vundo-test--3): Skip this test in batch mode.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 6c15a96fb68ec0b533986f97b2bf0282c647ea3b
Author: Yuan Fu 
Commit: Yuan Fu 

* test/vundo-test.el (vundo-test--3): Skip this test in batch mode.
---
 test/vundo-test.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/test/vundo-test.el b/test/vundo-test.el
index ef97ebc9fe..afad1cb9c1 100644
--- a/test/vundo-test.el
+++ b/test/vundo-test.el
@@ -182,6 +182,10 @@ Sans ending newline."
 
 (ert-deftest vundo-test--3 ()
   "This tests regional undos."
+  ;; Emacs do weird things with region and mark in batch mode. Not
+  ;; sure the reason, but in batch mode the first undo we perform is
+  ;; not regional, and the test will fail.
+  (ert--skip-unless (not noninteractive))
   (vundo-test--setup
(vundo-test--insert "a" "b" "c" "d" "e")
;; Undo in region that covers "ab".



[elpa] externals/vundo 8067005e53 56/58: Merge branch 'pr-remove-redundant-eqv-list-of'

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 8067005e5333129ccedbb6da04a5fb7e40f14106
Merge: 00e5c4e73c c44a2787ea
Author: Yuan Fu 
Commit: Yuan Fu 

Merge branch 'pr-remove-redundant-eqv-list-of'
---
 vundo.el | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/vundo.el b/vundo.el
index 9bb62d5527..6b92965392 100644
--- a/vundo.el
+++ b/vundo.el
@@ -363,6 +363,15 @@ modification in MOD-LIST. Return HASH-TABLE."
 ;; We know 3 and 5 are in the same equivalent list because 5 maps to 3
 ;; in `undo-equiv-table' (basically).
 
+(defun vundo--master-eqv-mod-of (mod)
+  "Return the master mod in the eqv-list of MOD.
+Master mod is the mod with the smallest index in the eqv-list.
+This function is equivalent to (car (vundo--eqv-list-of mod))."
+  (while (vundo-m-prev-eqv mod)
+(cl-assert (not (eq mod (vundo-m-prev-eqv mod
+(setq mod (vundo-m-prev-eqv mod)))
+  mod)
+
 (defun vundo--eqv-list-of (mod)
   "Return all the modifications equivalent to MOD."
   (while (vundo-m-next-eqv mod)
@@ -439,8 +448,7 @@ If FROM non-nil, build from FORM-th modification in 
MOD-LIST."
;; the child.
(unless (eq m 0)
  (let* ((m-1 (aref mod-list (1- m)))
-;; TODO: may need to optimize.
-(min-eqv-mod (car (vundo--eqv-list-of m-1
+(min-eqv-mod (vundo--master-eqv-mod-of m-1)))
(setf (vundo-m-parent mod) min-eqv-mod)
(let ((children (vundo-m-children min-eqv-mod)))
  ;; If everything goes right, we should never encounter
@@ -703,7 +711,7 @@ This function modifies ‘vundo--prev-mod-list’,
 
 (defun vundo--current-node (mod-list)
   "Return the currently highlighted node in MOD-LIST."
-  (car (vundo--eqv-list-of (aref mod-list (1- (length mod-list))
+  (vundo--master-eqv-mod-of (aref mod-list (1- (length mod-list)
 
 (defun vundo--highlight-node (node)
   "Highlight NODE as current node."



[elpa] externals/vundo 9edd0ca36b 46/58: * vundo.el (vundo--eqv-list-of): Replace reverse with nreverse.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 9edd0ca36b5d7b14006b87b5efd972691b814c16
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--eqv-list-of): Replace reverse with nreverse.
---
 vundo.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 628344f719..d87f475e9d 100644
--- a/vundo.el
+++ b/vundo.el
@@ -308,7 +308,7 @@ modification in MOD-LIST. Return HASH-TABLE."
   (cl-assert (not (eq mod (vundo-m-next-eqv mod
   (setq mod (vundo-m-next-eqv mod))
   (push mod eqv-list))
-(reverse eqv-list)))
+(nreverse eqv-list)))
 
 (defun vundo--eqv-merge (mlist)
   "Connect modifications in MLIST to be in the same equivalence list.



[elpa] externals/vundo e89a292c15 19/58: Rename vundo--mode to vundo-mode

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit e89a292c150c50e3a4768736601b63e6e0dfabab
Author: Yuan Fu 
Commit: Yuan Fu 

Rename vundo--mode to vundo-mode

* vundo.el (vundo--mode-map, vundo--mode): Rename to vundo-mode.
(vundo-1, vundo--check-for-command): Use new functions.
---
 vundo.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/vundo.el b/vundo.el
index 5ba9ad4180..7a9d96b8f1 100644
--- a/vundo.el
+++ b/vundo.el
@@ -474,7 +474,7 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
   (with-selected-window window
 (kill-buffer-and-window
 
-(defvar vundo--mode-map
+(defvar vundo-mode-map
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "f") #'vundo-forward)
 (define-key map (kbd "") #'vundo-forward)
@@ -492,9 +492,9 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
 (define-key map (kbd "i") #'vundo--inspect)
 (define-key map (kbd "d") #'vundo--debug)
 map)
-  "Keymap for ‘vundo--mode’.")
+  "Keymap for ‘vundo-mode’.")
 
-(define-derived-mode vundo--mode special-mode
+(define-derived-mode vundo-mode special-mode
   "Vundo" "Mode for displaying the undo tree."
   (setq mode-line-format nil
 truncate-lines t
@@ -641,8 +641,8 @@ BUFFER must have a valid `buffer-undo-list'."
   (with-current-buffer vundo-buf
 ;; Enable major mode before refreshing the buffer.
 ;; Because major modes kill local variables.
-(unless (derived-mode-p 'vundo--mode)
-  (vundo--mode))
+(unless (derived-mode-p 'vundo-mode)
+  (vundo-mode))
 (vundo--refresh-buffer orig-buf vundo-buf)
 vundo-buf
 
@@ -650,7 +650,7 @@ BUFFER must have a valid `buffer-undo-list'."
   "Sanity check before running interactive commands.
 Do sanity check, then evaluate BODY."
   `(progn
- (when (not (derived-mode-p 'vundo--mode))
+ (when (not (derived-mode-p 'vundo-mode))
(user-error "Not in vundo buffer"))
  (when (not (buffer-live-p vundo--orig-buffer))
(when (y-or-n-p "Original buffer is gone, kill vundo buffer? ")



[elpa] externals/vundo 8c0ff18e7f 32/58: * README.txt: Reword comparison.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 8c0ff18e7f9682780ae7a0b870e3e4c38738a806
Author: Yuan Fu 
Commit: Yuan Fu 

* README.txt: Reword comparison.
---
 README.txt | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/README.txt b/README.txt
index 13f482299f..8e44c0fbeb 100644
--- a/README.txt
+++ b/README.txt
@@ -64,9 +64,8 @@ vundo-glyph-alist and has different value now.
 
 Comparing to undo-tree:
 
-I don’t think vundo has any real advantage over undo-tree. On the
-contrary, undo-tree has much more features like diff, etc. (And vundo
-most probably will not add these features.) Vundo is really just a
-code challenge (can we construct an undo tree from linear history)
-came true. One thing I like about vundo is that it lays out the undo
-tree horizontally instead of horizontally.
+Vundo doesn’t need to be turned on all the time nor replace the undo
+commands like undo-tree does. Vundo displays the tree horizontally,
+whereas undo-tree displays a tree vertically. Vundo doesn’t have many
+advanced features that undo-tree does (like showing diff), and most
+probably will not add those features in the future.



[elpa] externals/vundo 06de574d4f 24/58: Ignore position-only records when generating mod-list

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 06de574d4f9228c819e5444e5da84695941e9953
Author: Yuan Fu 
Commit: Yuan Fu 

Ignore position-only records when generating mod-list

* vundo.el (vundo--position-only-p): New function.
(vundo--mod-list-from): Add a check before adding a new vundo-m.
---
 vundo.el | 45 +
 1 file changed, 41 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index 872c4ac34e..bed630736c 100644
--- a/vundo.el
+++ b/vundo.el
@@ -65,6 +65,25 @@
 ;;
 ;; For a high-level explanation of how this package works, see
 ;; https://archive.casouri.cat/note/2021/visual-undo-tree.
+;;
+;; Position-only records
+;;
+;; We know how undo works: when undoing, ‘primitive-undo’ looks at
+;; each record in ‘pending-undo-list’ and modify the buffer
+;; accordingly, and that modification itself pushes new undo records
+;; into ‘buffer-undo-list’. However, not all undo records introduce
+;; modification, if the record is an integer, ‘primitive-undo’ simply
+;; ‘goto’ that position, which introduces no modification to the
+;; buffer and pushes no undo record to ‘buffer-undo-list’. Normally
+;; position records accompany other buffer-modifying records, but if a
+;; particular record consist of only position records, we have
+;; trouble: after an undo step, ‘buffer-undo-list’ didn’t grow, as far
+;; as vundo tree-folding algorithm is concerned, we didn’t move.
+;; Assertions expecting to see new undo records in ‘buffer-undo-list’
+;; are also violated. To avoid all these complications, we ignore
+;; position-only records when generating mod-list in
+;; ‘vundo--mod-list-from’. These records are not removed, but they
+;; can’t harm us now.
 
 ;;; Code:
 
@@ -204,6 +223,19 @@ modification."
:type integer
:documentation "Marks the text node in the vundo buffer if drawn."))
 
+(defsubst vundo--position-only-p (idx undo-list)
+  "Check if the records at IDX in UNDO-LIST is position-only.
+Position-only means all records from IDX to the next undo
+boundary are position records. Position record is just an
+integer (see ‘buffer-undo-list’). Assumes the beginning of the
+UNDO-LIST is not nil."
+  (catch 'ret
+(while (nth idx undo-list)
+  (when (not (integerp (nth idx undo-list)))
+(throw 'ret nil))
+  (cl-incf idx))
+t))
+
 (defun vundo--mod-list-from (undo-list &optional n mod-list)
   "Generate and return a modification list from UNDO-LIST.
 If N non-nil, only look at the first N entries in UNDO-LIST.
@@ -217,10 +249,15 @@ If MOD-LIST non-nil, extend on MOD-LIST."
   (while (and (< uidx bound) (null (nth uidx undo-list)))
 (cl-incf uidx))
   ;; Add modification.
-  (when (< uidx bound)
-(cl-assert (not (null (nth uidx undo-list
-(push (make-vundo-m :undo-list (nthcdr uidx undo-list))
-  new-mlist))
+  (unless (vundo--position-only-p uidx undo-list)
+;; If this record is position-only, we skip it and don’t add a
+;; mod for it. Effectively taking it out of the undo tree.
+;; Read ‘Position-only records’ section in Commentary for more
+;; explanation.
+(when (< uidx bound)
+  (cl-assert (not (null (nth uidx undo-list
+  (push (make-vundo-m :undo-list (nthcdr uidx undo-list))
+new-mlist)))
   ;; Skip through the content of this modification.
   (while (nth uidx undo-list)
 (cl-incf uidx)))



[elpa] externals/vundo b40f5fcd52 09/58: Fix: closing vundo with RET makes the buffer read-only

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit b40f5fcd52e901e659d06160d1c8da62f0b93f34
Author: Yuan Fu 
Commit: Yuan Fu 

Fix: closing vundo with RET makes the buffer read-only

* vundo.el (vundo--mode-map): Replace with new command.
(vundo-confirm): New command.
---
 vundo.el | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index e87b93f0b9..9a7b78ce04 100644
--- a/vundo.el
+++ b/vundo.el
@@ -435,7 +435,7 @@ WINDOW is the window that was/is displaying the vundo 
buffer."
 (define-key map (kbd "e") #'vundo-stem-end)
 (define-key map (kbd "q") #'vundo-quit)
 (define-key map (kbd "C-g") #'vundo-quit)
-(define-key map (kbd "RET") #'kill-buffer-and-window)
+(define-key map (kbd "RET") #'vundo-confirm)
 (define-key map (kbd "i") #'vundo--inspect)
 (define-key map (kbd "d") #'vundo--debug)
 map)
@@ -639,6 +639,14 @@ Roll back changes if `vundo-roll-back-on-quit' is non-nil."
  buffer-read-only nil))
(kill-buffer-and-window)))
 
+(defun vundo-confirm ()
+  "Confirm change and close vundo window."
+  (interactive)
+  (with-current-buffer vundo--orig-buffer
+(setq-local inhibit-modification-hooks nil
+buffer-read-only nil))
+  (kill-buffer-and-window))
+
 ;;; Traverse undo tree
 
 (defun vundo--calculate-shortest-route (from to)



[elpa] externals/vundo 1b98c3708c 33/58: * vundo.el (vundo--eqv-merge): Replace nth for performance.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 1b98c3708c0c204f45b8685e44772f358b20c8e0
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--eqv-merge): Replace nth for performance.
---
 vundo.el | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/vundo.el b/vundo.el
index 94b7d03375..eec59cc3c6 100644
--- a/vundo.el
+++ b/vundo.el
@@ -312,12 +312,16 @@ modification in MOD-LIST. Return HASH-TABLE."
 (defun vundo--eqv-merge (mlist)
   "Connect modifications in MLIST to be in the same equivalence list.
 Order is reserved."
-  (cl-loop for idx from 0 to (1- (length mlist))
-   for this = (nth idx mlist)
-   for next = (nth (1+ idx) mlist)
-   for prev = nil then (nth (1- idx) mlist)
-   do (setf (vundo-m-prev-eqv this) prev)
-   do (setf (vundo-m-next-eqv this) next)))
+  ;; Basically, for MLIST = (A B C), set
+  ;; A.prev = nil  A.next = B
+  ;; B.prev = AB.next = C
+  ;; C.prev = BC.next = nil
+  (cl-loop for this-tail = mlist then (cdr this-tail)
+   for next-tail = (cdr mlist) then (cdr next-tail)
+   for prev-tail = (cons nil mlist) then (cdr prev-tail)
+   while this-tail
+   do (setf (vundo-m-prev-eqv (car this-tail)) (car prev-tail))
+   do (setf (vundo-m-next-eqv (car this-tail)) (car next-tail
 
 (defun vundo--sort-mod (mlist &optional reverse)
   "Return sorted modifications in MLIST by their idx...



[elpa] externals/vundo 22345f42b1 45/58: * vundo.el (vundo): Replace let* with let.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 22345f42b1d34f58d7c74f55ca296e04a5f40b12
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo): Replace let* with let.
---
 vundo.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vundo.el b/vundo.el
index 6dcd6cb20c..628344f719 100644
--- a/vundo.el
+++ b/vundo.el
@@ -675,8 +675,8 @@ This function modifies ‘vundo--prev-mod-list’,
   "Return a vundo buffer for BUFFER.
 BUFFER must have a valid `buffer-undo-list'."
   (with-current-buffer buffer
-(let* ((vundo-buf (vundo--buffer))
-   (orig-buf (current-buffer)))
+(let ((vundo-buf (vundo--buffer))
+  (orig-buf (current-buffer)))
   (with-current-buffer vundo-buf
 ;; Enable major mode before refreshing the buffer.
 ;; Because major modes kill local variables.



[elpa] externals/vundo 76a54ce79d 36/58: * README.txt (Tests): New section.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 76a54ce79df382e101e55adc437956721e7654e6
Author: Campbell Barton 
Commit: Yuan Fu 

* README.txt (Tests): New section.
---
 README.txt | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README.txt b/README.txt
index 8e44c0fbeb..e966e21562 100644
--- a/README.txt
+++ b/README.txt
@@ -45,6 +45,16 @@ to use that font:
 
 (set-face-attribute 'vundo-default nil :family "Symbola")
 
+Tests:
+
+You can run tests by loading test/vundo-test.el and M-x ert RET t RET
+to run those tests interactively, or use the following batch command:
+
+ emacs --batch \
+   -l vundo.el \
+   -l test/vundo-test.el \
+   -f ert-run-tests-batch-and-exit
+
 Changelog:
 
 <2022-03-29 Tue> vundo--mode and vundo--mode-map are now vundo-mode



[elpa] externals/vundo 978534ad68 41/58: Trim once after all movements

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 978534ad686c9334f3ae68f8c1194d3038dc523c
Author: Yuan Fu 
Commit: Yuan Fu 

Trim once after all movements

* vundo.el (vundo--move-to-node): Remove step 3, trimming.
(vundo--trim-undo-list): New function. Step 3 is moved here.
(vundo-forward, vundo-next, vundo-stem-root, vundo-stem-end): Add
trimming after vundo--move-to-node loop.
---
 vundo.el | 70 +---
 1 file changed, 45 insertions(+), 25 deletions(-)

diff --git a/vundo.el b/vundo.el
index c428ca1af7..9a432d0645 100644
--- a/vundo.el
+++ b/vundo.el
@@ -819,8 +819,7 @@ ORIG-BUFFER must be at CURRENT state. MOD-LIST is the list 
you
 get from ‘vundo--mod-list-from’. You should refresh vundo buffer
 after calling this function.
 
-This function modifies the content of ORIG-BUFFER and its
-‘buffer-undo-list’."
+This function modifies the content of ORIG-BUFFER."
   (cl-assert (not (eq current dest)))
   ;; 1. Find the route we want to take.
   (if-let* ((route (vundo--calculate-shortest-route current dest)))
@@ -836,8 +835,7 @@ This function modifies the content of ORIG-BUFFER and its
  (planned-undo (vundo--list-subtract
 undo-list-at-source undo-list-at-dest))
  ;; We don’t want to quit in the middle of this function.
- (inhibit-quit t)
- trimmed)
+ (inhibit-quit t))
 (with-current-buffer orig-buffer
   (setq-local buffer-read-only t)
   ;; 2. Undo. This will undo modifications in PLANNED-UNDO and
@@ -864,38 +862,45 @@ This function modifies the content of ORIG-BUFFER and its
  (puthash buffer-undo-list (or undo-list-at-stop t)
   undo-equiv-table))
(push nil buffer-undo-list
-  ;; 3. Now we may be able to trim the undo-list.
-  (let ((latest-buffer-state-idx
- ;; Among all the MODs that represents a unique buffer
- ;; state, we find the latest one. Because any node
- ;; beyond that one is dispensable.
- (vundo-m-idx
-  (vundo--latest-buffer-state mod-list
-;; Find a trim point between latest buffer state and
-;; current node.
-(when-let ((possible-trim-point
-(cl-loop for node in (vundo--eqv-list-of dest)
- if (>= (vundo-m-idx node)
-latest-buffer-state-idx)
- return node
- finally return nil)))
-  (setq buffer-undo-list
-(vundo-m-undo-list possible-trim-point)
-trimmed (vundo-m-idx possible-trim-point
-  ;; 4. Some misc work.
+  ;; 3. Some misc work.
   (when vundo--message
-(message "%s -> %s Trim to: %s Steps: %s Undo-list len: %s"
+(message "%s -> %s Steps: %s Undo-list len: %s"
  (mapcar #'vundo-m-idx (vundo--eqv-list-of
 (aref mod-list source-idx)))
  (mapcar #'vundo-m-idx (vundo--eqv-list-of
 (aref mod-list dest-idx)))
- trimmed
  (length planned-undo)
  (length buffer-undo-list)))
   (when-let ((win (get-buffer-window)))
 (set-window-point win (point)
 (error "No possible route")))
 
+(defun vundo--trim-undo-list (buffer current mod-list)
+  "Trim ‘buffer-undo-list’ in BUFFER according to CURRENT and MOD-LIST.
+CURRENT is the current mod, MOD-LIST is the current mod-list.
+
+This function modifies ‘buffer-undo-list’ of BUFFER."
+  (let ((latest-buffer-state-idx
+ ;; Among all the MODs that represents a unique buffer
+ ;; state, we find the latest one. Because any node
+ ;; beyond that one is dispensable.
+ (vundo-m-idx
+  (vundo--latest-buffer-state mod-list
+;; Find a trim point between latest buffer state and
+;; current node.
+(when-let ((possible-trim-point
+(cl-loop for node in (vundo--eqv-list-of current)
+ if (>= (vundo-m-idx node)
+latest-buffer-state-idx)
+ return node
+ finally return nil)))
+  (with-current-buffer buffer
+(setq buffer-undo-list
+  (vundo-m-undo-list possible-trim-point)))
+  (when vundo--message
+(message "Trimmed to: %s"
+ (vundo-m-idx possible-trim-point))
+
 (defun vundo-forward (arg)
   "Move forward ARG nodes in the undo tree.
 If ARG < 0, move backward."
@@ -915,6 +920,15 @@ If ARG < 0, move backward."
 node dest vundo--orig-buffer vundo--prev-mod-list))
  (setq node dest)
 

[elpa] externals/vundo c44a2787ea 55/58: Remove redundant list creation from vundo--eqv-list-of

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit c44a2787ea4e1d1d0915e9bd0fd81626e50ad182
Author: Campbell Barton 
Commit: Yuan Fu 

Remove redundant list creation from vundo--eqv-list-of

Add a function to lookup the first mod instead of creating a list only
to access it's first element.

* vundo.el (vundo--eqv-min-of): New function.
(vundo--build-tree, vundo--current-node): Use the new function.
---
 vundo.el | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/vundo.el b/vundo.el
index 52720e311b..7837a8189d 100644
--- a/vundo.el
+++ b/vundo.el
@@ -391,6 +391,15 @@ modification in MOD-LIST. Return HASH-TABLE."
 ;; We know 3 and 5 are in the same equivalent list because 5 maps to 3
 ;; in `undo-equiv-table' (basically).
 
+(defun vundo--master-eqv-mod-of (mod)
+  "Return the master mod in the eqv-list of MOD.
+Master mod is the mod with the smallest index in the eqv-list.
+This function is equivalent to (car (vundo--eqv-list-of mod))."
+  (while (vundo-m-prev-eqv mod)
+(cl-assert (not (eq mod (vundo-m-prev-eqv mod
+(setq mod (vundo-m-prev-eqv mod)))
+  mod)
+
 (defun vundo--eqv-list-of (mod)
   "Return all the modifications equivalent to MOD."
   (while (vundo-m-prev-eqv mod)
@@ -467,8 +476,7 @@ If FROM non-nil, build from FORM-th modification in 
MOD-LIST."
;; the child.
(unless (eq m 0)
  (let* ((m-1 (aref mod-list (1- m)))
-;; TODO: may need to optimize.
-(min-eqv-mod (car (vundo--eqv-list-of m-1
+(min-eqv-mod (vundo--master-eqv-mod-of m-1)))
(setf (vundo-m-parent mod) min-eqv-mod)
(let ((children (vundo-m-children min-eqv-mod)))
  ;; If everything goes right, we should never encounter
@@ -729,7 +737,7 @@ This function modifies ‘vundo--prev-mod-list’,
 
 (defun vundo--current-node (mod-list)
   "Return the currently highlighted node in MOD-LIST."
-  (car (vundo--eqv-list-of (aref mod-list (1- (length mod-list))
+  (vundo--master-eqv-mod-of (aref mod-list (1- (length mod-list)
 
 (defun vundo--highlight-node (node)
   "Highlight NODE as current node."



[elpa] externals/vundo 8d7e80d149 40/58: * vundo.el (vundo--refresh-buffer): Update docstring.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 8d7e80d149ce06921c9103be317ed672da2b5885
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--refresh-buffer): Update docstring.
---
 vundo.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 5f0e030ac8..c428ca1af7 100644
--- a/vundo.el
+++ b/vundo.el
@@ -582,7 +582,10 @@ Keep the first N modifications."
 (defun vundo--refresh-buffer
 (orig-buffer vundo-buffer &optional incremental)
   "Refresh VUNDO-BUFFER with the undo history of ORIG-BUFFER.
-If INCREMENTAL non-nil, reuse some date.
+If INCREMENTAL non-nil, reuse existing mod-list and mod-hash.
+INCREMENTAL is only applicable when entries are either added or
+removed from undo-list. On the other hand, if some entries are
+removed and some added, do not use INCREMENTAL.
 
 This function modifies ‘vundo--prev-mod-list’,
 ‘vundo--prev-mod-hash’, ‘vundo--prev-undo-list’,



[elpa] externals/vundo d833570d47 49/58: Update README per request

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit d833570d4733ce3d5ab8d342daf4f237e9f424b1
Author: Yuan Fu 
Commit: Yuan Fu 

Update README per request

* README.txt: Add initial introduction of vundo. Move Tests section
down.
* vundo.el: Remove Tests and Changelog section.
---
 README.txt | 23 ---
 vundo.el   | 30 --
 2 files changed, 12 insertions(+), 41 deletions(-)

diff --git a/README.txt b/README.txt
index b9070356de..278834e629 100644
--- a/README.txt
+++ b/README.txt
@@ -1,5 +1,7 @@
-To use vundo, type M-x vundo RET in the buffer you want to undo. An
-undo tree buffer should pop up. To move around, type:
+Vundo (visual undo) displays the undo history as a tree and lets you
+move in the tree to go back to previous buffer states. To use vundo,
+type M-x vundo RET in the buffer you want to undo. An undo tree buffer
+should pop up. To move around, type:
 
   f   to go forward
   b   to go backward
@@ -54,6 +56,14 @@ to use that font:
 
 (set-face-attribute 'vundo-default nil :family "Symbola")
 
+Comparing to undo-tree:
+
+Vundo doesn’t need to be turned on all the time nor replace the undo
+commands like undo-tree does. Vundo displays the tree horizontally,
+whereas undo-tree displays a tree vertically. Vundo doesn’t have many
+advanced features that undo-tree does (like showing diff), and most
+probably will not add those features in the future.
+
 Tests:
 
 You can run tests by loading test/vundo-test.el and M-x ert RET t RET
@@ -64,15 +74,6 @@ to run those tests interactively, or use the following batch 
command:
-l test/vundo-test.el \
-f ert-run-tests-batch-and-exit
 
-Comparing to undo-tree:
-
-Vundo doesn’t need to be turned on all the time nor replace the undo
-commands like undo-tree does. Vundo displays the tree horizontally,
-whereas undo-tree displays a tree vertically. Vundo doesn’t have many
-advanced features that undo-tree does (like showing diff), and most
-probably will not add those features in the future.
-
-
 
 Changelog (full changelog in NEWS.txt):
 
diff --git a/vundo.el b/vundo.el
index 52720e311b..0b6cf2ef0d 100644
--- a/vundo.el
+++ b/vundo.el
@@ -82,16 +82,6 @@
 ;;
 ;; (set-face-attribute 'vundo-default nil :family "Symbola")
 ;;
-;; Tests:
-;;
-;; You can run tests by loading test/vundo-test.el and M-x ert RET t RET
-;; to run those tests interactively, or use the following batch command:
-;;
-;;  emacs --batch \
-;;-l vundo.el \
-;;-l test/vundo-test.el \
-;;-f ert-run-tests-batch-and-exit
-;;
 ;; Comparing to undo-tree:
 ;;
 ;; Vundo doesn’t need to be turned on all the time nor replace the undo
@@ -99,26 +89,6 @@
 ;; whereas undo-tree displays a tree vertically. Vundo doesn’t have many
 ;; advanced features that undo-tree does (like showing diff), and most
 ;; probably will not add those features in the future.
-;;
-;;
-;;
-;; Changelog (full changelog in NEWS.txt):
-;;
-;; <2022-04-04 Mon>: Version 1.0.0
-;;
-;; <2022-03-29 Tue>: vundo--mode and vundo--mode-map are now vundo-mode
-;; and vundo-mode-map. A new custom option vundo-compact-display is added.
-;;
-;; <2022-03-23 Wed>: UI now defaults to ASCII mode. ASCII mode also draws
-;; differently now, it now draws
-;;
-;; o--o--o instead of  o--o--o
-;; |  `--x |  +--*
-;; |--o|--o
-;; `--o+--o
-;;
-;; <2021-11-26 Fri>: Variable vundo-translate-alist changed to
-;; vundo-glyph-alist and has different value now.
 
 ;;; Developer:
 ;;



[elpa] externals/vundo 6acda40607 42/58: Fix vundo-forward

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 6acda406077100b947cc4eb97faae8a25b6a08b4
Author: Yuan Fu 
Commit: Yuan Fu 

Fix vundo-forward

1. Only move once rather than in every step
2. Actually trim undo-list, in previous commit we sometimes don't trim
the undo-list.

Change in looping condition: previously we use node and next, now we
use source, dest, this, and next. When we finish looping, we move from
source to dest. Inside the loop, this is the current node, next is the
next node, and we break the loop if next is nil (early termination) or
step is 0, moved enough steps.

* vundo.el (vundo--trim-undo-list): Add explanation in docstring.
(vundo-forward): Improved the looping condition, now it is easier to
understand. Moves vundo--move-to-node out of the loop. Also fix the
condition for vundo--trim-undo-list, previously NODE could be nil, in
which case the undo-list won't be trimmed.
---
 vundo.el | 67 
 1 file changed, 42 insertions(+), 25 deletions(-)

diff --git a/vundo.el b/vundo.el
index 9a432d0645..2389ce1de2 100644
--- a/vundo.el
+++ b/vundo.el
@@ -53,11 +53,11 @@
 ;; Once we have generated the data structure and drawn the tree, vundo
 ;; commands can move around on that tree by calling
 ;; `vundo--move-to-node'. It will construct the correct undo-list and
-;; feed it to `primitive-undo'. After each movement,
-;; `vundo--move-to-node' also trims the undo list when possible.
+;; feed it to `primitive-undo'. `vundo--trim-undo-list' can trim the
+;; undo list when possible.
 ;;
 ;; Finally, to avoid generating everything from scratch every time we
-;; moves on the tree, `vundo--refresh-buffer' can incrementally update
+;; move on the tree, `vundo--refresh-buffer' can incrementally update
 ;; the data structures (`vundo--prev-mod-list' and
 ;; `vundo--prev-mod-hash'). If the undo list expands, we only process
 ;; the new entries, if the undo list shrinks (trimmed), we remove
@@ -879,7 +879,26 @@ This function modifies the content of ORIG-BUFFER."
   "Trim ‘buffer-undo-list’ in BUFFER according to CURRENT and MOD-LIST.
 CURRENT is the current mod, MOD-LIST is the current mod-list.
 
-This function modifies ‘buffer-undo-list’ of BUFFER."
+This function modifies ‘buffer-undo-list’ of BUFFER.
+
+IMPORTANT Relationship between ‘vundo--move-to-node’,
+‘vundo--refresh-buffer’, ‘vundo--trim-undo-list’:
+
+Each vundo command cycle roughly works like this:
+1. ‘vundo--refresh-buffer’: ‘buffer-undo-list’ -> mod-list
+2. ‘vundo--move-to-node’: read mod-list, modify ‘buffer-undo-list’
+3. ‘vundo--trim-undo-list’: trim ‘buffer-undo-list’
+1. ‘vundo--refresh-buffer’: ‘buffer-undo-list’ -> mod-list
+...
+
+We can call ‘vundo--move-to-node’ multiple times between two
+‘vundo--refresh-buffer’. But we should only call
+‘vundo--trim-undo-list’ once between two ‘vundo--refresh-buffer’.
+Because if we only trim once, ‘buffer-undo-list’ either shrinks
+or expands. But if we trim multiple times after multiple
+movements, it could happen that the undo-list first
+shrinks (trimmed) then expands. In that situation we cannot use
+the INCREMENTAL option in ‘vundo--refresh-buffer’ anymore."
   (let ((latest-buffer-state-idx
  ;; Among all the MODs that represents a unique buffer
  ;; state, we find the latest one. Because any node
@@ -907,31 +926,29 @@ If ARG < 0, move backward."
   (interactive "p")
   (vundo--check-for-command
(let ((step (abs arg)))
- (let ((node (vundo--current-node vundo--prev-mod-list))
-   dest)
+ (let* ((source (vundo--current-node vundo--prev-mod-list))
+dest
+(this source)
+(next (if (> arg 0)
+  (car (vundo-m-children this))
+(vundo-m-parent this
;; Move to the dest node step-by-step, stop when no further
;; node to go to.
-   (while (and node (> step 0))
- (setq dest (if (> arg 0)
-(car (vundo-m-children node))
-  (vundo-m-parent node)))
- (when dest
-   (vundo--move-to-node
-node dest vundo--orig-buffer vundo--prev-mod-list))
- (setq node dest)
+   (while (and next (> step 0))
+ (setq this next
+   next (if (> arg 0)
+(car (vundo-m-children this))
+  (vundo-m-parent this)))
  (cl-decf step))
-   ;; We trim ‘buffer-undo-list’ after all moving is done, rather
-   ;; than trimming after each move. This way undo-list either
-   ;; shrinks or expands. If we trim after every move, it could
-   ;; happen that the undo-list first shrinks (trimmed) then
-   ;; expands. In that situation we cannot use the INCREMENTAL
-   ;; option in ‘vundo--refresh-buffer’. We don’t want that.
-   (when node
+   (setq dest this)
+   (unless (eq source dest)
+ (vundo--move

[elpa] externals/vundo 7ddb684eb5 53/58: * vundo.el (vundo--draw-tree): Set inhibit-modification-hooks to t.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 7ddb684eb51c0b31dbb1a9c3fb386d88b79e641c
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el (vundo--draw-tree): Set inhibit-modification-hooks to t.
---
 vundo.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vundo.el b/vundo.el
index 4d56b4cec2..2f778ad768 100644
--- a/vundo.el
+++ b/vundo.el
@@ -497,7 +497,8 @@ Translate according to ‘vundo-glyph-alist’."
   "Draw the tree in MOD-LIST in current buffer."
   (let* ((root (aref mod-list 0))
  (node-queue (list root))
- (inhibit-read-only t))
+ (inhibit-read-only t)
+ (inhibit-modification-hooks t))
 (erase-buffer)
 (while node-queue
   (let* ((node (pop node-queue))



[elpa] externals/vundo 377194b705 58/58: * vundo.el: Fix dependency tag.

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 377194b705b99b98068d18fda2c5ccdb94313e9c
Author: Yuan Fu 
Commit: Yuan Fu 

* vundo.el: Fix dependency tag.
---
 vundo.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vundo.el b/vundo.el
index 6b92965392..9de5ca1b5c 100644
--- a/vundo.el
+++ b/vundo.el
@@ -6,8 +6,8 @@
 ;; Maintainer: Yuan Fu 
 ;; URL: https://github.com/casouri/vundo
 ;; Version: 1.0.0
-;; Keywords: undo, text
-;; Package-Requires: ((emacs "28.0"))
+;; Keywords: undo, text, editing
+;; Package-Requires: ((emacs "28.1"))
 ;;
 ;; This file is part of GNU Emacs.
 ;;



[elpa] externals/vundo 9657909b43 51/58: Trim a nreverse call in vundo--eqv-list-of

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 9657909b43ff35e48d4da599fe2f2c0f23157c49
Author: Campbell Barton 
Commit: Yuan Fu 

Trim a nreverse call in vundo--eqv-list-of

* vundo.el (vundo--eqv-list-of): Build the list in reverse order
instead.
---
 vundo.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/vundo.el b/vundo.el
index 52720e311b..d43c7ac1fb 100644
--- a/vundo.el
+++ b/vundo.el
@@ -393,16 +393,16 @@ modification in MOD-LIST. Return HASH-TABLE."
 
 (defun vundo--eqv-list-of (mod)
   "Return all the modifications equivalent to MOD."
-  (while (vundo-m-prev-eqv mod)
-(cl-assert (not (eq mod (vundo-m-prev-eqv mod
-(setq mod (vundo-m-prev-eqv mod)))
-  ;; At the first mod in the equiv chain.
+  (while (vundo-m-next-eqv mod)
+(cl-assert (not (eq mod (vundo-m-next-eqv mod
+(setq mod (vundo-m-next-eqv mod)))
+  ;; Start at the last mod in the equiv chain, walk back to the first.
   (let ((eqv-list (list mod)))
-(while (vundo-m-next-eqv mod)
-  (cl-assert (not (eq mod (vundo-m-next-eqv mod
-  (setq mod (vundo-m-next-eqv mod))
+(while (vundo-m-prev-eqv mod)
+  (cl-assert (not (eq mod (vundo-m-prev-eqv mod
+  (setq mod (vundo-m-prev-eqv mod))
   (push mod eqv-list))
-(nreverse eqv-list)))
+eqv-list))
 
 (defun vundo--eqv-merge (mlist)
   "Connect modifications in MLIST to be in the same equivalence list.



[elpa] externals/vundo 549efe15c3 14/58: UI change: default to ASCII and more

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 549efe15c313162098f29987c9236ff324358d99
Author: Yuan Fu 
Commit: Yuan Fu 

UI change: default to ASCII and more

* vundo.el (vundo-ascii-symbols): change + to ` and * to x.
(vundo-glyph-alist): Use ASCII by default.
---
 vundo.el | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index acd56deedc..05fd2cf6fe 100644
--- a/vundo.el
+++ b/vundo.el
@@ -104,12 +104,12 @@
  (const :tag "Top"top)))
 
 (defconst vundo-ascii-symbols
-  '((selected-node . ?*)
+  '((selected-node . ?x)
 (node . ?o)
 (horizontal-stem . ?-)
 (vertical-stem . ?|)
 (branch . ?|)
-(last-branch . ?+))
+(last-branch . ?`))
   "ASCII symbols to draw vundo tree.")
 
 (defconst vundo-unicode-symbols
@@ -121,7 +121,7 @@
 (last-branch . ?└))
   "Unicode symbols to draw vundo tree.")
 
-(defcustom vundo-glyph-alist vundo-unicode-symbols
+(defcustom vundo-glyph-alist vundo-ascii-symbols
   "Alist mapping tree parts to characters used to draw a tree.
 Keys are names for different parts of a tree, values are
 characters for that part. Possible keys include
@@ -138,7 +138,17 @@ in a tree like
 ○──○──○
 │  └──●
 ├──○
-└──○"
+└──○
+
+By default, the tree is drawn with ASCII characters like this:
+
+o--o--o
+|  `--x
+|--o
+`--o
+
+Set this variable to ‘vundo-unicode-symbols’ to use Unicode
+characters."
   :type `(alist :tag "Translation alist"
:key-type (symbol :tag "Part of tree")
:value-type (character :tag "Draw using")



[elpa] externals/vundo b27ddfecfd 25/58: Handle user quit gracefully

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit b27ddfecfde6c9e4911ca5539b35e08990a0a22b
Author: Campbell Barton 
Commit: Yuan Fu 

Handle user quit gracefully

* vundo.el (vundo--refresh-buffer): Update docstring.
(vundo--move-to-node): Inhibit quit in this function.
(vundo-forward): Fix docstring.
---
 vundo.el | 21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/vundo.el b/vundo.el
index bed630736c..eddde3817b 100644
--- a/vundo.el
+++ b/vundo.el
@@ -569,7 +569,11 @@ Keep the first N modifications."
 (defun vundo--refresh-buffer
 (orig-buffer vundo-buffer &optional incremental)
   "Refresh VUNDO-BUFFER with the undo history of ORIG-BUFFER.
-If INCREMENTAL non-nil, reuse some date."
+If INCREMENTAL non-nil, reuse some date.
+
+This function modifies ‘vundo--prev-mod-list’,
+‘vundo--prev-mod-hash’, ‘vundo--prev-undo-list’,
+‘vundo--orig-buffer’."
   (with-current-buffer vundo-buffer
 ;; 1. Setting these to nil makes `vundo--mod-list-from',
 ;; `vundo--update-mapping' and `vundo--build-tree' starts from
@@ -795,7 +799,10 @@ Basically, return the latest non-undo modification in 
MOD-LIST."
   "Move from CURRENT node to DEST node by undoing in ORIG-BUFFER.
 ORIG-BUFFER must be at CURRENT state. MOD-LIST is the list you
 get from ‘vundo--mod-list-from’. You should refresh vundo buffer
-after calling this function."
+after calling this function.
+
+This function modifies the content of ORIG-BUFFER and its
+‘buffer-undo-list’."
   (cl-assert (not (eq current dest)))
   ;; 1. Find the route we want to take.
   (if-let* ((route (vundo--calculate-shortest-route current dest)))
@@ -810,6 +817,8 @@ after calling this function."
  ;; We will undo these modifications.
  (planned-undo (vundo--list-subtract
 undo-list-at-source undo-list-at-dest))
+ ;; We don’t want to quit in the middle of this function.
+ (inhibit-quit t)
  trimmed)
 (with-current-buffer orig-buffer
   (setq-local buffer-read-only t)
@@ -819,7 +828,11 @@ after calling this function."
 (cl-loop
  for step = (- source-idx dest-idx)
  then (1- step)
- while (> step 0)
+ while (and (> step 0)
+;; If there is a quit signal, we break the
+;; loop, continue to step 3 and 4, then quits
+;; when we go out of the let-form.
+(not quit-flag))
  for stop = (1- source-idx) then (1- stop)
  do
  (progn
@@ -867,7 +880,7 @@ after calling this function."
 
 (defun vundo-forward (arg)
   "Move forward ARG nodes in the undo tree.
-If ARG < 0, move backward"
+If ARG < 0, move backward."
   (interactive "p")
   (vundo--check-for-command
(let ((step (abs arg)))



[elpa] externals/vundo b7e2119191 27/58: Change i.e. to ie, e.g. to eg

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit b7e21191912d647db68943faaaf33a80476aa713
Author: Yuan Fu 
Commit: Yuan Fu 

Change i.e. to ie, e.g. to eg

* vundo.el (vundo--build-tree, vundo--check-for-command,
vundo--calculate-shortest-route, vundo--stem-root-p): Change i.e. to
ie, e.g. to eg.
---
 vundo.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/vundo.el b/vundo.el
index eddde3817b..99a267e101 100644
--- a/vundo.el
+++ b/vundo.el
@@ -29,7 +29,7 @@
 ;;; Developer:
 ;;
 ;; In the comments, when I say node, modification, mod, buffer state,
-;; they all mean one thing: `vundo-m'. I.e., `vundo-m' represents
+;; they all mean one thing: `vundo-m'. Ie, `vundo-m' represents
 ;; multiple things at once: it represents an modification recorded in
 ;; `buffer-undo-list', it represents the state of the buffer after
 ;; that modification took place, and it represents the node in the
@@ -374,7 +374,7 @@ If FROM non-nil, build from FORM-th modification in 
MOD-LIST."
  ;; this.
  (cl-assert (not (memq mod children)))
  (setf (vundo-m-children min-eqv-mod)
-   ;; We sort in reverse order, i.e., later mod
+   ;; We sort in reverse order, ie, later mod
;; comes first. Later in `vundo--build-tree' we
;; draw the tree depth-first.
(vundo--sort-mod (cons mod children)
@@ -698,7 +698,7 @@ Do sanity check, then evaluate BODY."
;; Non-local exit.
(user-error ""))
  ;; If ORIG-BUFFER changed since we last synced the vundo buffer
- ;; (e.g., user left vundo buffer and did some edit in ORIG-BUFFER
+ ;; (eg, user left vundo buffer and did some edit in ORIG-BUFFER
  ;; then comes back), refresh to catch up.
  (let ((undo-list (buffer-local-value
'buffer-undo-list vundo--orig-buffer)))
@@ -744,7 +744,7 @@ Roll back changes if `vundo-roll-back-on-quit' is non-nil."
   "Calculate the shortest route from FROM to TO node.
 Return (SOURCE STOP1 STOP2 ... DEST), meaning you should undo the
 modifications from DEST to SOURCE. Each STOP is an intermediate
-stop. E.g., (6 5 4 3). Return nil if no valid route."
+stop. Eg, (6 5 4 3). Return nil if no valid route."
   (let (route-list)
 ;; Find all valid routes.
 (dolist (source (vundo--eqv-list-of from))
@@ -758,7 +758,7 @@ stop. E.g., (6 5 4 3). Return nil if no valid route."
 (setq route-list
   (seq-sort
(lambda (r1 r2)
- ;; I.e., distance between SOURCE and DEST in R1 compare
+ ;; Ie, distance between SOURCE and DEST in R1 compare
  ;; against distance in R2.
  (< (- (car r1) (cdr r1)) (- (car r2) (cdr r2
route-list))
@@ -936,7 +936,7 @@ If ARG < 0, move forward."
 
 (defun vundo--stem-root-p (node)
   "Return non-nil if NODE is the root of a stem."
-  ;; I.e., parent has more than one children.
+  ;; Ie, parent has more than one children.
   (> (length (vundo-m-children (vundo-m-parent node))) 1))
 
 (defun vundo--stem-end-p (node)



[elpa] externals/vundo 7cafb7aac5 37/58: Merge branch 'pr-readme-test'

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit 7cafb7aac5a5111ab8f4594811372ed590b48429
Merge: a66bb05062 76a54ce79d
Author: Yuan Fu 
Commit: Yuan Fu 

Merge branch 'pr-readme-test'
---
 README.txt | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README.txt b/README.txt
index 8e44c0fbeb..e966e21562 100644
--- a/README.txt
+++ b/README.txt
@@ -45,6 +45,16 @@ to use that font:
 
 (set-face-attribute 'vundo-default nil :family "Symbola")
 
+Tests:
+
+You can run tests by loading test/vundo-test.el and M-x ert RET t RET
+to run those tests interactively, or use the following batch command:
+
+ emacs --batch \
+   -l vundo.el \
+   -l test/vundo-test.el \
+   -f ert-run-tests-batch-and-exit
+
 Changelog:
 
 <2022-03-29 Tue> vundo--mode and vundo--mode-map are now vundo-mode



[elpa] externals/vundo c9e8909c50 52/58: Merge branch 'pr-no-nreverse'

2022-04-15 Thread ELPA Syncer
branch: externals/vundo
commit c9e8909c5046581845c2889cda3b176e580302b6
Merge: b93e15e0c2 9657909b43
Author: Yuan Fu 
Commit: Yuan Fu 

Merge branch 'pr-no-nreverse'
---
 vundo.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/vundo.el b/vundo.el
index 7fb60f70ae..4d56b4cec2 100644
--- a/vundo.el
+++ b/vundo.el
@@ -365,16 +365,16 @@ modification in MOD-LIST. Return HASH-TABLE."
 
 (defun vundo--eqv-list-of (mod)
   "Return all the modifications equivalent to MOD."
-  (while (vundo-m-prev-eqv mod)
-(cl-assert (not (eq mod (vundo-m-prev-eqv mod
-(setq mod (vundo-m-prev-eqv mod)))
-  ;; At the first mod in the equiv chain.
+  (while (vundo-m-next-eqv mod)
+(cl-assert (not (eq mod (vundo-m-next-eqv mod
+(setq mod (vundo-m-next-eqv mod)))
+  ;; Start at the last mod in the equiv chain, walk back to the first.
   (let ((eqv-list (list mod)))
-(while (vundo-m-next-eqv mod)
-  (cl-assert (not (eq mod (vundo-m-next-eqv mod
-  (setq mod (vundo-m-next-eqv mod))
+(while (vundo-m-prev-eqv mod)
+  (cl-assert (not (eq mod (vundo-m-prev-eqv mod
+  (setq mod (vundo-m-prev-eqv mod))
   (push mod eqv-list))
-(nreverse eqv-list)))
+eqv-list))
 
 (defun vundo--eqv-merge (mlist)
   "Connect modifications in MLIST to be in the same equivalence list.



[elpa] externals/eglot 41b6a7e4b6: Fix #921: Fix GitHub Actions badge link

2022-04-15 Thread ELPA Syncer
branch: externals/eglot
commit 41b6a7e4b6b90cd45b7d74d8b2b03d36408ba05b
Author: Troels Henriksen 
Commit: GitHub 

Fix #921: Fix GitHub Actions badge link

Currently it just links to an image of itself.

* README.md: fix GitHub Actions badge link.

Copyright-paperwork-exempt: yes
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 1f01bfde9d..a940ea565b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-![Build 
status](https://github.com/joaotavora/eglot/actions/workflows/test.yml/badge.svg?master)
+[![Build 
status](https://github.com/joaotavora/eglot/actions/workflows/test.yml/badge.svg)](https://github.com/joaotavora/eglot/actions/workflows/test.yml)
 [![GNU 
ELPA](https://elpa.gnu.org/packages/eglot.svg)](https://elpa.gnu.org/packages/eglot.html)
 
[![MELPA](https://melpa.org/packages/eglot-badge.svg)](https://melpa.org/#/eglot)
 



[elpa] externals/corfu da59e260ff: Simplify extensions

2022-04-15 Thread ELPA Syncer
branch: externals/corfu
commit da59e260ffac2a13e59fa5918c18b673fc6fc4ca
Author: Daniel Mendler 
Commit: Daniel Mendler 

Simplify extensions
---
 extensions/corfu-history.el | 38 ++
 extensions/corfu-indexed.el | 10 +-
 extensions/corfu-quick.el   | 13 ++---
 3 files changed, 29 insertions(+), 32 deletions(-)

diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
index be6d1cd395..c600892230 100644
--- a/extensions/corfu-history.el
+++ b/extensions/corfu-history.el
@@ -34,6 +34,8 @@
 ;;; Code:
 
 (require 'corfu)
+(eval-when-compile
+  (require 'cl-lib))
 
 (defcustom corfu-history-length nil
   "Corfu history length."
@@ -48,34 +50,30 @@
 
 (defun corfu-history--sort-predicate (x y)
   "Sorting predicate which compares X and Y."
-  (or (< (cdr x) (cdr y))
-  (and (= (cdr x) (cdr y))
-   (string< (car x) (car y)
+  (pcase-let ((`(,sx . ,hx) x)
+  (`(,sy . ,hy) y))
+(or (< hx hy)
+  (and (= hx hy)
+   (or (< (length sx) (length sy))
+   (and (= (length sx) (length sy))
+(string< sx sy)))
 
 (defun corfu-history--sort (candidates)
   "Sort CANDIDATES by history."
   (unless corfu-history--hash
-(let ((index 0))
-  (setq corfu-history--hash (make-hash-table :test #'equal :size (length 
corfu-history)))
-  (dolist (elt corfu-history)
-(unless (gethash elt corfu-history--hash)
-  (puthash elt index corfu-history--hash))
-(setq index (1+ index)
+(setq corfu-history--hash (make-hash-table :test #'equal :size (length 
corfu-history)))
+(cl-loop for elem in corfu-history for index from 0 do
+ (unless (gethash elem corfu-history--hash)
+   (puthash elem index corfu-history--hash
   ;; Decorate each candidate with (index<<13) + length. This way we sort first 
by index and then by
   ;; length. We assume that the candidates are shorter than 2**13 characters 
and that the history is
   ;; shorter than 2**16 entries.
-  (let ((cand candidates))
-(while cand
-  (setcar cand (cons (car cand)
- (+ (lsh (gethash (car cand) corfu-history--hash 
#x) 13)
-(length (car cand)
-  (pop cand)))
+  (cl-loop for cand on candidates do
+   (setcar cand (cons (car cand)
+  (+ (lsh (gethash (car cand) corfu-history--hash 
#x) 13)
+ (length (car cand))
   (setq candidates (sort candidates #'corfu-history--sort-predicate))
-  ;; Drop decoration from the candidates
-  (let ((cand candidates))
-(while cand
-  (setcar cand (caar cand))
-  (pop cand)))
+  (cl-loop for cand on candidates do (setcar cand (caar cand)))
   candidates)
 
 (defun corfu-history--insert (&rest _)
diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
index 0cb591276b..dace2bd958 100644
--- a/extensions/corfu-indexed.el
+++ b/extensions/corfu-indexed.el
@@ -33,6 +33,8 @@
 ;;; Code:
 
 (require 'corfu)
+(eval-when-compile
+  (require 'cl-lib))
 
 (defface corfu-indexed
   '((default :height 0.75)
@@ -51,8 +53,7 @@
 (defun corfu-indexed--affixate (cands)
   "Advice for `corfu--affixate' which prefixes the CANDS with an index."
   (setq cands (cdr cands))
-  (let* ((index 0)
- (space #(" " 0 1 (face (:height 0.5 :inherit corfu-indexed
+  (let* ((space #(" " 0 1 (face (:height 0.5 :inherit corfu-indexed
  (width (if (> (length cands) 10) 2 1))
  (fmt (concat space
   (propertize (format "%%%ds" width)
@@ -62,13 +63,12 @@
   (propertize (make-string width ?\s)
   'display
   `(space :align-to (+ left ,(1+ width))
-(dolist (cand cands)
+(cl-loop for cand in cands for index from 0 do
   (setf (cadr cand)
 (concat
  (propertize " " 'display (format fmt index))
  align
- (cadr cand)))
-  (cl-incf index))
+ (cadr cand
 (cons t cands)))
 
 (defun corfu-indexed--handle-prefix (orig &rest args)
diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index bd16be3254..77be057602 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -37,6 +37,8 @@
 ;;; Code:
 
 (require 'corfu)
+(eval-when-compile
+  (require 'cl-lib))
 
 (defcustom corfu-quick1 "asdfgh"
   "First level quick keys."
@@ -108,13 +110,10 @@ TWO is non-nil if two keys should be displayed."
  ((symbol-function #'corfu--affixate)
   (lambda (cands)
 (setq cands (cdr (funcall orig cands)))
-(let ((index 0))
-  (dolist (cand cands)
-(pcase-let ((`(,keys . ,events) (corfu-quick--keys first 
index)))
-  (setq list (nconc events list))
-  (setf (cadr cand) (concat space1 (propertize " "

[elpa] externals/eglot 777a7169c2: Close #922: Add out-of-box support for Futhark LSP server

2022-04-15 Thread ELPA Syncer
branch: externals/eglot
commit 777a7169c2c2a5dad6b9ecda3f2aa7a1edda84a9
Author: Troels Henriksen 
Commit: GitHub 

Close #922: Add out-of-box support for Futhark LSP server

* eglot.el (eglot-server-programs): Support futhark lsp.
* README.md: Update.
* NEWS.md: Update.

Copyright-paperwork-exempt: yes
---
 NEWS.md   | 2 ++
 README.md | 2 ++
 eglot.el  | 1 +
 3 files changed, 5 insertions(+)

diff --git a/NEWS.md b/NEWS.md
index 3b9612c5b0..5ef15eac22 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -45,6 +45,7 @@ available.  The special support code for RLS has been removed.
 # New servers have been added to `eglot-server-programs`
 - clojure-lsp ([#813][github#813])
 - racket-langserver ([#694][github#694])
+- futhark lsp ([#922](github#922))
 
 # 1.8 (12/1/2022)
 
@@ -374,3 +375,4 @@ and now said bunch of references-->
 [github#893]: https://github.com/joaotavora/eglot/issues/893
 [github#899]: https://github.com/joaotavora/eglot/issues/899
 [github#901]: https://github.com/joaotavora/eglot/issues/901
+[github#922]: https://github.com/joaotavora/eglot/issues/922
diff --git a/README.md b/README.md
index a940ea565b..376c7a0d46 100644
--- a/README.md
+++ b/README.md
@@ -51,6 +51,7 @@ find-library` can help you tell if that happened.
 * Elm's [elm-language-server][elm-language-server]
 * Erlang's [erlang_ls][erlang_ls]
 * Fortran's [fortls][fortls]
+* Futhark's [futhark lsp][futhark-lsp]
 * Go's [gopls][gopls]
 * Godot Engine's [built-in LSP][godot]
 * HTML [html-languageserver][html-languageserver]
@@ -507,6 +508,7 @@ for the request form, and we'll send it to you.
 [elixir-ls]: https://github.com/elixir-lsp/elixir-ls
 [elm-language-server]: https://github.com/elm-tooling/elm-language-server
 [fortls]: https://github.com/hansec/fortran-language-server
+[futhark-lsp]: https://futhark-lang.org
 [gopls]: https://github.com/golang/tools/tree/master/gopls
 [godot]: https://godotengine.org
 [html-languageserver]: https://github.com/hrsh7th/vscode-langservers-extracted
diff --git a/eglot.el b/eglot.el
index 52f61e80f4..348ae4b42c 100644
--- a/eglot.el
+++ b/eglot.el
@@ -187,6 +187,7 @@ language-server/bin/php-language-server.php"))
 (nix-mode . ("rnix-lsp"))
 (gdscript-mode . ("localhost" 6008))
 ((fortran-mode f90-mode) . ("fortls"))
+(futhark-mode . ("futhark" "lsp"))
 (lua-mode . ("lua-lsp"))
 (zig-mode . ("zls"))
 (css-mode . ,(eglot-alternatives 
'(("vscode-css-language-server" "--stdio") ("css-languageserver" "--stdio"



[elpa] externals/tempel 976c5a5c75: README: Template file, specify outline-regexp

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 976c5a5c7521c98e832a95921d827a0b3d63a32f
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Template file, specify outline-regexp
---
 README.org | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 7d33c9d3be..3421cc4950 100644
--- a/README.org
+++ b/README.org
@@ -110,8 +110,6 @@ post-expansion operations can be specified per template by 
the optional keys
 =:pre= and =:post=.
 
 #+begin_src emacs-lisp
-  ;; -*- mode: lisp-data -*-
-
   fundamental-mode ;; Available everywhere
 
   (today (format-time-string "%Y-%m-%d"))
@@ -193,6 +191,12 @@ post-expansion operations can be specified per template by 
the optional keys
   (src "#+begin_src " p n> r> n> "#+end_src")
   (elisp "#+begin_src emacs-lisp" n> r> n "#+end_src"
  :post (progn (tempel-done) (org-edit-src-code)))
+
+  ;; Local Variables:
+  ;; mode: lisp-data
+  ;; outline-regexp: "[a-z]"
+  ;; End:
+
 #+end_src
 
 * Template syntax



[nongnu] elpa/helm updated (5546efa7d1 -> 155227133c)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  5546efa7d1 Prevent saving new directories to file-name-history
   new  fef33e1283 Allow toggling short doc in helm-M-x (#2496)
   new  35895c699c Reindent only
   new  155227133c Add no-helm-mx prop to helm-M-x-toggle-short-doc


Summary of changes:
 helm-command.el | 99 ++---
 helm-help.el|  4 ++-
 2 files changed, 69 insertions(+), 34 deletions(-)



[nongnu] elpa/helm fef33e1283 1/3: Allow toggling short doc in helm-M-x (#2496)

2022-04-15 Thread ELPA Syncer
branch: elpa/helm
commit fef33e128373aa2f0ff370396d846e90db4ce1ec
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Allow toggling short doc in helm-M-x (#2496)
---
 helm-command.el | 65 ++---
 helm-help.el|  4 +++-
 2 files changed, 51 insertions(+), 18 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index f453ba0ee4..39197b0fc8 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -42,6 +42,22 @@
   "Helm-M-x fuzzy matching when non nil."
   :group 'helm-command
   :type 'boolean)
+
+(defvar helm-M-x-map
+  (let ((map (make-sparse-keymap)))
+(set-keymap-parent map helm-comp-read-map)
+(define-key map (kbd "C-u") nil)
+(define-key map (kbd "C-u") 'helm-M-x-universal-argument)
+(define-key map (kbd "C-]") 'helm-M-x-toggle-short-doc)
+map))
+
+(defcustom helm-M-x-show-short-doc nil
+  "Show short docstring of command when non nil.
+This value can be toggled with
+[helm-M-x-toggle-short-doc] while in helm-M-x session."
+  :group 'helm-command
+  :type 'boolean)
+
 
 ;;; Faces
 ;;
@@ -63,6 +79,10 @@
   "Face used by `helm-M-x' for activated modes."
   :group 'helm-command-faces)
 
+(defface helm-M-x-short-doc
+'((t :box (:line-width -1) :foreground "DimGray"))
+"Face used by `helm-M-x' for short docstring."
+  :group 'helm-command-faces)
 
 (defvar helm-M-x-input-history nil)
 (defvar helm-M-x-prefix-argument nil
@@ -101,6 +121,10 @@ Return nil if no mode-map found."
 (when (and map-sym (boundp map-sym))
   (helm-M-x-get-major-mode-command-alist (symbol-value map-sym)
 
+(defun helm-M-x-toggle-short-doc ()
+  (interactive)
+  (setq helm-M-x-show-short-doc (not helm-M-x-show-short-doc))
+  (helm-update (concat "^" (helm-get-selection
 
 (defun helm-M-x-transformer-1 (candidates &optional sort ignore-props)
   "Transformer function to show bindings in emacs commands.
@@ -111,11 +135,15 @@ Note that SORT should not be used when fuzzy matching 
because
 fuzzy matching is running its own sort function with a different
 algorithm."
   (with-helm-current-buffer
-(cl-loop with local-map = (helm-M-x-current-mode-map-alist)
+(cl-loop with max-len = (when helm-M-x-show-short-doc
+  (cl-loop for i in candidates maximize (length 
i)))
+ with local-map = (helm-M-x-current-mode-map-alist)
   for cand in candidates
   for local-key  = (car (rassq cand local-map))
   for key= (substitute-command-keys (format "\\[%s]" cand))
   for sym= (intern (if (consp cand) (car cand) cand))
+  for doc = (when max-len
+  (helm-get-first-line-documentation (intern-soft cand)))  
 
   for disp   = (if (or (eq sym major-mode)
(and (memq sym minor-mode-list)
 (boundp sym)
@@ -125,15 +153,25 @@ algorithm."
   unless (and (null ignore-props) (or (get sym 'helm-only) (get sym 
'no-helm-mx)))
   collect
   (cons (cond ((and (string-match "^M-x" key) local-key)
-   (format "%s %s"
-   disp (propertize
- " " 'display
- (propertize local-key 'face 
'helm-M-x-key
-  ((string-match "^M-x" key) disp)
-  (t (format "%s %s"
- disp (propertize
-   " " 'display
-   (propertize key 'face 'helm-M-x-key)
+   (format "%s %s %s %s"
+   disp
+   (if doc (make-string (+ 2 (- max-len (+ (length 
cand ? ) "")
+   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
+   (propertize
+" " 'display
+(propertize local-key 'face 'helm-M-x-key
+  ((string-match "^M-x" key)
+   (format "%s %s %s"
+   disp
+   (if doc (make-string (+ 2 (- max-len (+ (length 
cand ? ) "")
+   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
+  (t (format "%s %s %s %s"
+ disp
+ (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+ (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
+ (propertize
+  " " 'display
+  (propertize key 'face 'helm-M-x-key)
 cand)
   into ls
   finally return
@@ -175,13 +213,6 @@ algorithm."
   (push (substring (helm-cmd--get-current-fun

[nongnu] elpa/helm 155227133c 3/3: Add no-helm-mx prop to helm-M-x-toggle-short-doc

2022-04-15 Thread ELPA Syncer
branch: elpa/helm
commit 155227133cac17c5db8a47e2cf937d9b77ed15ac
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Add no-helm-mx prop to helm-M-x-toggle-short-doc

Add docstring as well.
---
 helm-command.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/helm-command.el b/helm-command.el
index 5d465daff9..9b08cda691 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -122,9 +122,11 @@ Return nil if no mode-map found."
   (helm-M-x-get-major-mode-command-alist (symbol-value map-sym)
 
 (defun helm-M-x-toggle-short-doc ()
+  "Toggle short doc display in helm-M-x."
   (interactive)
   (setq helm-M-x-show-short-doc (not helm-M-x-show-short-doc))
   (helm-update (concat "^" (helm-get-selection
+(put 'helm-M-x-toggle-short-doc 'no-helm-mx t)
 
 (defun helm-M-x-transformer-1 (candidates &optional sort ignore-props)
   "Transformer function to show bindings in emacs commands.



[nongnu] elpa/helm 35895c699c 2/3: Reindent only

2022-04-15 Thread ELPA Syncer
branch: elpa/helm
commit 35895c699cc24405273a9384270bb7de258b2d2f
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Reindent only
---
 helm-command.el | 76 -
 1 file changed, 38 insertions(+), 38 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index 39197b0fc8..5d465daff9 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -138,44 +138,44 @@ algorithm."
 (cl-loop with max-len = (when helm-M-x-show-short-doc
   (cl-loop for i in candidates maximize (length 
i)))
  with local-map = (helm-M-x-current-mode-map-alist)
-  for cand in candidates
-  for local-key  = (car (rassq cand local-map))
-  for key= (substitute-command-keys (format "\\[%s]" cand))
-  for sym= (intern (if (consp cand) (car cand) cand))
-  for doc = (when max-len
-  (helm-get-first-line-documentation (intern-soft cand)))  
 
-  for disp   = (if (or (eq sym major-mode)
-   (and (memq sym minor-mode-list)
-(boundp sym)
-(buffer-local-value sym 
helm-current-buffer)))
-   (propertize cand 'face 
'helm-command-active-mode)
- cand)
-  unless (and (null ignore-props) (or (get sym 'helm-only) (get sym 
'no-helm-mx)))
-  collect
-  (cons (cond ((and (string-match "^M-x" key) local-key)
-   (format "%s %s %s %s"
-   disp
-   (if doc (make-string (+ 2 (- max-len (+ (length 
cand ? ) "")
-   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
-   (propertize
-" " 'display
-(propertize local-key 'face 'helm-M-x-key
-  ((string-match "^M-x" key)
-   (format "%s %s %s"
-   disp
-   (if doc (make-string (+ 2 (- max-len (+ (length 
cand ? ) "")
-   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
-  (t (format "%s %s %s %s"
- disp
- (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
- (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
- (propertize
-  " " 'display
-  (propertize key 'face 'helm-M-x-key)
-cand)
-  into ls
-  finally return
-  (if sort (sort ls #'helm-generic-sort-fn) ls
+ for cand in candidates
+ for local-key  = (car (rassq cand local-map))
+ for key= (substitute-command-keys (format "\\[%s]" cand))
+ for sym= (intern (if (consp cand) (car cand) cand))
+ for doc = (when max-len
+ (helm-get-first-line-documentation (intern-soft 
cand)))   
+ for disp   = (if (or (eq sym major-mode)
+  (and (memq sym minor-mode-list)
+   (boundp sym)
+   (buffer-local-value sym 
helm-current-buffer)))
+  (propertize cand 'face 
'helm-command-active-mode)
+cand)
+ unless (and (null ignore-props) (or (get sym 'helm-only) (get sym 
'no-helm-mx)))
+ collect
+ (cons (cond ((and (string-match "^M-x" key) local-key)
+  (format "%s %s %s %s"
+  disp
+  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
+  (propertize
+   " " 'display
+   (propertize local-key 'face 
'helm-M-x-key
+ ((string-match "^M-x" key)
+  (format "%s %s %s"
+  disp
+  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
+ (t (format "%s %s %s %s"
+disp
+(if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+(if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
+(propertize
+  

[nongnu] elpa/helm-core updated (5546efa7d1 -> 155227133c)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  5546efa7d1 Prevent saving new directories to file-name-history
  adds  fef33e1283 Allow toggling short doc in helm-M-x (#2496)
  adds  35895c699c Reindent only
  adds  155227133c Add no-helm-mx prop to helm-M-x-toggle-short-doc

No new revisions were added by this update.

Summary of changes:
 helm-command.el | 99 ++---
 helm-help.el|  4 ++-
 2 files changed, 69 insertions(+), 34 deletions(-)



[elpa] externals/corfu 624d45553f: README: Link to @AkibAzmain WIP Corfu popup package

2022-04-15 Thread ELPA Syncer
branch: externals/corfu
commit 624d45553f9d93e2345b2580dbd3ccf83950ef5e
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Link to @AkibAzmain WIP Corfu popup package

https://codeberg.org/akib/emacs-corfu-popup
---
 README.org | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 5ede421f26..908c544715 100644
--- a/README.org
+++ b/README.org
@@ -26,8 +26,10 @@ not include its own completion backends. The Emacs built-in 
Capfs and the Capfs
 provided by other programming language packages are usually sufficient. A few
 additional Capfs and completion utilities are provided by the 
[[https://github.com/minad/cape][Cape]] package.
 
-*NOTE*: Corfu uses child frames to show the popup. For now Corfu falls back to 
the
-default setting of the ~completion-in-region-function~ on non-graphical 
displays.
+*NOTE*: Corfu uses child frames to show the popup and falls back to the default
+setting of the ~completion-in-region-function~ on non-graphical displays. 
There is
+a [[https://codeberg.org/akib/emacs-corfu-popup][package in the works]] which 
uses overlays for the popup such that Corfu can be
+used when Emacs is running in a terminal.
 
 [[https://github.com/minad/corfu/blob/screenshots/light.png?raw=true]]
 



[elpa] externals/tempel 2394b4a3d4: Remove tempel--path-timestamps variable

2022-04-15 Thread ELPA Syncer
branch: externals/tempel
commit 2394b4a3d45a60a32e0d97867dffe3790cf8c6d7
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove tempel--path-timestamps variable
---
 tempel.el | 13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/tempel.el b/tempel.el
index 4a3ed0ca83..0c4d7027f2 100644
--- a/tempel.el
+++ b/tempel.el
@@ -117,9 +117,6 @@ If a file is modified, added or removed, reload the 
templates."
 (defvar tempel--path-templates nil
   "Templates loaded from the `tempel-path'.")
 
-(defvar tempel--path-timestamps nil
-  "Alist of files and modification times on the `tempel-path'.")
-
 (defvar tempel--history nil
   "Completion history used by `tempel-insert'.")
 
@@ -390,7 +387,7 @@ PROMPT is the optional prompt/default value."
   "Prompt to save modified files in `tempel-path'."
   (cl-loop
with all = nil
-   for (file . _ts) in tempel--path-timestamps do
+   for (file . _ts) in (car tempel--path-templates) do
(when-let (buf (get-file-buffer file))
  (with-current-buffer buf
(when (and (buffer-modified-p)
@@ -441,11 +438,11 @@ This is meant to be a source in 
`tempel-template-sources'."
   (file-attribute-modification-time
(file-attributes f))
   'integer)
-  (unless (equal tempel--path-timestamps timestamps)
-(setq tempel--path-timestamps timestamps
-  tempel--path-templates (mapcan #'tempel--file-read files)
+  (unless (equal (car tempel--path-templates) timestamps)
+(setq tempel--path-templates (cons timestamps
+   (mapcan #'tempel--file-read 
files))
   (cl-loop
-   for (modes plist . templates) in tempel--path-templates
+   for (modes plist . templates) in (cdr tempel--path-templates)
if (tempel--condition-p modes plist)
append templates))
 



[nongnu] main ac876584fe 3/3: * elpa-packages (markdown-mode): Debloat package and add :news

2022-04-15 Thread Philip Kaludercic
branch: main
commit ac876584feaff44e39ec9d01c3138f20e7f96083
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

* elpa-packages (markdown-mode): Debloat package and add :news
---
 elpa-packages | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 16f6d71e1e..734584008d 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -343,6 +343,8 @@
 
  ("markdown-mode"  :url "https://github.com/jrblevin/markdown-mode";
   :readme "README.md"
+  :ignored-files ("scripts" "tests" "Makefile" "webpage.sh")
+  :news "CHANGES.md"
   ;; Not needed any more:
   ;; :dont-release "-dev\\'"
   :news "CHANGES.md")



[nongnu] main 376eb5a4f9 2/3: * elpa-packages (xah-fly-keys): New package

2022-04-15 Thread Philip Kaludercic
branch: main
commit 376eb5a4f9b027bfb47203b8baf54a525eb8e8e4
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

* elpa-packages (xah-fly-keys): New package
---
 elpa-packages | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 8589ab6bf3..16f6d71e1e 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -574,6 +574,9 @@
   :readme "README.md"
   :ignored-files ("COPYING" "tests" "Makefile" ".travis.yml"))
 
+ ("xah-fly-keys":url "https://github.com/xahlee/xah-fly-keys";
+  :ignored-files ("*.png"))
+
  ("xml-rpc" :url "https://github.com/xml-rpc-el/xml-rpc-el.git";
   :readme "README.org"
   :ignored-files ("LICENSE" ".github" "Makefile" "xml-rpc-test.el"))



[nongnu] main 5066ea4028 1/3: * elpa-packages (gnu-apl-mode): New package

2022-04-15 Thread Philip Kaludercic
branch: main
commit 5066ea4028d5a82205634e52fe3ebc1f10a9d2e9
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

* elpa-packages (gnu-apl-mode): New package
---
 elpa-packages | 4 
 1 file changed, 4 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index c008f8c6af..8589ab6bf3 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -194,6 +194,10 @@
  ("geiser-racket"  :url "https://gitlab.com/emacs-geiser/racket.git";)
  ("geiser-stklos"  :url "https://gitlab.com/emacs-geiser/stklos.git";)
 
+ ("gnu-apl-mode":url "https://github.com/lokedhs/gnu-apl-mode";
+  ;; :doc "texi/gnu-apl-mode.texi" ; the manual is currently empty
+  :ignored-files ("Makefile"))
+
  ("gnuplot":url "https://github.com/emacs-gnuplot/gnuplot";
   :ignored-files ("LICENSE" "Makefile" "gpelcard.tex")
   :news "CHANGELOG.org")



[nongnu] main updated (a9b1988f9c -> ac876584fe)

2022-04-15 Thread Philip Kaludercic
zge pushed a change to branch main.

  from  a9b1988f9c * elpa-packages (coffee-mode): Move from GNU ELPA
   new  5066ea4028 * elpa-packages (gnu-apl-mode): New package
   new  376eb5a4f9 * elpa-packages (xah-fly-keys): New package
   new  ac876584fe * elpa-packages (markdown-mode): Debloat package and add 
:news


Summary of changes:
 elpa-packages | 9 +
 1 file changed, 9 insertions(+)



[nongnu] branch elpa/gnu-apl-mode created (now c8695b0d55)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch elpa/gnu-apl-mode.

at  c8695b0d55 Merge pull request #43 from phikal/elpa/gnu-apl-mode

This branch includes the following new commits:

   new  6d310ee03f Initial commit
   new  5601b1c422 Further work on implementing the full keymap
   new  8f7c672087 Included a link tot he keymap as a comment
   new  3ad4b71106 Started work on a better input mode
   new  dd2d737bc1 Make sure the input mode definition values are in the 
correct order
   new  b2aea195cb Some further work on the keymap
   new  af9011b45b Fixed the APL input mode
   new  6f9cdaa74e Allow configuration of a default font
   new  eeaa34e5a8 Disable the use of buffer-face-mode
   new  3c136568c9 Fixed some key definitions
   new  517b679995 Started work on the syntax table
   new  7a20fc2ff6 Added font workaround for OSX
   new  8a62ed5d0f Make sure the output is not echoed
   new  c0fa05e2d5 Separated out the interactive gnu apl mode from the 
normal file edit mode
   new  1886d79f3d Enable APL mode when opening an APL file.
   new  4b1b2907ff Revert "Enable APL mode when opening an APL file."
   new  4bab58290a Fixed a bug that was triggered by having the same mode 
map in more than one mode
   new  5fe253c40d Made sure apl mode is activated when editing APL files
   new  43a628835b Implemented a command to send a region to the APL session
   new  d05d8d00d8 Update comint prompt regexp
   new  855ff4ed36 Retored the --noCIN flag
   new  04dd37c3da Updated README
   new  6dfd2c680d Updated the prompt regex to prevent a hang when defining 
functions
   new  b505e3fa4c Some fixes to the keymap
   new  7fd7cf2a56 Added documentation data
   new  9606e133d1 Enable comint-process-echoes
   new  f15ffc13a1 Added .apl.history to .gitignore
   new  1beb551cc4 Updated documentation strings a bit
   new  937ffcad56 Fixed a documentation entry
   new  92d7a60984 Added .hgignore
   new  e07167fdab Started building the keymap help screen
   new  040e58523b Added a missing character in the keymap
   new  f0ee41a3d5 Added some more missing characters
   new  7dbd09ec01 In the input mode, repeating the prefix character will 
produce the character itself
   new  0de5fcc52b Updated README
   new  00cd297c56 Some code cleanup
   new  3d197e241d Started work on interactive function editor
   new  7d9692b2c1 Further work on function editor. Opening a function now 
works, saving does not
   new  d5a7c9410b Interim commit while working on the function editor
   new  76c37401b1 Function editor generally works now. Still not perfectly 
smooth.
   new  dc65207ffd Initial implementation of automatic detection of 
function definitions
   new  bfd49f5dc8 Removed a call to an internal debug function
   new  ceb0cca8b5 Fixed a bug where the final newline in a function 
definition was not added correctly.
   new  e0e26d40ac Restore the window configuration after editing a function
   new  6651ffbdee Removed a comment in the README that explained that this 
is a very early version. It's not so early anymore.
   new  79ef5e5746 Cleaned up the function editor
   new  e1ef2ba5dc Implemented eldoc support
   new  5157722291 Add a configuration option allowing the user to choose 
if he wants the function editor to open automatically.
   new  902465735c Improve parsing so that it takes advantage of the new 
output features in GNU APL
   new  8d717161c3 Compatibility fix for older Emacs versions
   new  7bd8a6d794 Some fixes that preventing proper parsing of output on 
OSX
   new  a407b7cf7f Don't use the --noCIN flag
   new  215d16431c Make the matching of "ignore end" a bit looser
   new  a329c0fecf Updated documentation for ⊂ and ⊃
   new  a3bb1a768d Don't hide output from function definition phase
   new  e4bfd343b4 Added documentation for monadic ↑
   new  6bb8585ea5 The keymap accidentally used ε instad of ∈.
   new  f20b85de3a Add initial support for parsing the output from the 
--emacs flag
   new  f265e7352b Add a require of thingatpt
   new  deb02b54d2 Added stream-detection using the new --emacs flag
   new  d44e31e320 If gnu-apl is called with a prefix arg, ask for the path 
to the apl interpreter
   new  ed384d1177 Added documentation for the ∪ function
   new  ce7ed137f8 Documentation updates
   new  60b2cc9349 Remove debug message
   new  3cf463e0f2 Updated README to mention the fact that the svn version 
of GNU APL is needed.
   new  ac32c7b166 Underscore is a valid APL symbol character
   new  8c6bd44fef Added some docstrings
   new  fb76c6edb6 Add support for the new app-error tag
   new  e57de2f63f Fixed a bug when fontifying error messages
   new  3e7ee421a4 Improved the presentation of eldoc help messages
   new  375bbb7abb Renamed interact

[nongnu] branch elpa/xah-fly-keys created (now 1c883548f0)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch elpa/xah-fly-keys.

at  1c883548f0 changed key for xah-clean-whitespace, insert-char, 
xah-insert-unicode, xah-insert-double-angle-bracket.

This branch includes the following new commits:

   new  4b05b7b10a separated from xah_emacs_init
   new  6a8aa371c6 added a readme
   new  4eb7e7670c fixed README
   new  965b1abdb4 added dependent functions.
   new  4466dc6003 major cleanup. Now space key goes to insert mode, while 
in command mode.
   new  e6a0bcdb21 fixed xah-backward-block
   new  bb5d33cdfc added prefix arg for xah-cut-line-or-region, 
xah-copy-line-or-region
   new  438c06cbdc fixed xah-backward-block
   new  ff5d8516f0 added key 1 to go to insert mode, while in cmd mode
   new  3a35f1544b normal
   new  0aad71b1bc fixed the bug where default syntax gets modified
   new  f784a7601d She's been a thespian since the age of 12, performing in 
local community and regional theatre. 
http://wordyenglish.com/words/words_16.html
   new  4f7e3da360 fixed xah-forward-block, xah-backward-block, 
xah-beginning-of-line-or-block, xah-end-of-line-or-block
   new  2aa4c1b89a more fix
   new  99c1eaa877 added xah-toggle-previous-letter-case
   new  646fc52b45 AVN lambasted Hustler for having the temerity to 
question AVN's awards. http://wordyenglish.com/words/satwords_2.html
   new  ec4afc47b5 removed experimented ban shift key. problem is in 
isearch etc wont work
   new  1955619a75 added xah-insert-space-after
   new  991b12940f code cleanup. no visible user change.
   new  fbd0074517 added command and keys to switch prev/next buffer
   new  adac9e88cf trivial refactoring
   new  c7af93fd8f minor code cleanup for xah-recently-closed-buffers
   new  f9b7c04bf9 set keys / = [ ] to insert themselfs
   new  79775e8686 major change. Added key map for ALL emacs's keys, C-x 
and others, except C-c.
   new  3c50695269 fix prev commit
   new  c5b8e3484b added xah-open-file-path-under-cursor etc.
   new  83ca923d2d Happy Hacking today, Happy Hacking everyday 
http://xahlee.info/kbd/idiocy_of_happy_hacking_keyboard.html
   new  47d276e9c5 introduced xah-delete-current-line. experimental
   new  e9893c9be8 added tens of commands, imported from xah init
   new  10b001b6fd added several commands
   new  b24d2072fc added several files for setting modifier keys
   new  6da3d1e933 more experiments
   new  6ac184caa3 more tweaks
   new  4c3c3d5dd3 change is good
   new  0f1b18f9c6 added key for xah-asciify-region
   new  86957982c6 style tweak on xah-shrink-whitespaces
   new  fb314e27e0 improved inline doc. modified a hook for help mode.
   new  c1a781a242 more key experiment
   new  e144db5305 undefine the pesky C-z suspend-frame
   new  929b8b312b added clojure temp solution to xah-run-current-file. 
removed Ctrl+0
   new  ecda6b7f93 xah-run-current-file has simpler temp file naming.
   new  441094e89e hook to modify cider-repl-mode keys
   new  3eb0b485a4 set  to do Ctrl+g
   new  183f960325 experimental. set a command to x and b keys.
   new  22aaa456d1 README.md is more clear.
   new  edb83c1ec8 more changes
   new  963e424a9b set l to xah-forward-punct, and other change
   new  709248b34b key change for copy-to-register, insert-to-register
   new  821a74931d changed xah-menu-tab-keymap, 【menu a】 to select all, 
【menu a】 to nil,
   new  bd5e514cf2 improved auto path selection for xah-open-file-at-cursor
   new  a59bbb regular update
   new  3f41b157ca renamed some keymap, other normal update. renamed 
xah-fly-keys-some-keymap.el → xah-fly-keys-user-keymap.el moved help keymap to 
its own file xah-fly-keys-help-keymap.el
   new  c16e21c0f1 removed the ~7 standard keys for open, close, save, etc.
   new  e1faf748f9 changed isearch key: f11 f12 for backward/forward, page 
up/down for prev/next isearch'd string.
   new  26356ccaa0 regular update
   new  99d99dcee6 regular update
   new  3180cee6e4 regular update. some key change
   new  0968bc7f9d regular update
   new  74c7776091 added feature to skip dired buffer in 
xah-next-user-buffer, xah-previous-user-buffer
   new  b04f248967 added xah-search-current-word
   new  00aaf996ef trivial inline doc improvement
   new  8e4cf3c163 normal
   new  7cc585c8b1 new xah-compact-newline-whitespaces-to-space, and 
modified xah-compact-uncompact-block
   new  8522920795 normal update
   new  3a61484483 normal
   new  35c2eb5783 normal
   new  60528f945e normal
   new  54c33c3f4d normal
   new  71974f1a3c normal
   new  231abee7ac added xah-escape-quotes and other
   new  98cc12bb98 normal
   new  30e84abac7 normal, experiment with keys
   new  40d01e7a69 back to old xah-select-text-in-quote
   new  cee5544f04 added a bunch of keys related to encod

[nongnu] elpa/helm 7c1b872d26 2/2: Merge pull request #2500 from Horrih/fix-doc-whitespace

2022-04-15 Thread ELPA Syncer
branch: elpa/helm
commit 7c1b872d267d4b78b9e1b48974b4f98183587354
Merge: 155227133c 2a472c336d
Author: Thierry Volpiatto 
Commit: GitHub 

Merge pull request #2500 from Horrih/fix-doc-whitespace

Remove whitespace in helm-M-x
---
 helm-command.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index 9b08cda691..4ba966b4d3 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -155,21 +155,21 @@ algorithm."
  unless (and (null ignore-props) (or (get sym 'helm-only) (get sym 
'no-helm-mx)))
  collect
  (cons (cond ((and (string-match "^M-x" key) local-key)
-  (format "%s %s %s %s"
+  (format "%s%s%s %s"
   disp
-  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
   (propertize
" " 'display
(propertize local-key 'face 
'helm-M-x-key
  ((string-match "^M-x" key)
-  (format "%s %s %s"
+  (format "%s%s%s"
   disp
-  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
- (t (format "%s %s %s %s"
+ (t (format "%s%s%s %s"
 disp
-(if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+(if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
 (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
 (propertize
  " " 'display



[nongnu] elpa/helm 2a472c336d 1/2: Remove whitespace in helm-M-x

2022-04-15 Thread ELPA Syncer
branch: elpa/helm
commit 2a472c336dad2693e2c628e0de7be1e2437204fb
Author: Charles Gonnaud 
Commit: Charles Gonnaud 

Remove whitespace in helm-M-x

If show-trailing-whitespace is set to true globally, it leads to an ugly
completion buffer.
---
 helm-command.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index 9b08cda691..4ba966b4d3 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -155,21 +155,21 @@ algorithm."
  unless (and (null ignore-props) (or (get sym 'helm-only) (get sym 
'no-helm-mx)))
  collect
  (cons (cond ((and (string-match "^M-x" key) local-key)
-  (format "%s %s %s %s"
+  (format "%s%s%s %s"
   disp
-  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
   (propertize
" " 'display
(propertize local-key 'face 
'helm-M-x-key
  ((string-match "^M-x" key)
-  (format "%s %s %s"
+  (format "%s%s%s"
   disp
-  (if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+  (if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
- (t (format "%s %s %s %s"
+ (t (format "%s%s%s %s"
 disp
-(if doc (make-string (+ 2 (- max-len (+ 
(length cand ? ) "")
+(if doc (make-string (+ 4 (- max-len (+ 
(length cand ? ) "")
 (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
 (propertize
  " " 'display



[nongnu] elpa/helm-core updated (155227133c -> 7c1b872d26)

2022-04-15 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  155227133c Add no-helm-mx prop to helm-M-x-toggle-short-doc
  adds  2a472c336d Remove whitespace in helm-M-x
  adds  7c1b872d26 Merge pull request #2500 from Horrih/fix-doc-whitespace

No new revisions were added by this update.

Summary of changes:
 helm-command.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)



[elpa] externals/bbdb 715f35b5f5: Bug fix. New optional arg ident for bbdb-edit-field.

2022-04-15 Thread Roland Winkler
branch: externals/bbdb
commit 715f35b5f53d6bcdcb3754b4f98933df01b57c15
Author: Roland Winkler 
Commit: Roland Winkler 

Bug fix.  New optional arg ident for bbdb-edit-field.
---
 NEWS |   5 ++
 lisp/bbdb-com.el | 143 +++
 lisp/bbdb-mua.el |  18 +--
 lisp/bbdb.el |   2 +-
 4 files changed, 112 insertions(+), 56 deletions(-)

diff --git a/NEWS b/NEWS
index e742315e96..f9cd1e2464 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,11 @@ See the end of the file for license conditions.
 
 This file is about changes in BBDB version 3.
 
+* BBDB 3.2.2b
+** Bug fix
+
+** New optional arg ident for bbdb-edit-field.
+
 * BBDB 3.2.2a
 ** Bug fixes
 
diff --git a/lisp/bbdb-com.el b/lisp/bbdb-com.el
index 1e7207d53d..3ce285ea91 100644
--- a/lisp/bbdb-com.el
+++ b/lisp/bbdb-com.el
@@ -871,7 +871,7 @@ but does ensure that there will not be name collisions."
 
 record))
 
-(defun bbdb-read-name (&optional first-and-last dfirst dlast)
+(defun bbdb-read-name (&optional first-and-last dfirst dlast ident)
   "Read name for a record from minibuffer.
 FIRST-AND-LAST controls the reading mode:
 If it is 'first-last read first and last name separately.
@@ -881,6 +881,7 @@ If it is t read name parts separately, obeying
 `bbdb-read-name-format' if possible.
 Otherwise use `bbdb-read-name-format'.
 DFIRST and DLAST are default values for the first and last name.
+Add optional string IDENT to the prompt as identifier when reading name.
 Return cons with first and last name."
   (unless (memq first-and-last '(first-last last-first fullname))
 ;; We do not yet know how to read the name
@@ -889,18 +890,21 @@ Return cons with first and last name."
(not (memq bbdb-read-name-format '(first-last last-first
   'first-last
 bbdb-read-name-format)))
-  (let ((name (cond ((eq first-and-last 'last-first)
- (let (fn ln)
-   (setq ln (bbdb-read-string "Last Name: " dlast)
- fn (bbdb-read-string "First Name: " dfirst))
+  (let* ((f-prompt (concat ident "First name: "))
+ (l-prompt (concat ident "Last name: "))
+ (name (cond ((eq first-and-last 'last-first)
+  (let (fn ln)
+(setq ln (bbdb-read-string l-prompt dlast)
+  fn (bbdb-read-string f-prompt dfirst))
(cons fn ln)))
-((eq first-and-last 'first-last)
- (cons (bbdb-read-string "First Name: " dfirst)
-   (bbdb-read-string "Last Name: " dlast)))
-(t
- (bbdb-divide-name (bbdb-read-string
-"Name: " (bbdb-concat 'name-first-last
-  dfirst 
dlast)))
+ ((eq first-and-last 'first-last)
+  (cons (bbdb-read-string f-prompt dfirst)
+(bbdb-read-string l-prompt dlast)))
+ (t
+  (bbdb-divide-name (bbdb-read-string
+ (concat ident "Name: ")
+ (bbdb-concat 'name-first-last
+  dfirst dlast)))
 (if (string= (car name) "") (setcar name nil))
 (if (string= (cdr name) "") (setcdr name nil))
 name))
@@ -944,7 +948,7 @@ The following keywords are supported in SPEC:
[\"label\" area-code prefix suffix extension-or-nil]
or [\"label\" \"phone-number\"]
 :address VAL   List of addresses.  An address is a vector of the form
-   \[\"label\" (\"line1\" \"line2\" ... ) \"City\"
+   [\"label\" (\"line1\" \"line2\" ... ) \"City\"
\"State\" \"Postcode\" \"Country\"].
 :xfields VAL   Alist associating symbols with strings.
 :uuid VAL  String, the uuid.
@@ -1161,16 +1165,22 @@ A non-nil prefix arg is passed on to `bbdb-read-field' 
as FLAG (see there)."
(bbdb-read-xfield field init flag)
 
 ;;;###autoload
-(defun bbdb-edit-field (record field &optional value flag)
+(defun bbdb-edit-field (record field &optional value flag ident)
   "Edit the contents of FIELD of RECORD.
 If point is in the middle of a multi-line field (e.g., address),
 then the entire field is edited, not just the current line.
 For editing phone numbers or addresses, VALUE must be the phone number
 or address that gets edited. An error is thrown when attempting to edit
-a phone number or address with VALUE being nil.
+a phone number or address with VALUE being nil.  Other fields will be
+newly created when calling this function and these fields are not yet
+defined for RECORD.
 
-- The value of an xfield is a string.  With prefix FLAG the value may be
-  any lisp object."
+The value of an xfie

[elpa] externals/org-remark 224ef1db39 2/2: docs: align term main file -> source file except code

2022-04-15 Thread ELPA Syncer
branch: externals/org-remark
commit 224ef1db3948b655c554a63580db1a72a1ef6dd2
Author: Noboru Ota 
Commit: Noboru Ota 

docs: align term main file -> source file except code
---
 docs/org-remark.org | 14 +++---
 org-remark.el   |  8 
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/docs/org-remark.org b/docs/org-remark.org
index 84d21e17bf..38fd1559d7 100644
--- a/docs/org-remark.org
+++ b/docs/org-remark.org
@@ -217,7 +217,7 @@ The marginal notes file stores highlights and notes like 
this below; it is desig
   [...]
 #+end_src
 
-You can leave the marginal notes file as it is without writing any notes. In 
this case, the entries in marginal notes file simply save the locations of your 
highlighted text. After you quit Emacs,  re-start it, and visit the same main 
file, Org-remark uses this information to highlight the text again.
+You can leave the marginal notes file as it is without writing any notes. In 
this case, the entries in marginal notes file simply save the locations of your 
highlighted text. After you quit Emacs,  re-start it, and visit the same source 
file, Org-remark uses this information to highlight the text again.
 
 In addition to the properties above that Org-remark reserves for itself, you 
can add your own custom properties and ~CATEGORY~ property. Use "org-remark-" 
as the prefix to the property names (or "CATEGORY", which is the only 
exception), and Org-remark put them to the property drawer of highlight's 
headline entry in the marginal notes buffer. Define the custom properties in 
your own custom pen functions (for how to create your own pens, 
[[#create-custom-pens][How to Create Custom Highligh [...]
 
@@ -240,15 +240,15 @@ The location of the marginal notes file is specified by 
user option ~org-remark-
 
 If you use the ~customize~ command to customize ~org-remark-notes-file-name~, 
you will have an option to choose a =File= or =Function= (customization group 
~org-remark~). The default is =File= with the default "marginalial.org" as 
noted above.  Use a string to specify the single file name; you can specify a 
relative path like the default or an absolute path.
 
-If you would like to dynamically change the location based on the file and 
various different conditions, select the function as an option.  The default 
function is ~org-remark-notes-file-name-function~. It adds =-notes.org= as a 
suffix to the source file's name without the extension. For example, for a file 
named =my-main-file.txt=,  Org-remark will store highlights in  
=my-main-file-notes.org=.  You can create your own function and use it.
+If you would like to dynamically change the location based on the file and 
various different conditions, select the function as an option.  The default 
function is ~org-remark-notes-file-name-function~. It adds =-notes.org= as a 
suffix to the source file's name without the extension. For example, for a file 
named =my-source-file.txt=,  Org-remark will store highlights in  
=my-source-file-notes.org=.  You can create your own function and use it.
 
-Some examples and use cases are listed below
+Some examples and use cases are listed below:
 
 - Store Marginal Notes in the Source File ::
   In order to use the source file also as the marginal notes file (storing the 
notes in the source file), you can set the built-in function ~buffer-file-name~ 
as the value of ~org-remark-notes-file-name~. Note that you will need to ensure 
that the source files are an Org file.
 
-- Create a marginal notes file for each main file and store all of them in a 
specific location ::
-  Create a custom function that returns an absolute file name per main file, 
and set ~org-remark-notes-file-name~ to the function name. It might look like 
this:
+- Create a marginal notes file for each source file and store all of them in a 
specific location ::
+  Create a custom function that returns an absolute file name per source file, 
and set ~org-remark-notes-file-name~ to the function name. It might look like 
this:
 
   #+begin_src elisp
 (defun my/function ()
@@ -313,7 +313,7 @@ The delete function will prompt for confirmation if it 
detects any notes present
 
 - Command ~org-remark-toggle~ ::
   Toggle showing/hiding of highlights in current buffer.
-  If you would like to hide/show the highlights in the current buffer, it is 
recommended to use this command instead of ~org-remark-mode~. This command only 
affects the display of the highlights and their locations are still kept 
tracked.  Toggling off ~org-remark-mode~ stops this tracking completely, which 
will likely result in inconsistency between the marginal notes file and the 
current main buffer.
+  If you would like to hide/show the highlights in the current buffer, it is 
recommended to use this command instead of ~org-remark-mode~. This command only 
affects the display of the highlights and their locations are still kept 
tracked.  Toggling off ~org-remark-mode~ stops this tracking compl

  1   2   >