[elpa] externals/hyperbole ccde7cfd59 2/3: Merge branch 'master' into rsw

2024-06-20 Thread ELPA Syncer
branch: externals/hyperbole
commit ccde7cfd59209b8e17c54fa3e3ddcff2cc7333bc
Merge: 12812f751d fbb6f81bcd
Author: bw 
Commit: bw 

Merge branch 'master' into rsw
---
 test/hyrolo-tests.el | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/test/hyrolo-tests.el b/test/hyrolo-tests.el
index 13444faf8b..609c98f433 100644
--- a/test/hyrolo-tests.el
+++ b/test/hyrolo-tests.el
@@ -3,7 +3,7 @@
 ;; Author:   Mats Lidell 
 ;;
 ;; Orig-Date:19-Jun-21 at 22:42:00
-;; Last-Mod: 18-May-24 at 20:14:05 by Bob Weiner
+;; Last-Mod:  1-Jun-24 at 16:49:47 by Mats Lidell
 ;;
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;;
@@ -1612,22 +1612,21 @@ body
 
 (ert-deftest hyrolo-tests--goto-kotl-header-with-slash-match ()
   "Move from heading match to target line with a slash in kotl file."
-  :expected-result :failed
-  (let* ((kotl-file1 (hyrolo-tests--gen-kotl-outline "h1" "body" 1))
+  (let* ((kotl-file1 (hyrolo-tests--gen-kotl-outline "h1 / h2" "body" 1))
  (hyrolo-file-list (list kotl-file1)))
 (unwind-protect
 (progn
  (kotl-mode:beginning-of-buffer)
-  (hyrolo-grep "h1/h1 1")
+  (hyrolo-grep "h2")
   (action-key)
   (should (string= (buffer-file-name) kotl-file1))
-  (should (looking-at-p "h1 1$"))
+  (should (looking-at-p "h1 / h2$"))
   (should (string= (buffer-substring-no-properties (point-min) 
(point-max))
"\
-   1. h1
+   1. h1 / h2
   body
 
- 1a. h2
+ 1a. h1 / h2 1
  body 1
 
 "   )))



[elpa] externals/hyperbole 12812f751d 1/3: hywiki.el - Fix performance and correctness issues; improve tests

2024-06-20 Thread ELPA Syncer
branch: externals/hyperbole
commit 12812f751dfc8dae0e4947782dce842584461d98
Author: bw 
Commit: bw 

hywiki.el - Fix performance and correctness issues; improve tests
---
 ChangeLog|  80 ++
 hsys-org.el  |   8 +-
 hypb.el  |  12 +-
 hywiki.el| 422 +--
 test/hywiki-tests.el |  48 +++---
 5 files changed, 389 insertions(+), 181 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 91c8aa866f..8292fd24da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,85 @@
+2024-06-19  Bob Weiner  
+
+* test/hywiki-tests.el (hywiki-tests--face-property-for-wikiword-with-wikipage,
+hywiki-tests--no-face-property-for-no-wikipage): Basic
+improvements.
+
+* hywiki.el (hywiki-highlight-page-name): Ensure either 'hywiki-mode'
+or (hywiki-in-page-p) is true and not in the minibuffer.
+(hywiki-buttonize-character-commands,
+ hywiki-buttonize-non-character-commands): Move most checks to
+'hywiki-highlight-page-name'.
+(hywiki-page-flag): Add as internal buffer-local flag set when
+current buffer is a HyWiki page.
+(hywiki-highlight-page-name): Rename all such prefixed functions to
+'hywiki-maybe-highlight-page-name'.
+(hywiki-active-in-current-buffer-p): Exclude minibuffer.
+   (hywiki-maybe-highlight-page-name): Test with
+'hywiki-active-in-current-buffer-p'.
+(hywiki-dehighlight-page-names): Rename to
+'hywiki-maybe-dehighlight-page-names'.
+(hywiki-mode): Remove auto-HyWikiWord highlighting/dehighlighting 
from
+the minor mode and associate it with the setting of 
'hywiki-word-highlight-flag'
+so that the same hooks can be used for HyWikiWord page highlighting as are 
used
+in all buffers when 'hywiki-mode' is enabled.
+(defib hywiki-word):
+(hywiki-find-page): Move call of (hywiki-maybe-highlight-page-name 
t)
+here from the defib since may need to create the page before highlighting 
will
+work properly.
+(hywiki-maybe-highlight-page-name): Skip back over buttonize-chars 
only
+when 'on-page-name' is nil.  Also, remove sanity check line which fails 
when
+called from control-key cmds like C-o (open-line):
+  (eq (char-before) last-command-event) ;; Sanity check
+(hywiki-word-at): Fix doc to explain when this returns non-nil.
+(hywiki-maybe-highlight-page-names): Fix setting of 
hywiki--start/end
+and prevent infinite looping due to wrong positions.
+(hywiki-word-highlight-flag-changed): Fix remove-hook from
+'post-command-hook' to remove the correct function.
+
+2024-06-17  Bob Weiner  
+
+* hywiki.el (hywiki-mode): Require 'hyperbole.
+(find-file-hook): Remove 'hywiki-find-page hook and just highlight 
when
+any frame window changes what buffer it displays.
+(hywiki-buttonize-character-commands,
+ hywiki-buttonize-non-character-commands): Do this only if not in 
an
+active minibuffer window.
+
+2024-06-16  Bob Weiner  
+
+* hywiki.el (hywiki--buttonize-characters): Remove setting from `hywiki-mode' 
and
+set when hywiki library is loaded.
+(hywiki--word-and-buttonize-character-regexp): Add.
+   (hywiki-highlight-page-name, hywiki-word-at,
+hywiki-highlight-page-names) Use above regexp.
+(hywiki--buttonize-character-regexp): Add and use in
+'hywiki--word-and-buttonize-character-regexp'.
+
+2024-06-09  Bob Weiner  
+
+* hywiki.el (hywiki-word-highlight-flag-changed): Disable 'hywiki-mode'
+when disabling this global flag.
+(hywiki-at-wikiword): Rename to 'hywiki-word-at' for consistency.
+   (hywiki-mode): When enabling, enable `hywiki-word-highlight-flag' 
too.
+   (hywiki-word-with-optional-section-exact-regexp): Fix doc to reflect
+that regexp allows spaces and tabs.
+(hywiki-buffer-highlighted-state): Add to skip HyWikiWord 
highlighting/
+dehighlighting per buffer if already done.  Set it in
+'hywiki-maybe-highlight-page-names' and 
'hywiki-maybe-dehighlight-page-names'.
+
+2024-06-08  Bob Weiner  
+
+* hypb.el (hypb:split-seq-into-sublists): Add for use with hywiki.
+
+* hywiki.el (hywiki-grep-tags): Fix so `org-redo-cmd' works properly.
+
 2024-06-02  Bob Weiner  
 
+* hywiki.el (hywiki--pages-directory): Add to track changes in
+'hywiki-directory'.
+(hywiki-make-pages-hasht, hywiki-get-page-hasht): Use above new
+variable to rebuild hash table whenever directory changes.
+
 * hyperbole.el (hyperbole--disable-mode): Add disabling of 'hywiki-mode'.
 
 * hywiki.el (hywiki-active-in-current-buffer-p): Exclude buffers whose
diff --git a/hsys-org.el b/hsys-org.el
index f736c45d2a..13543dd44c 100644
--- a/hsys-org.el
+++ b/hsys-org.el
@@ -3,7 +3,7 @@
 ;; Author:   Bob Weiner
 ;;
 ;; Orig-Date: 2-Jul-16 

[elpa] externals/hyperbole c4cfe68db8 3/3: Merge pull request #541 from rswgnu/rsw

2024-06-20 Thread ELPA Syncer
branch: externals/hyperbole
commit c4cfe68db84a8b682a589791a336ce3c42899e34
Merge: fbb6f81bcd ccde7cfd59
Author: Robert Weiner 
Commit: GitHub 

Merge pull request #541 from rswgnu/rsw

hywiki.el - Fix performance and correctness issues; improve tests
---
 ChangeLog|  80 ++
 hsys-org.el  |   8 +-
 hypb.el  |  12 +-
 hywiki.el| 422 +--
 test/hywiki-tests.el |  48 +++---
 5 files changed, 389 insertions(+), 181 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 91c8aa866f..8292fd24da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,85 @@
+2024-06-19  Bob Weiner  
+
+* test/hywiki-tests.el (hywiki-tests--face-property-for-wikiword-with-wikipage,
+hywiki-tests--no-face-property-for-no-wikipage): Basic
+improvements.
+
+* hywiki.el (hywiki-highlight-page-name): Ensure either 'hywiki-mode'
+or (hywiki-in-page-p) is true and not in the minibuffer.
+(hywiki-buttonize-character-commands,
+ hywiki-buttonize-non-character-commands): Move most checks to
+'hywiki-highlight-page-name'.
+(hywiki-page-flag): Add as internal buffer-local flag set when
+current buffer is a HyWiki page.
+(hywiki-highlight-page-name): Rename all such prefixed functions to
+'hywiki-maybe-highlight-page-name'.
+(hywiki-active-in-current-buffer-p): Exclude minibuffer.
+   (hywiki-maybe-highlight-page-name): Test with
+'hywiki-active-in-current-buffer-p'.
+(hywiki-dehighlight-page-names): Rename to
+'hywiki-maybe-dehighlight-page-names'.
+(hywiki-mode): Remove auto-HyWikiWord highlighting/dehighlighting 
from
+the minor mode and associate it with the setting of 
'hywiki-word-highlight-flag'
+so that the same hooks can be used for HyWikiWord page highlighting as are 
used
+in all buffers when 'hywiki-mode' is enabled.
+(defib hywiki-word):
+(hywiki-find-page): Move call of (hywiki-maybe-highlight-page-name 
t)
+here from the defib since may need to create the page before highlighting 
will
+work properly.
+(hywiki-maybe-highlight-page-name): Skip back over buttonize-chars 
only
+when 'on-page-name' is nil.  Also, remove sanity check line which fails 
when
+called from control-key cmds like C-o (open-line):
+  (eq (char-before) last-command-event) ;; Sanity check
+(hywiki-word-at): Fix doc to explain when this returns non-nil.
+(hywiki-maybe-highlight-page-names): Fix setting of 
hywiki--start/end
+and prevent infinite looping due to wrong positions.
+(hywiki-word-highlight-flag-changed): Fix remove-hook from
+'post-command-hook' to remove the correct function.
+
+2024-06-17  Bob Weiner  
+
+* hywiki.el (hywiki-mode): Require 'hyperbole.
+(find-file-hook): Remove 'hywiki-find-page hook and just highlight 
when
+any frame window changes what buffer it displays.
+(hywiki-buttonize-character-commands,
+ hywiki-buttonize-non-character-commands): Do this only if not in 
an
+active minibuffer window.
+
+2024-06-16  Bob Weiner  
+
+* hywiki.el (hywiki--buttonize-characters): Remove setting from `hywiki-mode' 
and
+set when hywiki library is loaded.
+(hywiki--word-and-buttonize-character-regexp): Add.
+   (hywiki-highlight-page-name, hywiki-word-at,
+hywiki-highlight-page-names) Use above regexp.
+(hywiki--buttonize-character-regexp): Add and use in
+'hywiki--word-and-buttonize-character-regexp'.
+
+2024-06-09  Bob Weiner  
+
+* hywiki.el (hywiki-word-highlight-flag-changed): Disable 'hywiki-mode'
+when disabling this global flag.
+(hywiki-at-wikiword): Rename to 'hywiki-word-at' for consistency.
+   (hywiki-mode): When enabling, enable `hywiki-word-highlight-flag' 
too.
+   (hywiki-word-with-optional-section-exact-regexp): Fix doc to reflect
+that regexp allows spaces and tabs.
+(hywiki-buffer-highlighted-state): Add to skip HyWikiWord 
highlighting/
+dehighlighting per buffer if already done.  Set it in
+'hywiki-maybe-highlight-page-names' and 
'hywiki-maybe-dehighlight-page-names'.
+
+2024-06-08  Bob Weiner  
+
+* hypb.el (hypb:split-seq-into-sublists): Add for use with hywiki.
+
+* hywiki.el (hywiki-grep-tags): Fix so `org-redo-cmd' works properly.
+
 2024-06-02  Bob Weiner  
 
+* hywiki.el (hywiki--pages-directory): Add to track changes in
+'hywiki-directory'.
+(hywiki-make-pages-hasht, hywiki-get-page-hasht): Use above new
+variable to rebuild hash table whenever directory changes.
+
 * hyperbole.el (hyperbole--disable-mode): Add disabling of 'hywiki-mode'.
 
 * hywiki.el (hywiki-active-in-current-buffer-p): Exclude buffers whose
diff --git a/hsys-org.el b/hsys-org.el
index f736c45d2a..13543dd44c 100644
--- a/hsys-org.el
++

[elpa] externals/hyperbole updated (fbb6f81bcd -> c4cfe68db8)

2024-06-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/hyperbole.

  from  fbb6f81bcd Modify expected failed test to match the behavior (#535)
   new  12812f751d hywiki.el - Fix performance and correctness issues; 
improve tests
   new  ccde7cfd59 Merge branch 'master' into rsw
   new  c4cfe68db8 Merge pull request #541 from rswgnu/rsw


Summary of changes:
 ChangeLog|  80 ++
 hsys-org.el  |   8 +-
 hypb.el  |  12 +-
 hywiki.el| 422 +--
 test/hywiki-tests.el |  48 +++---
 5 files changed, 389 insertions(+), 181 deletions(-)



[elpa] externals/org 782f6c33be: oc-csl: New custom option `org-cite-csl-bibtex-titles-to-sentence-case'

2024-06-20 Thread ELPA Syncer
branch: externals/org
commit 782f6c33beed8d7baac9549b94a6a08040eba838
Author: Andras Simonyi 
Commit: Andras Simonyi 

oc-csl: New custom option `org-cite-csl-bibtex-titles-to-sentence-case'

* lisp/oc-csl.el (org-cite-csl-bibtex-titles-to-sentence-case): New
variable.
(org-cite-csl--processor): Create the itemgetter using the new option.
* etc/ORG-NEWS (New option
~org-cite-csl-bibtex-titles-to-sentence-case~): Announce the change.
---
 etc/ORG-NEWS   | 11 +++
 lisp/oc-csl.el | 21 -
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index b81dabb15c..78a60382dd 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -61,6 +61,17 @@ The default value used to be pulled from =dvipng= process 
type from
 =latexmk= (when available), or running =latex= multiple times, so that
 all the references are resolved in the generated png.
 
+*** New option ~org-cite-csl-bibtex-titles-to-sentence-case~
+
+When this option is non-nil then title fields in bibtex bibliography
+entries are converted to sentence-case before being formatted
+according to a CSL style, except for entries with a =langid= field
+specifying a non-English language.  When nil, this conversion is
+limited to entries having a =langid= field specifying a variant of
+English.  The default value is ~t~ as the CSL standard assumes that
+English titles are specified in sentence-case but the bibtex
+bibliography format requires them to be written in title-case.
+
 ** New functions and changes in function arguments
 
 # This also includes changes in function behavior from Elisp perspective.
diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index b8691bf6f5..338f72e9d8 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -321,6 +321,24 @@ in the bibliography measured in characters."
   :type 'string
   :package-version '(Org . "9.7"))
 
+(defcustom org-cite-csl-bibtex-titles-to-sentence-case t
+  "Convert bibtex title fields to sentence-case by default.
+
+When non-nil, title fields in bibtex bibliography entries are
+converted to sentence-case before being formatted according to a
+CSL style, except for entries with a `langid' field specifying a
+non-English language.  When nil, title conversion is limited to
+entries having a `langid' field specifying a variant of English.
+
+Conversion of titles to sentence-case by default is in most cases
+useful because the CSL standard assumes that English titles are
+specified in sentence-case but the bibtex bibliography format
+requires them to be written in title-case."
+  :group 'org-cite
+  :package-version '(Org . "9.8")
+  :type 'boolean
+  :safe #'booleanp)
+
 
 ;;; Internal variables
 (defconst org-cite-csl--etc-dir
@@ -579,7 +597,8 @@ property in INFO."
  (processor
   (citeproc-create
(org-cite-csl--style-file info)
-   (citeproc-hash-itemgetter-from-any bibliography)
+   (citeproc-hash-itemgetter-from-any
+bibliography (not org-cite-csl-bibtex-titles-to-sentence-case))
(org-cite-csl--locale-getter)
locale)))
 (plist-put info :cite-citeproc-processor processor)



[elpa] externals/auctex dee7d873ba: Remove final slash from directory added to `load-path'

2024-06-20 Thread ELPA Syncer
branch: externals/auctex
commit dee7d873ba5ef38961d531cc32f50526f7c59d1d
Author: Arash Esbati 
Commit: Arash Esbati 

Remove final slash from directory added to `load-path'

* GNUmakefile (tex-site.el): Use `directory-file-name' in order to
avoid a final slash in the values of `TeX-lisp-directory' and
`TeX-data-directory'.
---
 GNUmakefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 73bdeacee4..617daea189 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -106,8 +106,8 @@ LASTVERSION:=$(shell grep "^;; Version:" auctex.el \
 AUCTEXVERSION:=$(if $(THISVERSION),$(THISVERSION),$(LASTVERSION).$(AUCTEXDATE))
 
 tex-site.el: tex-site.el.in
-   sed -e 's|@lisppackagelispdir@|(file-name-directory load-file-name)|'\
-   -e 's|@lisppackagedatadir@|(file-name-directory load-file-name)|'\
+   sed -e 's|@lisppackagelispdir@|(directory-file-name 
(file-name-directory load-file-name))|'\
+   -e 's|@lisppackagedatadir@|(directory-file-name 
(file-name-directory load-file-name))|'\
-e 's|@lispautodir@|(if (file-writable-p "/usr/local/var/auctex") 
"/usr/local/var/auctex" "~/.emacs.d/auctex")|'\
-e 's|@AUCTEXVERSION@|$(AUCTEXVERSION)|'\
-e 's|@AUCTEXDATE@|$(AUCTEXDATE)|'\



[elpa] externals/jinx 271034e9c7: correct link to enchant manual (#185)

2024-06-20 Thread ELPA Syncer
branch: externals/jinx
commit 271034e9c7addb0d4d5c96c4b0fc7b6265f4dc3b
Author: Jason Lewis 
Commit: GitHub 

correct link to enchant manual (#185)
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index ea8306faef..b4eb5c4c4a 100644
--- a/README.org
+++ b/README.org
@@ -164,7 +164,7 @@ system spell-checker.
 Depending on the backend the personal dictionary will be taken from different
 locations, e.g., =~/.aspell.LANG.pws= or =~/.config/enchant/LANG.dic=. It is
 possible to symlink different personal dictionaries such that they are shared 
by
-different spell checkers. See the 
[[https://abiword.github.io/enchant/src/enchant.html][Enchant manual]] for 
details.
+different spell checkers. See the 
[[https://abiword.github.io/enchant/lib/enchant.html][Enchant manual]] for 
details.
 
 * Alternative spell-checking packages
 



[nongnu] elpa/git-commit 7e144529b7 3/3: Use time-since instead of time-subtract

2024-06-20 Thread ELPA Syncer
branch: elpa/git-commit
commit 7e144529b7fca345fcaa92d7e986688ea24ae94c
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Use time-since instead of time-subtract
---
 lisp/magit-autorevert.el | 2 +-
 lisp/magit-diff.el   | 2 +-
 lisp/magit-mode.el   | 5 ++---
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-autorevert.el b/lisp/magit-autorevert.el
index e50dbe6496..ebac571ea8 100644
--- a/lisp/magit-autorevert.el
+++ b/lisp/magit-autorevert.el
@@ -152,7 +152,7 @@ and code surrounding the definition of this function."
   (magit-auto-revert-mode 1)
   (magit-message
"Turning on magit-auto-revert-mode...done%s"
-   (let ((elapsed (float-time (time-subtract nil start
+   (let ((elapsed (float-time (time-since start
  (if (> elapsed 0.2)
  (format " (%.3fs, %s buffers checked)" elapsed
  (length (buffer-list)))
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index e36a38b271..90cc8ddadb 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -2525,7 +2525,7 @@ section or a child thereof."
 (defun magit-diff-expansion-threshold (section)
   "Keep new diff sections collapsed if washing takes too long."
   (and (magit-file-section-p section)
-   (> (float-time (time-subtract (current-time) magit-refresh-start-time))
+   (> (float-time (time-since magit-refresh-start-time))
   magit-diff-expansion-threshold)
'hide))
 
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 4f7f21fed5..4c4465ed2d 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1009,7 +1009,7 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
 (let* ((c (caar magit--refresh-cache))
(a (+ c (cdar magit--refresh-cache
   (message "Refreshing magit...done (%.3fs, cached %s/%s (%.0f%%))"
-   (float-time (time-subtract (current-time) start))
+   (float-time (time-since start))
c a (* (/ c (* a 1.0)) 100)
   (run-hooks 'magit-unwind-refresh-hook
 
@@ -1076,8 +1076,7 @@ Run hooks `magit-pre-refresh-hook' and 
`magit-post-refresh-hook'."
 (set-buffer-modified-p nil))
   (when magit-refresh-verbose
 (message "Refreshing buffer `%s'...done (%.3fs)" (buffer-name)
- (float-time (time-subtract (current-time)
-magit-refresh-start-time)))
+ (float-time (time-since magit-refresh-start-time)))
 
 (defun magit-profile-refresh-buffer ()
   "Profile refreshing the current Magit buffer."



[nongnu] elpa/git-commit 2d33e01ffb 2/3: magit-run-hook-with-benchmark: Cosmetics

2024-06-20 Thread ELPA Syncer
branch: elpa/git-commit
commit 2d33e01ffb43e95784cb8eb4c3e94026081fbfa2
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-run-hook-with-benchmark: Cosmetics
---
 lisp/magit-mode.el | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 4c658e024b..4f7f21fed5 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1454,17 +1454,17 @@ The additional output can be found in the *Messages* 
buffer."
(if magit-refresh-verbose "Enabled" "Disabled")))
 
 (defun magit-run-hook-with-benchmark (hook)
-  (when hook
-(if magit-refresh-verbose
-(let ((start (current-time)))
-  (message "Running %s..." hook)
-  (run-hook-wrapped
-   hook
-   (lambda (fn)
- (message "  %-50s %f" fn (benchmark-elapse (funcall fn)
-  (message "Running %s...done (%.3fs)" hook
-   (float-time (time-subtract (current-time) start
-  (run-hooks hook
+  (cond
+   ((not hook))
+   (magit-refresh-verbose
+(message "Running %s..." hook)
+(message "Running %s...done (%.3fs)" hook
+ (benchmark-elapse
+   (run-hook-wrapped
+hook
+(lambda (fn)
+  (message "  %-50s %f" fn (benchmark-elapse (funcall 
fn
+   ((run-hooks hook
 
 ;;; _
 (provide 'magit-mode)



[nongnu] elpa/git-commit 72e6631ca2 1/3: magit-run-hook-with-benchmark: Report time for individual functions

2024-06-20 Thread ELPA Syncer
branch: elpa/git-commit
commit 72e6631ca24d078c97603a26c1e07dda8fd5e108
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

magit-run-hook-with-benchmark: Report time for individual functions
---
 lisp/magit-mode.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 2548bb7b7b..4c658e024b 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -31,6 +31,7 @@
 (require 'magit-base)
 (require 'magit-git)
 
+(require 'benchmark)
 (require 'browse-url)
 (require 'format-spec)
 (require 'help-mode)
@@ -1457,7 +1458,10 @@ The additional output can be found in the *Messages* 
buffer."
 (if magit-refresh-verbose
 (let ((start (current-time)))
   (message "Running %s..." hook)
-  (run-hooks hook)
+  (run-hook-wrapped
+   hook
+   (lambda (fn)
+ (message "  %-50s %f" fn (benchmark-elapse (funcall fn)
   (message "Running %s...done (%.3fs)" hook
(float-time (time-subtract (current-time) start
   (run-hooks hook



[nongnu] elpa/magit updated (13850341e3 -> 7e144529b7)

2024-06-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  13850341e3 Fix docstring typo
  adds  72e6631ca2 magit-run-hook-with-benchmark: Report time for 
individual functions
  adds  2d33e01ffb magit-run-hook-with-benchmark: Cosmetics
  adds  7e144529b7 Use time-since instead of time-subtract

No new revisions were added by this update.

Summary of changes:
 lisp/magit-autorevert.el |  2 +-
 lisp/magit-diff.el   |  2 +-
 lisp/magit-mode.el   | 25 ++---
 3 files changed, 16 insertions(+), 13 deletions(-)



[nongnu] elpa/git-commit updated (13850341e3 -> 7e144529b7)

2024-06-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/git-commit.

  from  13850341e3 Fix docstring typo
   new  72e6631ca2 magit-run-hook-with-benchmark: Report time for 
individual functions
   new  2d33e01ffb magit-run-hook-with-benchmark: Cosmetics
   new  7e144529b7 Use time-since instead of time-subtract


Summary of changes:
 lisp/magit-autorevert.el |  2 +-
 lisp/magit-diff.el   |  2 +-
 lisp/magit-mode.el   | 25 ++---
 3 files changed, 16 insertions(+), 13 deletions(-)



[nongnu] elpa/magit-section updated (13850341e3 -> 7e144529b7)

2024-06-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  13850341e3 Fix docstring typo
  adds  72e6631ca2 magit-run-hook-with-benchmark: Report time for 
individual functions
  adds  2d33e01ffb magit-run-hook-with-benchmark: Cosmetics
  adds  7e144529b7 Use time-since instead of time-subtract

No new revisions were added by this update.

Summary of changes:
 lisp/magit-autorevert.el |  2 +-
 lisp/magit-diff.el   |  2 +-
 lisp/magit-mode.el   | 25 ++---
 3 files changed, 16 insertions(+), 13 deletions(-)



[elpa] externals/greader 9e20f6236a: Greader version 0.11.6

2024-06-20 Thread ELPA Syncer
branch: externals/greader
commit 9e20f6236ae3301a77498ce4f233d4c92f6e13e2
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

Greader version 0.11.6

Minor refinements.
---
 greader-audiobook.el | 7 ++-
 greader.el   | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/greader-audiobook.el b/greader-audiobook.el
index fb1f019b95..b816a4257d 100644
--- a/greader-audiobook.el
+++ b/greader-audiobook.el
@@ -184,7 +184,10 @@ Return a cons with start and end of the block or nil if at 
end of the buffer."
 (goto-char (+ (point) greader-audiobook-block-size))
 (when (thing-at-point 'sentence)
   (forward-sentence)
-  (setq end (point)
+  (setq end (point)))
+(when (looking-at "\\W")
+  (re-search-forward "\\W*" nil 1))
+(setq end (point
  ((pred stringp)
   (cond
((> (string-to-number greader-audiobook-block-size) 0)
@@ -193,6 +196,8 @@ Return a cons with start and end of the block or nil if at 
end of the buffer."
  (greader-get-rate)))
 (when (thing-at-point 'sentence)
   (forward-sentence))
+(when (looking-at "\\W")
+  (re-search-forward "\\W*" nil 1))
 (setq end (point)
  (_
   (error "Cannot determine the block size"
diff --git a/greader.el b/greader.el
index dfcc428246..404b2b2661 100644
--- a/greader.el
+++ b/greader.el
@@ -8,7 +8,7 @@
 ;; URL: https://gitlab.com/michelangelo-rodriguez/greader
 
 ;; package-requires: ((google-translate))
-;; Version: 0.11.5
+;; Version: 0.11.6
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by



[elpa] externals/org updated (782f6c33be -> 7fa1694ec6)

2024-06-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  782f6c33be oc-csl: New custom option 
`org-cite-csl-bibtex-titles-to-sentence-case'
   new  9f4f7338d7 org-element-timestamp-parser: Fix regexp
   new  77403e376a Revert "mk: Allow parallel execution"
   new  4c5132b9f1 Fix parallel execution of Makefiles
   new  7fa1694ec6 mk/targets.mk (.PHONY): Add missing non-file targets


Summary of changes:
 lisp/Makefile   | 12 ++--
 lisp/org-element.el |  2 --
 mk/targets.mk   |  8 
 3 files changed, 10 insertions(+), 12 deletions(-)



[elpa] externals/org 77403e376a 2/4: Revert "mk: Allow parallel execution"

2024-06-20 Thread ELPA Syncer
branch: externals/org
commit 77403e376a430a0b05afa5506d1dca18b66021b5
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Revert "mk: Allow parallel execution"

This reverts commit 71fbe92c2e320363871af38774163358528cca6f.

Parallel make still does not work.
---
 lisp/Makefile | 13 +++--
 mk/targets.mk |  7 ---
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/lisp/Makefile b/lisp/Makefile
index c570d9cfa7..c57095f651 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -1,3 +1,4 @@
+.NOTPARALLEL:  # always run this make serially
 .SUFFIXES: # we don't need default suffix rules
 ifeq ($(MAKELEVEL), 0)
   $(error This make needs to be started as a sub-make from the toplevel 
directory.)
@@ -19,7 +20,7 @@ _ORGCM_ := dirall single native source slint1 slint2
install clean cleanauto cleanall cleanelc clean-install
 
 # do not clean here, done in toplevel make
-all compile compile-dirty:: | autoloads
+all compile compile-dirty:: autoloads
 ifeq ($(filter-out $(_ORGCM_),$(ORGCM)),)
$(MAKE) compile-$(ORGCM)
 else
@@ -27,11 +28,11 @@ else
 endif
 
 compile-dirall:dirall
-compile-single: $(LISPC) | single
-compile-native: $(LISPN) | native
-compile-source:| source dirall
-compile-slint1:| dirall slint1
-compile-slint2:| source dirall slint1
+compile-single: single $(LISPC)
+compile-native: native $(LISPN)
+compile-source:source dirall
+compile-slint1:dirall slint1
+compile-slint2:source dirall slint1
 
 # internal
 dirall:
diff --git a/mk/targets.mk b/mk/targets.mk
index 00be37dc24..684d7f26e6 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -1,4 +1,5 @@
 .EXPORT_ALL_VARIABLES:
+.NOTPARALLEL: .PHONY
 # Additional distribution files
 DISTFILES_extra=  Makefile etc
 
@@ -66,9 +67,9 @@ config config-test config-exe config-all config-version::
@echo ""
 
 oldorg:compile info# what the old makefile did when no target was 
specified
-uncompiled:| cleanlisp autoloads   # for developing
+uncompiled:cleanlisp autoloads # for developing
 refcard:   card
-update update2::   | up0 clean autoloads all
+update update2::   up0 clean autoloads all
 
 single:ORGCM=single
 single:compile
@@ -127,7 +128,7 @@ $(INSTSUB):
 autoloads: lisp
$(MAKE) -C $< $@
 
-repro: | cleanall autoloads
+repro: cleanall autoloads
-@$(REPRO) &
 
 cleandirs:



[elpa] externals/org 9f4f7338d7 1/4: org-element-timestamp-parser: Fix regexp

2024-06-20 Thread ELPA Syncer
branch: externals/org
commit 9f4f7338d7b4d27438fa6c9eb241726a87dc16ed
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element-timestamp-parser: Fix regexp

* lisp/org-element.el (org-element--timestamp-regexp): Do not match
malformed timestamps like:

<202-07-10 .+1d>

`org-ts-regexp-both' already covers the removed part of the regexp.
It appears that the problematic regexp is coming from a copy-paste from
`org-agenda-get-timestamps' where the inaccurate regexp is used to
search timestamps with repeaters in conjunction to searching for exact
agenda dates.  In `org-agenda-get-timestamps', inaccuracy is not a
problem because proper matching against `org-ts-regexp-both' is
performed later, simply skipping non-timestamps.

Reported-by: Platon Pronko 
Link: 
https://orgmode.org/list/6000e3bf-f95f-44fd-b321-cf44acd5c...@gmail.com
---
 lisp/org-element.el | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 191bb5698d..fe914a964f 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4279,8 +4279,6 @@ Assume point is at the target."
 
 (defconst org-element--timestamp-regexp
   (concat org-ts-regexp-both
- "\\|"
- "\\(?:<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)"
  "\\|"
  "\\(?:<%%\\(?:([^>\n]+)\\)\\([^\n>]*\\)>\\)")
   "Regexp matching any timestamp type object.")



[elpa] externals-release/org a4ff518a2e: org-refile-get-location: Fix outline path to a symlink of current buffer

2024-06-20 Thread ELPA Syncer
branch: externals-release/org
commit a4ff518a2eef3553295e110168a7b0eab942bfbf
Author: Al Haji-Ali 
Commit: Ihor Radchenko 

org-refile-get-location: Fix outline path to a symlink of current buffer

* lisp/org-refile.el (org-refile-get-location): When current buffer
file is a symlink to refile location, do not append the file name to
the outline path, just as we do when current buffer is the same as
refile location file.

TINYCHANGE
---
 lisp/org-refile.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 20b5fbd02c..c8e64903c3 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -666,12 +666,12 @@ this function appends the default value from
  #'completing-read))
 (extra (if org-refile-use-outline-path "/" ""))
 (cbnex (concat (buffer-name) extra))
-(filename (and cfn (expand-file-name cfn)))
+(filename (and cfn (file-truename cfn)))
 (tbl (mapcar
   (lambda (x)
 (if (and (not (member org-refile-use-outline-path
   '(file full-file-path title)))
- (not (equal filename (nth 1 x
+ (not (equal filename (file-truename (nth 1 x)
 (cons (concat (car x) extra " ("
   (file-name-nondirectory (nth 1 x)) ")")
   (cdr x))



[elpa] externals/org 7fa1694ec6 4/4: mk/targets.mk (.PHONY): Add missing non-file targets

2024-06-20 Thread ELPA Syncer
branch: externals/org
commit 7fa1694ec6baade1937fffeed422a8eb33ba1ced
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

mk/targets.mk (.PHONY): Add missing non-file targets
---
 mk/targets.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/targets.mk b/mk/targets.mk
index da6955cce6..20f2ae504d 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -27,7 +27,7 @@ ifneq ($(GITSTATUS),)
 endif
 
 .PHONY:all oldorg update update2 up0 up1 up2 single native $(SUBDIRS) \
-   check test install $(INSTSUB) \
+   check test test-dirty install install-info $(INSTSUB) \
info html pdf card refcard doc docs \
autoloads cleanall clean $(CLEANDIRS:%=clean%) \
clean-install cleanelc cleandirs \



[elpa] externals/org 4c5132b9f1 3/4: Fix parallel execution of Makefiles

2024-06-20 Thread ELPA Syncer
branch: externals/org
commit 4c5132b9f18b86d5be51091ddce18c2b853af3dd
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Fix parallel execution of Makefiles

* lisp/Makefile (.NOTPARALLEL):
* mk/targets.mk (.NOTPARALLEL): Do not fiddle with explicit
.NOTPARALLEL.  Given that we provide correct dependencies, parallel
execution should work, and it does work.
---
 lisp/Makefile | 1 -
 mk/targets.mk | 1 -
 2 files changed, 2 deletions(-)

diff --git a/lisp/Makefile b/lisp/Makefile
index c57095f651..111d62d4cd 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -1,4 +1,3 @@
-.NOTPARALLEL:  # always run this make serially
 .SUFFIXES: # we don't need default suffix rules
 ifeq ($(MAKELEVEL), 0)
   $(error This make needs to be started as a sub-make from the toplevel 
directory.)
diff --git a/mk/targets.mk b/mk/targets.mk
index 684d7f26e6..da6955cce6 100644
--- a/mk/targets.mk
+++ b/mk/targets.mk
@@ -1,5 +1,4 @@
 .EXPORT_ALL_VARIABLES:
-.NOTPARALLEL: .PHONY
 # Additional distribution files
 DISTFILES_extra=  Makefile etc
 



[elpa] externals/dape ce0ecf76a7: Enlarge overlay-arrow to cover more of 'large-circle on linux

2024-06-20 Thread ELPA Syncer
branch: externals/dape
commit ce0ecf76a759636cd84dfa5ef23af207a4cfe152
Author: Daniel Pettersson 
Commit: Daniel Pettersson 

Enlarge overlay-arrow to cover more of 'large-circle on linux
---
 dape.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dape.el b/dape.el
index b27cb1fb00..3992627dd7 100644
--- a/dape.el
+++ b/dape.el
@@ -3143,7 +3143,7 @@ See `dape-request' for expected CB signature."
 ;;; Stack pointers
 
 (define-fringe-bitmap 'dape-right-triangle
-  "\xe0\xf0\xf8\xfc\xfc\xf8\xf0\xe0")
+  "\xf0\xf8\xfc\xfe\xfe\xfc\xf8\xf0")
 
 (defvar dape--overlay-arrow-position (make-marker)
   "Dape stack position marker.")



[nongnu] elpa/go-mode 636d36e37a: Add go-{browse-{freesymbols, doc, assembly}, rename}

2024-06-20 Thread ELPA Syncer
branch: elpa/go-mode
commit 636d36e37a0d2b6adb2e12d802ff4794ccbba336
Author: Alan Donovan 
Commit: Dominik Honnef 

Add go-{browse-{freesymbols,doc,assembly},rename}

These four helper functions provide convenient ways to access
gopls server functionality without the user needing to worry
about how their LSP client does things. They should work for
eglot and lsp-mode (though I haven't tested the latter).

Updates dominikh/go-mode.el/#436
---
 go-mode.el | 39 +++
 1 file changed, 39 insertions(+)

diff --git a/go-mode.el b/go-mode.el
index 6003f715cd..e539398e54 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -3051,6 +3051,45 @@ This handles multi-line comments with a * prefix on each 
line."
 
 
 
+;; Convenient go-* functions for gopls features available through code
+;; actions, that work across LSP clients:
+
+(defun go-mode--code-action (kind)
+  "Request and invoke the specified kind of code actions for the current 
selection."
+  (cond
+   ((and (boundp 'eglot--managed-mode) eglot--managed-mode)
+(let ((beg-end (eglot--code-action-bounds)))
+  (eglot-code-actions (car beg-end) (cadr beg-end) kind t)))
+   ((and (boundp 'lsp-mode) lsp-mode)
+(lsp-execute-code-action-by-kind kind))
+   (error "buffer is not managed by a known LSP client")))
+
+(defun go-browse-freesymbols ()
+  "View free symbols referenced by the current selection in a browser. 
Requires gopls v0.16."
+  (interactive)
+  (go-mode--code-action "source.freesymbols"))
+
+(defun go-browse-doc ()
+  "View documentation for the current Go package in a browser. Requires gopls 
v0.16."
+  (interactive)
+  (go-mode--code-action "source.doc"))
+
+(defun go-browse-assembly ()
+  "View assembly for the enclosing Go function in a browser. Requires gopls 
v0.16."
+  (interactive)
+  (go-mode--code-action "source.assembly"))
+
+(defun go-rename ()
+  "Rename a Go symbol, prompting for the new name."
+  (interactive)
+  (cond
+   ((and (boundp 'eglot--managed-mode) eglot--managed-mode)
+(call-interactively #'eglot-rename))
+   ((and (boundp 'lsp-mode) lsp-mode)
+(call-interactively #'lsp-rename))
+   (error "buffer is not managed by a known LSP client")))
+
+
 (provide 'go-mode)
 
 ;;; go-mode.el ends here



[nongnu] branch scratch/editorconfig deleted (was 676096fdae)

2024-06-20 Thread Stefan Monnier via
monnier pushed a change to branch scratch/editorconfig.

   was  676096fdae (editorconfig--get-trailing-nl): Fix handling of 
`mode-require-final-newline`

This change permanently discards the following revisions:

  discards  676096fdae (editorconfig--get-trailing-nl): Fix handling of 
`mode-require-final-newline`
  discards  c8031d4983 WiP: Document test regressions
  discards  9f183805ce Use new Emacs-30 hooks
  discards  54ee2b4862 (editorconfig-set-local-variables): Get first, set later
  discards  964747660c Don't hook into `read-only-mode-hook`
  discards  c24ec14b8b (editorconfig--should-set): Eliminate 
`lisp-indent-offset` special case



[nongnu] scratch/editorconfig 27386ec31b 5/5: editorconfig-core-handle.el: Don't use file names as glob pattern

2024-06-20 Thread Stefan Monnier via
branch: scratch/editorconfig
commit 27386ec31bdf52b9dc79570722a7e2e805916443
Author: Stefan Monnier 
Commit: Stefan Monnier 

editorconfig-core-handle.el: Don't use file names as glob pattern

Match relative file names against the glob pattern instead of
trying to construct a glob pattern that matches the absolute
file name (where the code failed to escape the possible
special chars).

* lisp/editorconfig-core-handle.el
(editorconfig-core-handle-section-get-properties): Delete `dir` arg.
(editorconfig-core-handle-get-properties-hash)
(editorconfig-core-handle-get-properties): Adjust call accordingly.
Use `declare` to mark it obsolete.
(editorconfig-core-handle--fnmatch-p): Delete `dir` arg.
---
 editorconfig-core-handle.el | 36 +---
 1 file changed, 17 insertions(+), 19 deletions(-)

diff --git a/editorconfig-core-handle.el b/editorconfig-core-handle.el
index d225e1456b..210593855f 100644
--- a/editorconfig-core-handle.el
+++ b/editorconfig-core-handle.el
@@ -51,13 +51,14 @@ Slots:
   (name nil)
   (props nil))
 
-(defun editorconfig-core-handle-section-get-properties (section file dir)
+(defun editorconfig-core-handle-section-get-properties (section file)
   "Return properties alist when SECTION name match FILE.
 
-DIR should be the directory where .editorconfig file which has SECTION lives.
-IF not match, return nil."
+FILE should be a relative file name, relative to the directory where
+the `.editorconfig' file which has SECTION lives.
+If not match, return nil."
   (when (editorconfig-core-handle--fnmatch-p
- file (editorconfig-core-handle-section-name section) dir)
+ file (editorconfig-core-handle-section-name section))
 (editorconfig-core-handle-section-props section)))
 
 (cl-defstruct editorconfig-core-handle
@@ -115,16 +116,14 @@ If HANDLE is nil return nil."
 The list returned will be ordered by the lines they appear.
 
 If HANDLE is nil return nil."
+  (declare (obsolete editorconfig-core-handle-get-properties-hash "0.8.0"))
   (when handle
-(let ((dir (file-name-directory (editorconfig-core-handle-path handle
+(let* ((dir (file-name-directory (editorconfig-core-handle-path handle)))
+   (file (file-relative-name file dir)))
   (cl-loop for section in (editorconfig-core-handle-sections handle)
-   for props = (editorconfig-core-handle-section-get-properties 
section
-
file
-
dir)
+   for props = (editorconfig-core-handle-section-get-properties
+section file)
when props collect (copy-alist props)
-(make-obsolete 'editorconfig-core-handle-get-properties
-   'editorconfig-core-handle-get-properties-hash
-   "0.8.0")
 
 
 (defun editorconfig-core-handle-get-properties-hash (handle file)
@@ -133,23 +132,22 @@ If HANDLE is nil return nil."
 If HANDLE is nil return nil."
   (when handle
 (let ((hash (make-hash-table))
-  (dir (file-name-directory (editorconfig-core-handle-path
- handle
+  (file (file-relative-name file (editorconfig-core-handle-path
+  handle
   (dolist (section (editorconfig-core-handle-sections handle))
-(cl-loop for (key . value) in 
(editorconfig-core-handle-section-get-properties section file dir)
+(cl-loop for (key . value) in 
(editorconfig-core-handle-section-get-properties section file)
  do (puthash (intern key) value hash)))
   hash)))
 
-(defun editorconfig-core-handle--fnmatch-p (name pattern dir)
+(defun editorconfig-core-handle--fnmatch-p (name pattern)
   "Return non-nil if NAME match PATTERN.
 If pattern has slash, pattern should be relative to DIR.
 
 This function is a fnmatch with a few modification for EditorConfig usage."
   (if (string-match-p "/" pattern)
-  (let ((pattern (replace-regexp-in-string "^/" "" pattern))
-(dir (file-name-as-directory dir)))
-(editorconfig-fnmatch-p name (concat dir pattern)))
-(editorconfig-fnmatch-p name (concat "**/" pattern
+  (let ((pattern (replace-regexp-in-string "\\`/" "" pattern)))
+(editorconfig-fnmatch-p name pattern))
+(editorconfig-fnmatch-p (file-name-nondirectory name) pattern)))
 
 (defsubst editorconfig-core-handle--string-trim (str)
   "Remove leading and trailing whitespaces from STR."



[nongnu] scratch/editorconfig 6a84108b03 2/5: (editorconfig--should-set): Eliminate `lisp-indent-offset` special case

2024-06-20 Thread Stefan Monnier via
branch: scratch/editorconfig
commit 6a84108b03df8cfc216238e7a6ccd3082f27284c
Author: Stefan Monnier 
Commit: Stefan Monnier 

(editorconfig--should-set): Eliminate `lisp-indent-offset` special case

Instead of treating `lisp-indent-offset` specially in
`editorconfig--should-set` (to obey `editorconfig-lisp-use-default-indent`),
use a new function `editorconfig-set-indentation-lisp-mode`
for Lisp modes.

* lisp/editorconfig.el (editorconfig--should-set): Remove `size` argument.
(editorconfig-set-indentation): Adjust calls accordingly.
(editorconfig-set-indentation-lisp-mode): New function.
(editorconfig-indentation-alist): Use it.
---
 editorconfig.el | 37 +
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index e7bb3c90b1..cf6c03249a 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -204,7 +204,7 @@ This hook will be run even when there are no matching 
sections in
 (css-ts-mode css-indent-offset)
 (d-mode c-basic-offset)
 (elixir-ts-mode elixir-ts-indent-offset)
-(emacs-lisp-mode lisp-indent-offset)
+(emacs-lisp-mode . editorconfig-set-indentation-lisp-mode)
 (enh-ruby-mode enh-ruby-indent-level)
 (erlang-mode erlang-indent-level)
 (ess-mode ess-indent-offset)
@@ -253,7 +253,7 @@ This hook will be run even when there are no matching 
sections in
 (kotlin-mode kotlin-tab-width)
 (kotlin-ts-mode kotlin-ts-mode-indent-offset)
 (latex-mode . editorconfig-set-indentation-latex-mode)
-(lisp-mode lisp-indent-offset)
+(lisp-mode . editorconfig-set-indentation-lisp-mode)
 (livescript-mode livescript-tab-width)
 (lua-mode lua-indent-level)
 (lua-ts-mode lua-ts-indent-offset)
@@ -459,15 +459,20 @@ Make a message by passing ARGS to `format-message'."
   (when (boundp 'LaTeX-item-indent)
 (setq-local LaTeX-item-indent (- size
 
-(cl-defun editorconfig--should-set (symbol &optional size)
-  "Determine if editorconfig should set SYMBOL.
-
-Optional arg SIZE is used when symbol is `lisp-indent-offset'.
-See `editorconfig-lisp-use-default-indent' for details."
+(defun editorconfig-set-indentation-lisp-mode (size)
+ "Set indent size to SIZE for Lisp mode(s)."
+ (when (cond ((null editorconfig-lisp-use-default-indent)  t)
+ ((eql t editorconfig-lisp-use-default-indent) nil)
+ ((numberp editorconfig-lisp-use-default-indent)
+  (not (eql size editorconfig-lisp-use-default-indent)))
+ (t t))
+   (setq-local lisp-indent-offset size)))
+
+(cl-defun editorconfig--should-set (symbol)
+  "Determine if editorconfig should set SYMBOL."
   (display-warning '(editorconfig editorconfig--should-set)
-   (format "symbol: %S | size: %S"
-   symbol
-   size)
+   (format "symbol: %S"
+   symbol)
:debug)
   (when (and (not editorconfig-override-file-local-variables)
  (assq symbol file-local-variables-alist))
@@ -479,14 +484,6 @@ See `editorconfig-lisp-use-default-indent' for details."
 (cl-return-from editorconfig--should-set
   nil))
 
-  (when (eq symbol 'lisp-indent-offset)
-(cl-return-from editorconfig--should-set
-  (cond ((null editorconfig-lisp-use-default-indent)  t)
-((eql t editorconfig-lisp-use-default-indent) nil)
-((numberp editorconfig-lisp-use-default-indent)
- (not (eql size editorconfig-lisp-use-default-indent)))
-(t t
-
   t)
 
 (defun editorconfig-set-indentation (style &optional size tab_width)
@@ -532,10 +529,10 @@ See `editorconfig-lisp-use-default-indent' for details."
 ((listp fn-or-list)
  (dolist (elem fn-or-list)
(cond ((and (symbolp elem)
-   (editorconfig--should-set elem size))
+   (editorconfig--should-set elem))
   (set (make-local-variable elem) size))
  ((and (consp elem)
-   (editorconfig--should-set (car elem) size))
+   (editorconfig--should-set (car elem)))
   (let ((spec (cdr elem)))
 (set (make-local-variable (car elem))
  (cond ((functionp spec) (funcall spec size))



[nongnu] scratch/editorconfig ec1e5d8135 3/5: Fix minor cosmetic issues

2024-06-20 Thread Stefan Monnier via
branch: scratch/editorconfig
commit ec1e5d8135a85b65f9bc0236a94bc415289fa5b9
Author: Stefan Monnier 
Commit: Stefan Monnier 

Fix minor cosmetic issues

Mostly fix compiler warnings and prefer #' to quote function names.

* editorconfig.el: Remove dependency on `nadvice` since we require
Emacs-26 which includes `nadvice` already.
Remove redundant `require`s.  Remove redundant `:group` arguments.
Move `defvar`s outside of `eval-when-compile`.
Remove "post-end trailer".
* .dir-locals.el: New file, to replace the "post-end trailer".

* ert-tests/editorconfig-core-handle-tests.el (editorconfig--fixtures):
Rename from `fixtures`.  Change all uses.

* ert-tests/editorconfig-tests.el (test-editorconfig)
(test-local-variables, test-hack-properties-functions):
Use `bound-and-true-p` when it's not guaranteed that the var will
be defined.
---
 .dir-locals.el  |  4 ++
 editorconfig-fnmatch.el |  2 +-
 editorconfig-tools.el   |  2 +-
 editorconfig.el | 68 ++---
 ert-tests/editorconfig-core-handle-tests.el | 20 -
 ert-tests/editorconfig-tests.el | 12 ++---
 6 files changed, 46 insertions(+), 62 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 00..cc741e0189
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,4 @@
+;;; Directory Local Variables -*- no-byte-compile: t; -*-
+;;; For more information see (info "(emacs) Directory Variables")
+
+((emacs-lisp-mode (sentence-end-double-space . t)))
diff --git a/editorconfig-fnmatch.el b/editorconfig-fnmatch.el
index 25a344dc2e..520aeb16c2 100644
--- a/editorconfig-fnmatch.el
+++ b/editorconfig-fnmatch.el
@@ -234,7 +234,7 @@ translation is found for PATTERN."
(number-end (string-to-number (match-string 2

pattern-sub
(setq result `(,@result ,(concat "\\(?:"
-(mapconcat 
'number-to-string
+(mapconcat 
#'number-to-string
(cl-loop 
for i from number-start to number-end
 
collect i)
"\\|")
diff --git a/editorconfig-tools.el b/editorconfig-tools.el
index 12c4057714..31f7c17ba2 100644
--- a/editorconfig-tools.el
+++ b/editorconfig-tools.el
@@ -115,7 +115,7 @@ any of regexps in `editorconfig-exclude-regexps'."
 nil))
 ;;;###autoload
 (defalias 'describe-editorconfig-properties
-  'editorconfig-display-current-properties)
+  #'editorconfig-display-current-properties)
 
 ;;;###autoload
 (defun editorconfig-format-buffer()
diff --git a/editorconfig.el b/editorconfig.el
index cf6c03249a..6e215ce23d 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -5,7 +5,7 @@
 ;; Author: EditorConfig Team 
 ;; Version: 0.11.0
 ;; URL: https://github.com/editorconfig/editorconfig-emacs#readme
-;; Package-Requires: ((emacs "26.1") (nadvice "0.3"))
+;; Package-Requires: ((emacs "26.1"))
 ;; Keywords: convenience editorconfig
 
 ;; See
@@ -41,17 +41,12 @@
 ;;; Code:
 
 (require 'cl-lib)
-(require 'pcase)
 
-(require 'nadvice)
-
-(eval-when-compile
-  (require 'rx)
-  (require 'subr-x)
-  (defvar tex-indent-basic)
-  (defvar tex-indent-item)
-  (defvar tex-indent-arg)
-  (defvar evil-shift-width))
+(eval-when-compile (require 'subr-x))
+(defvar tex-indent-basic)
+(defvar tex-indent-item)
+(defvar tex-indent-arg)
+(defvar evil-shift-width)
 
 (require 'editorconfig-core)
 
@@ -73,8 +68,7 @@ coding styles between different editors and IDEs."
   "Path to EditorConfig executable.
 
 Used by `editorconfig--execute-editorconfig-exec'."
-  :type 'string
-  :group 'editorconfig)
+  :type 'string)
 
 (define-obsolete-variable-alias
   'edconf-get-properties-function
@@ -107,13 +101,11 @@ Possible known values are:
 use `editorconfig-core-get-properties-hash'
 * `editorconfig-get-properties-from-exec'
   * Get properties by executing EditorConfig executable"
-  :type 'function
-  :group 'editorconfig)
+  :type 'function)
 
 (defcustom editorconfig-mode-lighter " EditorConfig"
   "Command `editorconfig-mode' lighter string."
-  :type 'string
-  :group 'editorconfig)
+  :type 'string)
 
 (define-obsolete-variable-alias
   'edconf-custom-hooks
@@ -143,8 +135,7 @@ show line numbers on the left:
 
 This hook will be run even when there are no matching sections in
 \".editorconfig\", or no \".editorconfig\" file was found at all."
-  :type 'hook
-  :group 'editorconfig)
+  :type 'hook)
 
 (defcustom editorconfig-hack-properties-functions ()
   "A list of function to alter property values before applying them.
@@ -166

[nongnu] scratch/editorconfig 8db3266ae1 1/5: Rename test files to `-tests.el`

2024-06-20 Thread Stefan Monnier via
branch: scratch/editorconfig
commit 8db3266ae1b33d540fe5f5bc730a03ae5255b3ad
Author: Stefan Monnier 
Commit: Stefan Monnier 

Rename test files to `-tests.el`

This follows the convention used in Emacs's own test suite and works around
annoying circular `require`s when `ert-tests` happens to be in `load-path`.
Also adjust the Makefile not to get confused by generated files.

* Makefile (SRCS): Filter out ELPA-generated files.
---
 Makefile| 2 +-
 .../{editorconfig-core-handle.el => editorconfig-core-handle-tests.el}  | 0
 ert-tests/{editorconfig-core.el => editorconfig-core-tests.el}  | 0
 ert-tests/{editorconfig-fnmatch.el => editorconfig-fnmatch-tests.el}| 0
 ert-tests/{editorconfig.el => editorconfig-tests.el}| 0
 5 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 963f6de2ed..a4e5338c50 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ ERT_TESTS = $(wildcard $(PROJECT_ROOT_DIR)/ert-tests/*.el)
 BATCHFLAGS = -batch -q --no-site-file -L $(PROJECT_ROOT_DIR)
 
 MAIN_SRC = editorconfig.el
-SRCS = $(wildcard $(PROJECT_ROOT_DIR)/*.el)
+SRCS = $(filter-out %-autoloads.el %-pkg.el, $(wildcard 
$(PROJECT_ROOT_DIR)/*.el))
 OBJS = $(SRCS:.el=.elc)
 
 .PHONY: check-unix check-dos \
diff --git a/ert-tests/editorconfig-core-handle.el 
b/ert-tests/editorconfig-core-handle-tests.el
similarity index 100%
rename from ert-tests/editorconfig-core-handle.el
rename to ert-tests/editorconfig-core-handle-tests.el
diff --git a/ert-tests/editorconfig-core.el 
b/ert-tests/editorconfig-core-tests.el
similarity index 100%
rename from ert-tests/editorconfig-core.el
rename to ert-tests/editorconfig-core-tests.el
diff --git a/ert-tests/editorconfig-fnmatch.el 
b/ert-tests/editorconfig-fnmatch-tests.el
similarity index 100%
rename from ert-tests/editorconfig-fnmatch.el
rename to ert-tests/editorconfig-fnmatch-tests.el
diff --git a/ert-tests/editorconfig.el b/ert-tests/editorconfig-tests.el
similarity index 100%
rename from ert-tests/editorconfig.el
rename to ert-tests/editorconfig-tests.el



[nongnu] scratch/editorconfig 5e25a51e25 4/5: Don't hook into `read-only-mode-hook`

2024-06-20 Thread Stefan Monnier via
branch: scratch/editorconfig
commit 5e25a51e2591ca19d034347dafaa3f32cce9367e
Author: Stefan Monnier 
Commit: Stefan Monnier 

Don't hook into `read-only-mode-hook`

Don't re-set variables just because `read-only-mode` is (de)activated,
and with Emacs-30's hooks it would be even less natural to do.
Also `buffer-read-only` can change without calling `read-only-mode`,
so better test it dynamically when we try to trim whitespace.

* lisp/editorconfig.el (editorconfig--delete-trailing-whitespace):
New function.
(editorconfig-set-trailing-ws): Use it.  Use `pcase`.
Also prefer `before-save-hook` and use `add/remove-hook` to
manipulate hooks, like god intended.
Don't test `buffer-read-only` any more.
(editorconfig-mode): Don't hook into `read-only-mode-hook` any more.

* ert-tests/editorconfig-tests.el (test-trim-trailing-ws): Adjust the
test accordingly.
---
 editorconfig.el | 34 --
 ert-tests/editorconfig-tests.el | 16 ++--
 2 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index 6e215ce23d..029f99e148 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -596,24 +596,23 @@ to non-nil when FINAL-NEWLINE is true."
  (setq-local require-final-newline  nil)
  (setq-local mode-require-final-newline nil
 
+(defun editorconfig--delete-trailing-whitespace ()
+  "Call `delete-trailing-whitespace' unless the buffer is read-only."
+  (unless buffer-read-only (delete-trailing-whitespace)))
+
 (defun editorconfig-set-trailing-ws (trim-trailing-ws)
-  "Set up trimming of trailing whitespace at end of lines by TRIM-TRAILING-WS."
-  (make-local-variable 'write-file-functions) ;; just current buffer
-  (when (and (equal trim-trailing-ws "true")
- (not buffer-read-only))
-;; when true we push delete-trailing-whitespace (emacs > 21)
-;; to write-file-functions
-(if editorconfig-trim-whitespaces-mode
-(funcall editorconfig-trim-whitespaces-mode 1)
-  (add-to-list 'write-file-functions 'delete-trailing-whitespace)))
-  (when (or (equal trim-trailing-ws "false")
-buffer-read-only)
-;; when false we remove every delete-trailing-whitespace
-;; from write-file-functions
-(when editorconfig-trim-whitespaces-mode
-  (funcall editorconfig-trim-whitespaces-mode 0))
-(setq write-file-functions
-  (remove 'delete-trailing-whitespace write-file-functions
+  (pcase trim-trailing-ws
+("true"
+ (if editorconfig-trim-whitespaces-mode
+ (funcall editorconfig-trim-whitespaces-mode 1)
+   (add-hook 'before-save-hook
+ #'editorconfig--delete-trailing-whitespace nil t)))
+("false"
+ (when editorconfig-trim-whitespaces-mode
+   (funcall editorconfig-trim-whitespaces-mode 0))
+ (remove-hook 'before-save-hook
+  #'editorconfig--delete-trailing-whitespace t
+
 
 (defun editorconfig-set-line-length (length)
   "Set the max line length (`fill-column') to LENGTH."
@@ -851,7 +850,6 @@ To disable EditorConfig in some buffers, modify
   :lighter editorconfig-mode-lighter
   (let ((modehooks '(prog-mode-hook
  text-mode-hook
- read-only-mode-hook
  ;; Some modes call `kill-all-local-variables' in their 
init
  ;; code, which clears some values set by editorconfig.
  ;; For those modes, editorconfig-apply need to be called
diff --git a/ert-tests/editorconfig-tests.el b/ert-tests/editorconfig-tests.el
index 75da5ebade..82577f8518 100644
--- a/ert-tests/editorconfig-tests.el
+++ b/ert-tests/editorconfig-tests.el
@@ -102,12 +102,16 @@
 (ert-deftest test-trim-trailing-ws nil
   (editorconfig-mode 1)
   (with-visit-file (concat editorconfig-ert-dir "trim.txt")
-(should (memq 'delete-trailing-whitespace
-  write-file-functions)))
-  (with-visit-file (concat editorconfig-ert-dir "trim.txt")
-(read-only-mode 1)
-(should (not (memq 'delete-trailing-whitespace
-   write-file-functions
+(should (memq #'editorconfig--delete-trailing-whitespace
+  before-save-hook)))
+  ;; FIXME: We don't hook into `read-only-mode', so instead we should
+  ;; make a more thorough test that saves the file after making the buffer
+  ;; read-only and makes sure it does not trim the trailing-ws of the
+  ;; buffer/file.
+  ;;(with-visit-file (concat editorconfig-ert-dir "trim.txt")
+  ;;  (read-only-mode 1)
+  ;;  (should (not (memq #'editorconfig--delete-trailing-whitespace
+  ;; before-save-hook
   (editorconfig-mode -1))
 
 (ert-deftest test-charset nil



[nongnu] branch scratch/editorconfig created (now 27386ec31b)

2024-06-20 Thread Stefan Monnier via
monnier pushed a change to branch scratch/editorconfig.

at  27386ec31b editorconfig-core-handle.el: Don't use file names as 
glob pattern

This branch includes the following new commits:

   new  8db3266ae1 Rename test files to `-tests.el`
   new  6a84108b03 (editorconfig--should-set): Eliminate 
`lisp-indent-offset` special case
   new  ec1e5d8135 Fix minor cosmetic issues
   new  5e25a51e25 Don't hook into `read-only-mode-hook`
   new  27386ec31b editorconfig-core-handle.el: Don't use file names as 
glob pattern




[elpa] externals/which-key ed38931217: Merge changes from emacs master branch

2024-06-20 Thread ELPA Syncer
branch: externals/which-key
commit ed389312170df955aaf10c2e120cc533ed5c509e
Author: Justin Burkett 
Commit: Justin Burkett 

Merge changes from emacs master branch
---
 which-key.el | 305 +--
 1 file changed, 152 insertions(+), 153 deletions(-)

diff --git a/which-key.el b/which-key.el
index f53226ee96..e9567d262c 100644
--- a/which-key.el
+++ b/which-key.el
@@ -5,8 +5,9 @@
 ;; Author: Justin Burkett 
 ;; Maintainer: Justin Burkett 
 ;; Version: 3.6.0
-;; Keywords:
-;; Package-Requires: ((emacs "24.4"))
+;; Package-Requires: ((emacs "25.1"))
+
+;; This file is part of GNU Emacs.
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -23,16 +24,15 @@
 
 ;;; Commentary:
 
-;; which-key provides the minor mode which-key-mode for Emacs.  The mode 
displays
-;; the key bindings following your currently entered incomplete command (a
-;; prefix) in a popup.  For example, after enabling the minor mode if you enter
-;; C-x and wait for the default of 1 second the minibuffer will expand with all
-;; of the available key bindings that follow C-x (or as many as space allows
-;; given your settings).  This includes prefixes like C-x 8 which are shown in 
a
-;; different face.  Screenshots of what the popup will look like along with
-;; information about additional features can be found at
-;; https://github.com/justbur/emacs-which-key.
+;; The `which-key' mode displays the key bindings following your
+;; currently entered incomplete command (a prefix) in a popup.  For
+;; example, after enabling the minor mode if you enter C-x and wait for
+;; the default of 1 second the minibuffer will expand with all of the
+;; available key bindings that follow C-x (or as many as space allows
+;; given your settings).
 ;;
+;; This includes prefixes like C-x 8 which are shown in a different
+;; face.
 
 ;;; Code:
 
@@ -50,7 +50,7 @@
 ;;; Options
 
 (defgroup which-key nil
-  "Customization options for which-key-mode."
+  "Customization options for `which-key-mode'."
   :group 'help
   :prefix "which-key-")
 
@@ -62,15 +62,15 @@ A value of zero might lead to issues, so a non-zero value is
 recommended
 (see https://github.com/justbur/emacs-which-key/issues/134)."
   :type 'float
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-idle-secondary-delay nil
   "Seconds to wait for which-key to pop up after initial display.
 This makes it possible to shorten the delay for subsequent popups
-in the same key sequence. The default is for this value to be
+in the same key sequence.  The default is for this value to be
 nil, which disables this behavior."
   :type '(choice float (const :tag "Disabled" nil))
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-echo-keystrokes (if (and echo-keystrokes
   (> (+ echo-keystrokes 0.01)
@@ -83,7 +83,7 @@ This only applies if `which-key-popup-type' is minibuffer or
 `which-key-idle-delay' or else the keystroke echo will erase the
 which-key popup."
   :type 'float
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-max-description-length 27
   "Truncate the description of keys to this length.
@@ -96,17 +96,17 @@ before.  Truncation is done using `which-key-ellipsis'."
 (integer :tag "Width in characters")
 (float :tag "Use fraction of available width")
 function)
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-min-column-description-width 0
   "Every column should at least have this width."
   :type 'natnum
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-add-column-padding 0
   "Additional spaces to add to the left of each key column."
   :type 'integer
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-unicode-correction 3
   "Correction for wide unicode characters.
@@ -122,14 +122,14 @@ additional ASCII character in the which-key buffer.  
Increase this
 number if you are seeing characters get cutoff on the right side
 of the which-key popup."
   :type 'integer
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
-(defcustom which-key-dont-use-unicode nil
+(defcustom which-key-dont-use-unicode t
   "If non-nil, don't use any unicode characters in default setup.
 For affected settings, see `which-key-replacement-alist', `which-key-ellipsis'
 `which-key-separator'."
   :type 'boolean
-  :version "1.0")
+  :package-version "1.0" :version "30.1")
 
 (defcustom which-key-separator
   (if which-key-dont-use-unicode " : " " → ")
@@ -137,7 +137,8 @@ For affected settings, see `which-key-replacement-alist', 
`which-key-ellipsis'
 Default is \" → \", unless `which-key-dont-use-unicode' is non
 nil, in which case the default is \" : \"."
   :type '

[nongnu] elpa/gptel 44780a408a: gptel-anthropic: Add `claude-3-5-sonnet-20240620` (#331)

2024-06-20 Thread ELPA Syncer
branch: elpa/gptel
commit 44780a408a3cf73a03f1ece3a6b570c160914834
Author: Erich Grunewald 
Commit: GitHub 

gptel-anthropic: Add `claude-3-5-sonnet-20240620` (#331)

gptel-anthropic.el (gptel-make-anthropic): Add Add 
`claude-3-5-sonnet-20240620`.
---
 gptel-anthropic.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gptel-anthropic.el b/gptel-anthropic.el
index 353ba8dcdc..27767dd065 100644
--- a/gptel-anthropic.el
+++ b/gptel-anthropic.el
@@ -107,7 +107,8 @@
(lambda () (when-let (key (gptel--get-api-key))
 `(("x-api-key" . ,key)
   ("anthropic-version" . "2023-06-01")
-  (models '("claude-3-sonnet-20240229"
+  (models '("claude-3-5-sonnet-20240620"
+"claude-3-sonnet-20240229"
 "claude-3-haiku-20240307"
 "claude-3-opus-20240229"))
   (host "api.anthropic.com")



[nongnu] elpa/racket-mode 47cb399324: racket-raco-program: Obsolete but not alias for racket-program

2024-06-20 Thread ELPA Syncer
branch: elpa/racket-mode
commit 47cb399324f1ecd76cbc7c4af159e223c331c6e1
Author: Greg Hendershott 
Commit: Greg Hendershott 

racket-raco-program: Obsolete but not alias for racket-program

While reviewing issue #713, I realized that racket-raco-program should
use make-obsolete-variable -- /not/ define-obsolete-variable-alias.

For example we wouldn't want someone setting racket-raco-program to
"/path/to/raco" and accidentally setting racket-program.

Although I think that's N/A for #713 I want to take the opportunity to
fix this proactively.
---
 racket-custom.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/racket-custom.el b/racket-custom.el
index b5ceb888fa..86f504e919 100644
--- a/racket-custom.el
+++ b/racket-custom.el
@@ -23,10 +23,16 @@
   :group 'languages
   :link '(url-link :tag "README on GitHub" 
"https://github.com/greghendershott/racket-mode/blob/master/README.md";))
 
-;; These aliases need be _before_ the `defcustom' of `racket-program'
+;; This alias must be _before_ the `defcustom' of `racket-program'
 ;; (see note in doc for `define-obsolete-variable-alias').
 (define-obsolete-variable-alias 'racket-racket-program 'racket-program 
"2017-06-02")
-(define-obsolete-variable-alias 'racket-raco-program   'racket-program 
"2017-06-02")
+
+;; racket-raco-program is obsolete, but /not/ an alias for
+;; `racket-program'.
+(make-obsolete-variable
+ 'racket-raco-program
+ "raco is now run using \"`racket-program' racket -l raco\"."
+ "2017-06-02")
 
 (defvar racket--macp (eq 'darwin system-type))
 (defvar racket--winp (eq 'windows-nt system-type))



[nongnu] elpa/undo-fu-session 2a543d4168: Disable file locking when writing undo-data

2024-06-20 Thread ELPA Syncer
branch: elpa/undo-fu-session
commit 2a543d41685908e8ab52a9bab7d1c9dafbb0b0ab
Author: Campbell Barton 
Commit: Campbell Barton 

Disable file locking when writing undo-data

This intended to fix #10, since it's possible the lock-file name
is too long to write. In general locking undo data doesn't achieve
the outcome intended for file locking (see code-comments) so disable it.
---
 undo-fu-session.el | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/undo-fu-session.el b/undo-fu-session.el
index fbe097ad4d..7a33428efc 100755
--- a/undo-fu-session.el
+++ b/undo-fu-session.el
@@ -453,7 +453,21 @@ Argument PENDING-LIST an `pending-undo-list' compatible 
list."
   (progn
 (with-temp-buffer
   (insert-file-contents file-src-full)
-  (write-region nil nil file-dst-full nil 0))
+  ;; Don't create lock-files for the following reasons:
+  ;; - The file name may be too long and fail to lock (see 
#10).
+  ;; - Locking is already handled by saving the file from 
which this undo-data
+  ;;   is created so locking the undo-data if of limited use.
+  ;; - Small but unnecessary overhead.
+  ;;
+  ;; Having said this, there is a theoretical possibility two 
emacs instances
+  ;; could write undo-data at once. Nevertheless, the 
undo-data *must* be in
+  ;; sync with the file that is written (matching hash & 
length),
+  ;; so there is practically no benefit in writing a file that 
is "correct" with
+  ;; respect to locking, when the undo-data doesn't match the 
file contents.
+  ;; In summary, we would either have to lock both files at 
once, or locking
+  ;; when writing undo data close to useless.
+  (let ((create-lockfiles nil))
+(write-region nil nil file-dst-full nil 0)))
 
 (setq size-src (+ size-src (file-attribute-size 
(file-attributes file-src-full
 (setq size-dst (+ size-dst (file-attribute-size 
(file-attributes file-dst-full
@@ -652,7 +666,8 @@ Argument PENDING-LIST an `pending-undo-list' compatible 
list."
   (prin1 content-header (current-buffer))
   (write-char ?\n (current-buffer))
   (prin1 content-data (current-buffer))
-  (write-region nil nil undo-file nil 0)
+  (let ((create-lockfiles nil))
+(write-region nil nil undo-file nil 0))
   t)
 
 (defun undo-fu-session--save-safe ()



[elpa] branch externals/literate-scratch created (now c22a15e86a)

2024-06-20 Thread Sean Whitton via
spwhitton pushed a change to branch externals/literate-scratch.

at  c22a15e86a * literate-scratch: Import version 1.0

This branch includes the following new commits:

   new  c22a15e86a * literate-scratch: Import version 1.0




[elpa] externals/literate-scratch c22a15e86a: * literate-scratch: Import version 1.0

2024-06-20 Thread Sean Whitton via
branch: externals/literate-scratch
commit c22a15e86acf28da716532c26ba1371574c8e979
Author: Sean Whitton 
Commit: Sean Whitton 

* literate-scratch: Import version 1.0
---
 literate-scratch.el | 134 
 1 file changed, 134 insertions(+)

diff --git a/literate-scratch.el b/literate-scratch.el
new file mode 100644
index 00..e3ac223bbb
--- /dev/null
+++ b/literate-scratch.el
@@ -0,0 +1,134 @@
+;;; literate-scratch.el --- Lisp Interaction w/ text paragraphs  -*- 
lexical-binding: t -*-
+
+;; Copyright (C) 2023-2024  Free Software Foundation, Inc.
+
+;; Author: Sean Whitton 
+;; Maintainer: Sean Whitton 
+;; Package-Requires: ((emacs "29.1"))
+;; Version: 1.0
+;; URL: 
https://git.spwhitton.name/dotfiles/tree/.emacs.d/site-lisp/literate-scratch.el
+;; Keywords: lisp text
+
+;; This file 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.
+
+;; This file 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 this file.  If not, see .
+
+;;; Commentary:
+
+;; Variant Lisp Interaction mode for easier interleaving of paragraphs of
+;; plain text with Lisp code.  This means you can have
+;;
+;; ;; This buffer is for text that is not saved ...
+;; ;; To create a file, visit it with C-x C-f and ...
+;;
+;; (here is some Lisp)
+;;
+;; Here is a plain text paragraph )( including some unmatched parentheses.
+;; Uh oh!  Paredit won't like that.
+;;
+;; (here is some more Lisp)
+;;
+;; but (e.g.) Paredit won't complain about the unmatched parentheses.
+;; Indeed, the whole plain text paragraph is font-locked as a comment.
+;;
+;; If you use Paredit but want to be able to use *scratch* for both Lisp
+;; interaction and blocks of plain text, then this mode is for you.
+;; Also compatible with the `orgalist-mode' and `orgtbl-mode' minor modes.
+;;
+;; To enable this mode after installing this file, simply customise
+;; `initial-major-mode' to `literate-scratch-mode'.
+
+;;; News:
+
+;; Ver 1.0 2024/06/21 Sean Whitton
+;; Initial release.
+;; Thanks to Philip Kaludercic for review.
+
+;;; Code:
+
+(defun literate-scratch--extend (start end)
+  (save-excursion
+(let ((res1
+  (and (goto-char start)
+   (not (looking-at paragraph-separate))
+   (and-let* ((new (car (bounds-of-thing-at-point 'paragraph
+ (and (< new start)
+  (setq start new)
+ (res2
+  (and (goto-char end)
+   (not (looking-at paragraph-separate))
+   (and-let* ((new (cdr (bounds-of-thing-at-point 'paragraph
+ (and (> new end)
+  (setq end new))
+  (and (or res1 res2)
+  (cons start end)
+
+(defun literate-scratch--propertize (start end)
+  (goto-char start)
+  (let ((start (1- start)))
+(catch 'finish
+  (while t
+   (when-let* ((comment-start (nth 8 (syntax-ppss
+ (put-text-property (1- (point)) (point) 'syntax-table
+(eval-when-compile
+  (string-to-syntax "!")))
+ (put-text-property comment-start (point) 'syntax-multiline t))
+   (forward-paragraph 1)
+   (backward-paragraph 1)
+   (unless (> end (point) start)
+ (throw 'finish nil))
+   (setq start (point))
+   (unless
+   (save-excursion
+ (catch 'done
+   (while t
+ ;; Examine the syntax of the paragraph's first char.
+ ;; If it's whitespace, we need to check the previous
+ ;; paragraph, to handle multiple paragraphs within a defun.
+ (let ((syn
+(char-syntax
+ (char-after
+  ;; (1+ point) unless at end-of-buf or on first line
+  ;; of a paragraph beginning right at beg-of-buf.
+  (if (looking-at "\\`[[:space:]]*[^[:space:]\n]")
+  (point)
+(1+ (point)))
+   (cond ((bobp) (throw 'done (memq syn '(?\( ?<
+ ((memq syn '(?\( ?<)) (throw 'done t))
+ ((not (eq syn ?\s)) (throw 'done nil
+ (backward-paragraph 1
+ (put-text-property (point) (1+ (point)) 'syntax-table
+(eval-when-compile
+  (string-to-syntax "!"
+   (forward-p

[elpa] main 823c566838: * elpa-packages (literate-scratch): New package

2024-06-20 Thread Sean Whitton via
branch: main
commit 823c5668382057702fa2e691cba25590e3140bd9
Author: Sean Whitton 
Commit: Sean Whitton 

* elpa-packages (literate-scratch): New package
---
 elpa-packages | 1 +
 1 file changed, 1 insertion(+)

diff --git a/elpa-packages b/elpa-packages
index 4040ead47f..01612e322e 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -451,6 +451,7 @@
  (listen   :url "https://github.com/alphapapa/listen.el";
   :release-branch "stable"
   :doc "README.org")
+ (literate-scratch  :url nil)
  (llm  :url "https://github.com/ahyatt/llm";)
  (lmc  :url nil)
  (load-dir :url nil)