[elpa] externals/corfu 41fcbfbccb: corfu-docframe: Cleanup doc string

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 41fcbfbccb1ce647728638c79162fa7f9d2b091f
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-docframe: Cleanup doc string
---
 extensions/corfu-docframe.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/extensions/corfu-docframe.el b/extensions/corfu-docframe.el
index feba5e03ae..224902d2e6 100644
--- a/extensions/corfu-docframe.el
+++ b/extensions/corfu-docframe.el
@@ -119,8 +119,10 @@ Returns nil if an error occurs or the documentation 
content is empty."
(message-log-max nil))
(funcall fun candidate)
 (with-current-buffer (or (car-safe res) res)
-  (setq res (buffer-string)))
-(and (not (string-empty-p (string-trim res))) res)))
+  (setq res (replace-regexp-in-string
+ "[\\s-\n]*\\[back\\][\\s-\n]*" ""
+ (buffer-string))
+  (and (not (string-blank-p res)) res
 
 ;; TODO get rid of optional arguments?
 (defun corfu-docframe--size (&optional width height)



[elpa] externals/ef-themes 4a704cfc93: Add support for eglot

2022-11-18 Thread ELPA Syncer
branch: externals/ef-themes
commit 4a704cfc932d2e21310f701b2e625a6d5ef404d8
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Add support for eglot
---
 README.org   | 1 +
 ef-themes.el | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/README.org b/README.org
index dca76a812d..ab58cf65f5 100644
--- a/README.org
+++ b/README.org
@@ -1000,6 +1000,7 @@ everything most users need.
 - display-fill-column-indicator-mode
 - doom-modeline
 - ediff
+- eglot [Part of {{{development-version}}}]
 - eldoc
 - elfeed
 - embark
diff --git a/ef-themes.el b/ef-themes.el
index ca14e036d2..8370bf542c 100644
--- a/ef-themes.el
+++ b/ef-themes.el
@@ -1052,6 +1052,8 @@ Helper function for `ef-themes-preview-colors'."
 `(ediff-odd-diff-Ancestor ((,c :inherit ediff-even-diff-Ancestor)))
 `(ediff-odd-diff-B ((,c :inherit ediff-even-diff-B)))
 `(ediff-odd-diff-C ((,c :inherit ediff-even-diff-C)))
+ eglot
+`(eglot-mode-line ((,c :inherit bold :foreground ,modeline-info)))
  eldoc
 ;; NOTE: see https://github.com/purcell/package-lint/issues/187
 (list 'eldoc-highlight-function-argument `((,c :inherit warning 
:background ,bg-warning)))



[elpa] externals/org updated (70cee1810b -> 0b124d7968)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  70cee1810b lisp/ox.el: Fix compiler warning
   new  9e62aaf5e4 doc/org-manual.org: Suggest keywords to have space after 
colon
   new  fcf63fb31e lisp/ox-latex.el: fix `org-latex-guess-babel-language'
   new  0b124d7968 doc/org-manual.org: Clarify that :results none can be 
used as reference


Summary of changes:
 doc/org-manual.org | 13 -
 lisp/ox-latex.el   | 13 +++--
 2 files changed, 15 insertions(+), 11 deletions(-)



[elpa] externals/org fcf63fb31e 2/3: lisp/ox-latex.el: fix `org-latex-guess-babel-language'

2022-11-18 Thread ELPA Syncer
branch: externals/org
commit fcf63fb31e176264c6b9641f4aee7e74beae1e3a
Author: Juan Manuel Macias 
Commit: Ihor Radchenko 

lisp/ox-latex.el: fix `org-latex-guess-babel-language'

* (org-latex-guess-babel-language): If the user puts a string other
than AUTO as an argument to `\babelprovide', it gives an error when
exporting. For example:

`#+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew}'
---
 lisp/ox-latex.el | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index b5f81fe531..46a348a68f 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1669,12 +1669,13 @@ Return the new header."
 (if (not (string-match "babelprovide\\[.*\\]{\\(.+\\)}" header))
header
   (let ((prov (match-string 1 header)))
-   (when (equal "AUTO" prov)
- (replace-regexp-in-string (format
-"\\(babelprovide\\[.*\\]\\)\\({\\)%s}" 
prov)
-   (format "\\1\\2%s}"
-   (or language language-ini-only))
-   header t))
+   (if (equal "AUTO" prov)
+   (replace-regexp-in-string (format
+  
"\\(babelprovide\\[.*\\]\\)\\({\\)%s}" prov)
+ (format "\\1\\2%s}"
+ (or language language-ini-only))
+ header t)
+ header)
 
 (defun org-latex-guess-polyglossia-language (header info)
   "Set the Polyglossia language according to the LANGUAGE keyword.



[elpa] externals/org 9e62aaf5e4 1/3: doc/org-manual.org: Suggest keywords to have space after colon

2022-11-18 Thread ELPA Syncer
branch: externals/org
commit 9e62aaf5e47eb8356a86da5120c15231fad45cc4
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

doc/org-manual.org: Suggest keywords to have space after colon

* doc/org-manual.org (Summary of In-Buffer Settings): Declare that
keywords have space after colon.  This is not strictly true with the
current parser, but it will avoid problems when no space is given and
the value contains ":" in it.

Reported-by: Olivier 
Link: 
https://orgmode.org/list/caefuq3hwmvq-ajg51sm1pmy3y1vferarxcs5j3zxhudcn9j...@mail.gmail.com
---
 doc/org-manual.org | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 1369ab0bd6..d0cde3e156 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -19777,9 +19777,10 @@ manual, but here is a consolidated list for easy 
reference.
 #+cindex: special keywords
 
 In-buffer settings start with =#+=, followed by a keyword, a colon,
-and then a word for each setting.  Org accepts multiple settings on
-the same line.  Org also accepts multiple lines for a keyword.  This
-manual describes these settings throughout.  A summary follows here.
+one or more spaces, and then a word for each setting.  Org accepts
+multiple settings on the same line.  Org also accepts multiple lines
+for a keyword.  This manual describes these settings throughout.  A
+summary follows here.
 
 #+cindex: refresh set-up
 {{{kbd(C-c C-c)}}} activates any changes to the in-buffer settings.



[elpa] externals/org 0b124d7968 3/3: doc/org-manual.org: Clarify that :results none can be used as reference

2022-11-18 Thread ELPA Syncer
branch: externals/org
commit 0b124d796865c4fe9937f9bc0b5e18813efb57c4
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

doc/org-manual.org: Clarify that :results none can be used as reference

* doc/org-manual.org (Handling): Clarify that :results none are still
computed and can be used when referenced.
---
 doc/org-manual.org | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index d0cde3e156..318a12bfa2 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -18478,8 +18478,10 @@ options; they are mutually exclusive.
 
 - =none= ::
 
-  Do not process results at all.  No inserting in the Org mode buffer
-  nor echo them in the minibuffer.  Usage example: =:results none=.
+  Compute results, but do not do anything with them.  No inserting in
+  the Org mode buffer nor echo them in the minibuffer.  The results
+  can still be used when referenced from another code block.
+  Usage example: =:results none=.
 
 - =append= ::
 



[elpa] externals/detached 2a994e93ad 1/3: Update identifier to rely on working-directory

2022-11-18 Thread ELPA Syncer
branch: externals/detached
commit 2a994e93adb435cd2e5a382260616099fbc3cc89
Author: Niklas Eklund 
Commit: Niklas Eklund 

Update identifier to rely on working-directory
---
 detached.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/detached.el b/detached.el
index 3abf2d61eb..1ad3673a30 100644
--- a/detached.el
+++ b/detached.el
@@ -1112,7 +1112,7 @@ This function uses the `notifications' library."
   (string-join
`(,(detached-session-command session)
  ,(detached--host-str session)
- ,(detached-session-directory session))
+ ,(detached-session-working-directory session))
", "))
 
 (defun detached-session-view-function (session)



[elpa] externals/corfu 9f735cf4e6: Introduce corfu-docframe face

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 9f735cf4e690a226ce043480eea4fac17cca5b30
Author: Daniel Mendler 
Commit: Daniel Mendler 

Introduce corfu-docframe face
---
 extensions/corfu-docframe.el | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/extensions/corfu-docframe.el b/extensions/corfu-docframe.el
index 224902d2e6..69614e8428 100644
--- a/extensions/corfu-docframe.el
+++ b/extensions/corfu-docframe.el
@@ -43,6 +43,11 @@
 (eval-when-compile
   (require 'subr-x))
 
+(defface corfu-docframe
+  '((t :inherit corfu-default :height 0.8))
+  "Face used for the doc frame."
+  :group 'corfu-faces)
+
 (defcustom corfu-docframe-auto t
   "Display documentation popup automatically."
   :group 'corfu
@@ -59,7 +64,7 @@
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-docframe-max-width 80
+(defcustom corfu-docframe-max-width 50
   "The max width of the corfu doc popup in characters."
   :group 'corfu
   :type 'integer)
@@ -121,7 +126,7 @@ Returns nil if an error occurs or the documentation content 
is empty."
 (with-current-buffer (or (car-safe res) res)
   (setq res (replace-regexp-in-string
  "[\\s-\n]*\\[back\\][\\s-\n]*" ""
- (buffer-string))
+ (buffer-string)))
   (and (not (string-blank-p res)) res
 
 ;; TODO get rid of optional arguments?
@@ -269,14 +274,16 @@ the corfu popup, its value is 'bottom, 'top, 'right or 
'left."
   (when doc-changed
 (if-let (doc (corfu-docframe--get-doc candidate))
 (with-current-buffer (corfu--make-buffer " *corfu-docframe*" doc)
-  ;; TODO extract
+  ;; TODO extract settings
   (setq-local line-move-visual t
   truncate-partial-width-windows nil
   left-margin-width 1
   right-margin-width 1
   truncate-lines nil
   word-wrap t
-  fringe-indicator-alist '((continuation
+  fringe-indicator-alist '((continuation))
+  face-remapping-alist (copy-tree 
face-remapping-alist))
+  (setf (alist-get 'default face-remapping-alist) 'corfu-docframe))
   (corfu-docframe--hide)
   (setq doc-changed nil edges-changed nil)))
   (when (or doc-changed edges-changed)



[elpa] externals/detached 1d9e4bc541 3/3: Fix bug in attach functions

2022-11-18 Thread ELPA Syncer
branch: externals/detached
commit 1d9e4bc541ce8f27aa1fa75e48855dcae8010315
Author: Niklas Eklund 
Commit: Niklas Eklund 

Fix bug in attach functions
---
 detached-compile.el | 3 ++-
 detached.el | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/detached-compile.el b/detached-compile.el
index fefc3648eb..78a94b2066 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -88,7 +88,8 @@ Optionally EDIT-COMMAND."
   "Attach to SESSION with `compile'."
   (when (detached-valid-session session)
 (detached-with-session session
-  (let* ((detached-enabled t))
+  (let* ((detached-enabled t)
+ (detached-session-mode 'attached))
 (compilation-start `(,detached-session-command))
 
 ;;;###autoload
diff --git a/detached.el b/detached.el
index 3c948cd13e..479f1fdc17 100644
--- a/detached.el
+++ b/detached.el
@@ -913,6 +913,7 @@ This function uses the `notifications' library."
   (let* ((inhibit-message t))
 (detached-with-session session
   (cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
+ (detached-session-mode 'attached)
  (buffer (get-buffer-create detached--shell-command-buffer))
  (default-directory (detached-session-directory session))
  (command (detached-session-attach-command session :type 
'string)))



[elpa] externals/detached be2a8f4d8c 2/3: Add event detection for log creation

2022-11-18 Thread ELPA Syncer
branch: externals/detached
commit be2a8f4d8c2077b6a16063c40845dee920715ed8
Author: Niklas Eklund 
Commit: Niklas Eklund 

Add event detection for log creation

This speeds up the validation of a session.
---
 detached.el | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/detached.el b/detached.el
index 1ad3673a30..3c948cd13e 100644
--- a/detached.el
+++ b/detached.el
@@ -1803,6 +1803,7 @@ log to deduce the end time."
 If event is caused by the deletion of a socket, locate the related
 session and trigger a state transition."
   (pcase-let* ((`(,_ ,action ,file) event))
+;; Session becomes inactive
 (when (and (eq action 'deleted)
(string= "socket" (file-name-extension file)))
 
@@ -1832,7 +1833,23 @@ session and trigger a state transition."
   (file-notify-rm-watch
(alist-get session-directory detached--watched-session-directories 
nil nil #'string=))
   (setq detached--watched-session-directories
-(assoc-delete-all session-directory 
detached--watched-session-directories)))
+(assoc-delete-all session-directory 
detached--watched-session-directories)
+
+;; Session becomes active
+(when (and (eq action 'created)
+   (string= "log" (file-name-extension file)))
+  (when-let* ((id (intern (file-name-base file)))
+  (session
+   (or (alist-get id detached--unvalidated-sessions)
+   (detached--db-get-session id)))
+  (session-directory (detached-session-directory session))
+  (is-primary
+   (detached--primary-detached-emacs-p session)))
+(setq detached--unvalidated-sessions
+  (assq-delete-all (detached-session-id session)
+   detached--unvalidated-sessions))
+(setf (detached--session-state session) 'active)
+(detached--db-insert-entry session)
 
 (defun detached--initialize-session (session)
   "Initialize SESSION."



[elpa] externals/detached updated (141bb36075 -> 1d9e4bc541)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/detached.

  from  141bb36075 Improve support for local sessions
   new  2a994e93ad Update identifier to rely on working-directory
   new  be2a8f4d8c Add event detection for log creation
   new  1d9e4bc541 Fix bug in attach functions


Summary of changes:
 detached-compile.el |  3 ++-
 detached.el | 22 --
 2 files changed, 22 insertions(+), 3 deletions(-)



[nongnu] elpa/sweeprolog f4ca9b1404: ENHANCED: allow sweeprolog-forward-hole to wrap around

2022-11-18 Thread ELPA Syncer
branch: elpa/sweeprolog
commit f4ca9b140479880b9148734b8be76b50b158d112
Author: Eshel Yaron 
Commit: Eshel Yaron 

ENHANCED: allow sweeprolog-forward-hole to wrap around

* sweeprolog.el (sweeprolog--next-hole, sweeprolog--previous-hole):
new functions.
(sweeprolog--forward-hole, sweeprolog--backward-hole): add WRAP arg.
---
 sweeprolog.el | 84 +++
 1 file changed, 73 insertions(+), 11 deletions(-)

diff --git a/sweeprolog.el b/sweeprolog.el
index f992b826b0..56f7277bbd 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -2473,18 +2473,80 @@ Interactively, POINT is set to the current point."
   (or (re-search-forward (rx "." (or white "\n")) nil t)
   (goto-char (point-max))
 
-(defun sweeprolog--forward-hole ()
-  (if-let ((prop (text-property-search-forward 'sweeprolog-hole)))
+(defun sweeprolog--next-hole (&optional wrap)
+  "Return the bounds of the next hole in the current buffer.
+
+When WRAP in non-nil, wrap around if no holes are found between
+point and the end of the buffer."
+  (let ((current-hole-beg
+ (save-excursion
+   (while (and (get-text-property (point) 'sweeprolog-hole)
+   (not (bobp)))
+ (forward-char -1))
+   (point
+(while (and (get-text-property (point) 'sweeprolog-hole)
+(not (eobp)))
+  (forward-char))
+(while (not (or (get-text-property (point) 'sweeprolog-hole)
+(eobp)))
+  (forward-char))
+(if (eobp)
+(when wrap
+  (save-restriction
+(goto-char (point-min))
+(narrow-to-region (point) current-hole-beg)
+(sweeprolog--next-hole)))
+  (let ((beg (point)))
+(while (and (get-text-property (point) 'sweeprolog-hole)
+(not (eobp)))
+  (forward-char))
+(cons beg (point))
+
+(defun sweeprolog--previous-hole (&optional wrap)
+  "Return the bounds of the previous hole in the current buffer.
+
+When WRAP in non-nil, wrap around if no holes are found between
+point and the beginning of the buffer."
+  (let ((current-hole-end
+ (save-excursion
+   (while (and (get-text-property (point) 'sweeprolog-hole)
+   (not (eobp)))
+ (forward-char))
+   (point
+(while (and (get-text-property (point) 'sweeprolog-hole)
+(not (bobp)))
+  (forward-char -1))
+(while (not (or (get-text-property (point) 'sweeprolog-hole)
+(bobp)))
+  (forward-char -1))
+(if (bobp)
+(when wrap
+  (save-restriction
+(goto-char (point-max))
+(narrow-to-region current-hole-end (point))
+(sweeprolog--previous-hole)))
+  (let ((end (point)))
+(while (and (get-text-property (point) 'sweeprolog-hole)
+(not (bobp)))
+  (forward-char -1))
+(cons (point) end)
+
+(defun sweeprolog--forward-hole (&optional wrap)
+  (if-let ((hole (sweeprolog--next-hole wrap))
+   (beg  (car hole))
+   (end  (cdr hole)))
   (progn
-(push-mark (prop-match-beginning prop) t t))
+(goto-char end)
+(push-mark beg t t))
 (user-error "No holes following point")))
 
-(defun sweeprolog--backward-hole ()
-  (if-let ((prop (text-property-search-backward 'sweeprolog-hole))
-   (end (prop-match-end prop)))
+(defun sweeprolog--backward-hole (&optional wrap)
+  (if-let ((hole (sweeprolog--previous-hole wrap))
+   (beg  (car hole))
+   (end  (cdr hole)))
   (progn
 (goto-char end)
-(push-mark (1- end) t t))
+(push-mark beg t t))
 (user-error "No holes before point")))
 
 (defun sweeprolog-forward-hole (&optional arg)
@@ -2496,11 +2558,11 @@ instead."
   (setq arg (or arg 1)
 deactivate-mark nil)
   (if (> 0 arg)
-  (sweeprolog--backward-hole)
-(sweeprolog--forward-hole)))
+  (sweeprolog--backward-hole t)
+(sweeprolog--forward-hole t)))
 
-(defun sweeprolog--hole ()
-  (propertize "_"
+(defun sweeprolog--hole (&optional string)
+  (propertize (or string "_")
   'sweeprolog-hole t
   'rear-sticky '(sweeprolog-hole)))
 



[elpa] externals/corfu 82f8ae9c9e 4/7: Add corfu-infoframe-map

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 82f8ae9c9e3a8e35add9b7e772d712b32b2f115e
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add corfu-infoframe-map
---
 extensions/corfu-infoframe.el | 38 +-
 1 file changed, 25 insertions(+), 13 deletions(-)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index f6cc215e95..270e435401 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -32,12 +32,11 @@
 ;; Display a documentation popup for completion candidate when using
 ;; Corfu. The `corfu-infoframe-mode' must be enabled globally. Set
 ;; `corfu-infoframe-auto' if you want the documentation popup frame to
-;; be displayed automatically. If you prefer manual toggling bind
-;; `corfu-infoframe-toggle' to a key in `corfu-map':
-;;
-;; (define-key corfu-map "\M-d" #'corfu-infoframe-toggle)
-;; (define-key corfu-map "\M-g" #'corfu-infoframe-location)
-;; (define-key corfu-map "\M-h" #'corfu-infoframe-documentation)
+;; be displayed automatically. For manual toggling the commands
+;; `corfu-infoframe-toggle', `corfu-infoframe-location' and
+;; `corfu-infoframe-documentation' are bound in the
+;; `corfu-infoframe-map'. `corfu-infoframe-toggle' to a key in
+;; `corfu-map'.
 
 ;;; Code:
 
@@ -81,6 +80,14 @@
   :group 'corfu
   :type 'boolean)
 
+(defvar corfu-infoframe-map
+  (let ((map (make-sparse-keymap)))
+(define-key map "\M-d" #'corfu-infoframe-documentation)
+(define-key map "\M-l" #'corfu-infoframe-location)
+(define-key map "\M-t" #'corfu-infoframe-toggle)
+map)
+  "Additional keymap activated in infoframe mode.")
+
 (defvar-local corfu-infoframe--toggle t
   "Local infoframe toggle state.")
 
@@ -386,6 +393,8 @@ not be displayed until this command is called again, even if
 
 (defun corfu-infoframe--exhibit (&rest _)
   "Update the info frame automatically."
+  (add-to-list 'minor-mode-overriding-map-alist
+   `(,#'corfu-infoframe-mode . ,corfu-infoframe-map))
   (if (and (frame-live-p corfu--frame)
(frame-visible-p corfu--frame)
(>= corfu--index 0))
@@ -405,22 +414,25 @@ not be displayed until this command is called again, even 
if
#'corfu-infoframe--show candidate)
 (corfu-infoframe--hide)))
 
+(defun corfu-infoframe--teardown ()
+  "Teardown the info frame state."
+  (corfu-infoframe--hide)
+  (mapc #'kill-local-variable corfu-infoframe--state-vars)
+  (setq minor-mode-overriding-map-alist
+(assq-delete-all #'corfu-infoframe-mode
+ minor-mode-overriding-map-alist)))
+
 ;;;###autoload
 (define-minor-mode corfu-infoframe-mode
   "Corfu info frame minor mode."
   :global t :group 'corfu
   (cond
(corfu-infoframe-mode
-;; TODO seq-union (Emacs 28, seq compatibility package?)
-(setq corfu--state-vars (seq-uniq (append corfu--state-vars
-  corfu-infoframe--state-vars)))
 (advice-add #'corfu--exhibit :after #'corfu-infoframe--exhibit)
-(advice-add #'corfu--teardown :before #'corfu-infoframe--hide))
+(advice-add #'corfu--teardown :before #'corfu-infoframe--teardown))
(t
-(setq corfu--state-vars (seq-difference corfu--state-vars
-corfu-infoframe--state-vars))
 (advice-remove #'corfu--exhibit #'corfu-infoframe--exhibit)
-(advice-remove #'corfu--teardown #'corfu-infoframe--hide
+(advice-remove #'corfu--teardown #'corfu-infoframe--teardown
 
 (provide 'corfu-infoframe)
 ;;; corfu-infoframe.el ends here



[elpa] externals/corfu cfc97d4885 7/7: corfu-infoframe: Reduce print length (Fix #249)

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit cfc97d4885a48470f0b82d68e01dd130db4c34e3
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-infoframe: Reduce print length (Fix #249)
---
 extensions/corfu-infoframe.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index 1c3075329e..da897d952f 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -157,7 +157,11 @@ See `frame-edges' for details.")
   (when-let* ((fun (plist-get corfu--extra :company-doc-buffer))
   (res (save-excursion
  (let ((inhibit-message t)
-   (message-log-max nil))
+   (message-log-max nil)
+   ;; Reduce print length for elisp backend (#249)
+   (print-level 3)
+   (print-length (* corfu-infoframe-max-width
+corfu-infoframe-max-height)))
(funcall fun candidate)
 (with-current-buffer (or (car-safe res) res)
   (setq res (replace-regexp-in-string



[elpa] externals/corfu updated (9f735cf4e6 -> cfc97d4885)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  9f735cf4e6 Introduce corfu-docframe face
   new  52f6701197 Try to implement location support for docframe
   new  4e5a41b8fd Add corfu-docframe-location and 
corfu-docframe-documentation
   new  de6c1dd044 Rename to corfu-infoframe
   new  82f8ae9c9e Add corfu-infoframe-map
   new  4e0ee2f98e corfu-infoframe: Update commentary
   new  7aa006e000 corfu-infoframe: Remap scroll commands
   new  cfc97d4885 corfu-infoframe: Reduce print length (Fix #249)


Summary of changes:
 README.org|   4 +-
 extensions/corfu-docframe.el  | 380 
 extensions/corfu-infoframe.el | 444 ++
 3 files changed, 446 insertions(+), 382 deletions(-)
 delete mode 100644 extensions/corfu-docframe.el
 create mode 100644 extensions/corfu-infoframe.el



[elpa] externals/corfu 4e0ee2f98e 5/7: corfu-infoframe: Update commentary

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 4e0ee2f98e03dde4665b45c23ecb4ed3c51c7d05
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-infoframe: Update commentary
---
 extensions/corfu-infoframe.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index 270e435401..26470467a2 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -32,11 +32,11 @@
 ;; Display a documentation popup for completion candidate when using
 ;; Corfu. The `corfu-infoframe-mode' must be enabled globally. Set
 ;; `corfu-infoframe-auto' if you want the documentation popup frame to
-;; be displayed automatically. For manual toggling the commands
-;; `corfu-infoframe-toggle', `corfu-infoframe-location' and
-;; `corfu-infoframe-documentation' are bound in the
-;; `corfu-infoframe-map'. `corfu-infoframe-toggle' to a key in
-;; `corfu-map'.
+;; be displayed automatically.
+
+;; For manual toggling the commands `corfu-infoframe-toggle',
+;; `corfu-infoframe-location' and `corfu-infoframe-documentation' are
+;; bound in the `corfu-infoframe-map'.
 
 ;;; Code:
 



[elpa] externals/corfu 52f6701197 1/7: Try to implement location support for docframe

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 52f67011979ec928bf9032851fd871cee00db3c8
Author: Daniel Mendler 
Commit: Daniel Mendler 

Try to implement location support for docframe
---
 extensions/corfu-docframe.el | 33 ++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/extensions/corfu-docframe.el b/extensions/corfu-docframe.el
index 69614e8428..a39e4375d4 100644
--- a/extensions/corfu-docframe.el
+++ b/extensions/corfu-docframe.el
@@ -82,6 +82,10 @@
 (defvar-local corfu-docframe--toggle t
   "Local docframe toggle state.")
 
+(defvar-local corfu-docframe--function
+  #'corfu-docframe--documentation
+  "Documentation function.")
+
 (defvar corfu-docframe--frame nil
   "Doc frame.")
 
@@ -107,7 +111,8 @@ See `frame-edges' for details.")
   '(corfu-docframe--candidate
 corfu-docframe--edges
 corfu-docframe--direction
-corfu-docframe--toggle)
+corfu-docframe--toggle
+corfu-docframe--function)
   "Buffer-local state variables used by corfu-docframe.")
 
 (defun corfu-docframe--visible-p ()
@@ -115,7 +120,23 @@ See `frame-edges' for details.")
   (and (frame-live-p corfu-docframe--frame)
(frame-visible-p corfu-docframe--frame)))
 
-(defun corfu-docframe--get-doc (candidate)
+(defun corfu-docframe--get-source (candidate)
+(when-let* ((fun (plist-get corfu--extra :company-location))
+(loc (funcall fun candidate))
+(res (or (and (bufferp (car loc)) (car loc)) 
(find-file-noselect (car loc) t
+  (save-window-excursion
+(with-current-buffer res
+  (save-excursion
+(save-restriction
+  (widen)
+  (if (bufferp (car loc))
+  (goto-char (cdr loc))
+(goto-char (point-min))
+(forward-line (1- (cdr loc
+  (setq res (buffer-substring (point) (point-max)))
+  (and (not (string-blank-p res)) res)))
+
+(defun corfu-docframe--get-documentation (candidate)
   "Get the documentation for CANDIDATE.
 Returns nil if an error occurs or the documentation content is empty."
   (when-let* ((fun (plist-get corfu--extra :company-doc-buffer))
@@ -272,7 +293,7 @@ the corfu popup, its value is 'bottom, 'top, 'right or 
'left."
(new-edges (frame-edges corfu--frame 'inner-edges))
(edges-changed (not (equal new-edges corfu-docframe--edges
   (when doc-changed
-(if-let (doc (corfu-docframe--get-doc candidate))
+(if-let (doc (corfu-docframe--get-source candidate))
 (with-current-buffer (corfu--make-buffer " *corfu-docframe*" doc)
   ;; TODO extract settings
   (setq-local line-move-visual t
@@ -325,6 +346,12 @@ If ARG is omitted or nil, scroll down by a near full 
screen."
   (interactive "p")
   (corfu-docframe-scroll-up (- (or n 1
 
+(defun corfu-docframe-show-location ()
+  (setq corfu-docframe--function #'corfu-)
+  (when-let (candidate (and (>= corfu--index 0)
+(nth corfu--index corfu--candidates)))
+(corfu-docframe--show candidate)))
+
 (defun corfu-docframe-toggle ()
   "Toggle the doc popup display or hide.
 



[elpa] externals/corfu 4e5a41b8fd 2/7: Add corfu-docframe-location and corfu-docframe-documentation

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 4e5a41b8fde566b5437b7875635e863e7a65b29a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add corfu-docframe-location and corfu-docframe-documentation
---
 extensions/corfu-docframe.el | 55 +---
 1 file changed, 37 insertions(+), 18 deletions(-)

diff --git a/extensions/corfu-docframe.el b/extensions/corfu-docframe.el
index a39e4375d4..942ec2b1f0 100644
--- a/extensions/corfu-docframe.el
+++ b/extensions/corfu-docframe.el
@@ -36,6 +36,8 @@
 ;; `corfu-docframe-toggle' to a key in `corfu-map':
 ;;
 ;; (define-key corfu-map "\M-d" #'corfu-docframe-toggle)
+;; (define-key corfu-map "\M-g" #'corfu-docframe-location)
+;; (define-key corfu-map "\M-h" #'corfu-docframe-documentation)
 
 ;;; Code:
 
@@ -83,7 +85,7 @@
   "Local docframe toggle state.")
 
 (defvar-local corfu-docframe--function
-  #'corfu-docframe--documentation
+  #'corfu-docframe--get-documentation
   "Documentation function.")
 
 (defvar corfu-docframe--frame nil
@@ -120,25 +122,29 @@ See `frame-edges' for details.")
   (and (frame-live-p corfu-docframe--frame)
(frame-visible-p corfu-docframe--frame)))
 
-(defun corfu-docframe--get-source (candidate)
+(defun corfu-docframe--get-location (candidate)
+  "Get source at location of CANDIDATE."
+  (save-excursion
 (when-let* ((fun (plist-get corfu--extra :company-location))
 (loc (funcall fun candidate))
 (res (or (and (bufferp (car loc)) (car loc)) 
(find-file-noselect (car loc) t
-  (save-window-excursion
-(with-current-buffer res
-  (save-excursion
-(save-restriction
-  (widen)
-  (if (bufferp (car loc))
-  (goto-char (cdr loc))
-(goto-char (point-min))
-(forward-line (1- (cdr loc
-  (setq res (buffer-substring (point) (point-max)))
-  (and (not (string-blank-p res)) res)))
+  (with-current-buffer res
+(save-excursion
+  (save-restriction
+(widen)
+(if (bufferp (car loc))
+(goto-char (cdr loc))
+  (goto-char (point-min))
+  (forward-line (1- (cdr loc
+(let ((beg (point)))
+  (forward-line (* 2 corfu-docframe-max-height))
+  (when jit-lock-mode
+(jit-lock-fontify-now beg (point)))
+  (setq res (buffer-substring beg (point)))
+  (and (not (string-blank-p res)) res
 
 (defun corfu-docframe--get-documentation (candidate)
-  "Get the documentation for CANDIDATE.
-Returns nil if an error occurs or the documentation content is empty."
+  "Get the documentation for CANDIDATE."
   (when-let* ((fun (plist-get corfu--extra :company-doc-buffer))
   (res (save-excursion
  (let ((inhibit-message t)
@@ -293,7 +299,7 @@ the corfu popup, its value is 'bottom, 'top, 'right or 
'left."
(new-edges (frame-edges corfu--frame 'inner-edges))
(edges-changed (not (equal new-edges corfu-docframe--edges
   (when doc-changed
-(if-let (doc (corfu-docframe--get-source candidate))
+(if-let (doc (funcall corfu-docframe--function candidate))
 (with-current-buffer (corfu--make-buffer " *corfu-docframe*" doc)
   ;; TODO extract settings
   (setq-local line-move-visual t
@@ -346,12 +352,25 @@ If ARG is omitted or nil, scroll down by a near full 
screen."
   (interactive "p")
   (corfu-docframe-scroll-up (- (or n 1
 
-(defun corfu-docframe-show-location ()
-  (setq corfu-docframe--function #'corfu-)
+(defun corfu-docframe--set-function (fun)
+  "Set popup documentation getter FUN."
+  (setq corfu-docframe--function fun
+corfu-docframe--candidate nil
+corfu-docframe--toggle t)
   (when-let (candidate (and (>= corfu--index 0)
 (nth corfu--index corfu--candidates)))
 (corfu-docframe--show candidate)))
 
+(defun corfu-docframe-documentation ()
+  "Show documentation in popup."
+  (interactive)
+  (corfu-docframe--set-function #'corfu-docframe--get-documentation))
+
+(defun corfu-docframe-location ()
+  "Show location in popup."
+  (interactive)
+  (corfu-docframe--set-function #'corfu-docframe--get-location))
+
 (defun corfu-docframe-toggle ()
   "Toggle the doc popup display or hide.
 



[elpa] externals/corfu de6c1dd044 3/7: Rename to corfu-infoframe

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit de6c1dd0448c643d54bc487db666fff2f4b85927
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename to corfu-infoframe
---
 README.org |   4 +-
 .../{corfu-docframe.el => corfu-infoframe.el}  | 304 ++---
 2 files changed, 154 insertions(+), 154 deletions(-)

diff --git a/README.org b/README.org
index 1f2ef8daa2..d0b81318f6 100644
--- a/README.org
+++ b/README.org
@@ -445,13 +445,13 @@ be enabled manually if desired. Furthermore it is 
possible to install all of the
 files separately, both ~corfu.el~ and the ~corfu-*.el~ extensions. Currently 
the
 following extensions come with the Corfu ELPA package:
 
-- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-docframe.el][corfu-docframe]]:
 Display candidate documentation in a popup frame next to the
-  candidate menu.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-history.el][corfu-history]]:
 =corfu-history-mode= remembers selected candidates and sorts the
   candidates by their history position.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]:
 =corfu-indexed-mode= allows you to select indexed candidates with
   prefix arguments.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-info.el][corfu-info]]:
 Actions to access the candidate location and documentation.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-infoframe.el][corfu-infoframe]]:
 Display candidate documentation or source in a popup frame
+  next to the candidate menu.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-quick.el][corfu-quick]]:
 Commands to select using Avy-style quick keys.
 
 See the Commentary of those files for configuration details.
diff --git a/extensions/corfu-docframe.el b/extensions/corfu-infoframe.el
similarity index 56%
rename from extensions/corfu-docframe.el
rename to extensions/corfu-infoframe.el
index 942ec2b1f0..f6cc215e95 100644
--- a/extensions/corfu-docframe.el
+++ b/extensions/corfu-infoframe.el
@@ -1,4 +1,4 @@
-;;; corfu-docframe.el --- Documentation popup frame for Corfu -*- 
lexical-binding: t -*-
+;;; corfu-infoframe.el --- Candidate information popup frame for Corfu -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -30,14 +30,14 @@
 ;; experimental. The public interface may change any time.
 ;;
 ;; Display a documentation popup for completion candidate when using
-;; Corfu. The `corfu-docframe-mode' must be enabled globally. Set
-;; `corfu-docframe-auto' if you want the documentation popup to be
-;; displayed automatically. If you prefer manual toggling bind
-;; `corfu-docframe-toggle' to a key in `corfu-map':
+;; Corfu. The `corfu-infoframe-mode' must be enabled globally. Set
+;; `corfu-infoframe-auto' if you want the documentation popup frame to
+;; be displayed automatically. If you prefer manual toggling bind
+;; `corfu-infoframe-toggle' to a key in `corfu-map':
 ;;
-;; (define-key corfu-map "\M-d" #'corfu-docframe-toggle)
-;; (define-key corfu-map "\M-g" #'corfu-docframe-location)
-;; (define-key corfu-map "\M-h" #'corfu-docframe-documentation)
+;; (define-key corfu-map "\M-d" #'corfu-infoframe-toggle)
+;; (define-key corfu-map "\M-g" #'corfu-infoframe-location)
+;; (define-key corfu-map "\M-h" #'corfu-infoframe-documentation)
 
 ;;; Code:
 
@@ -45,59 +45,59 @@
 (eval-when-compile
   (require 'subr-x))
 
-(defface corfu-docframe
+(defface corfu-infoframe
   '((t :inherit corfu-default :height 0.8))
-  "Face used for the doc frame."
+  "Face used for the info frame."
   :group 'corfu-faces)
 
-(defcustom corfu-docframe-auto t
+(defcustom corfu-infoframe-auto t
   "Display documentation popup automatically."
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-docframe-delay 1.0
+(defcustom corfu-infoframe-delay 1.0
   "The number of seconds to wait before displaying the documentation popup."
   :group 'corfu
   :type '(choice (const :tag "immediate" 0)
  (number :tag "seconds")))
 
-(defcustom corfu-docframe-hide t
+(defcustom corfu-infoframe-hide t
   "Hide the popup during the transition between candidates."
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-docframe-max-width 50
-  "The max width of the corfu doc popup in characters."
+(defcustom corfu-infoframe-max-width 50
+  "The max width of the info frame in characters."
   :group 'corfu
   :type 'integer)
 
-(defcustom corfu-docframe-max-height 10
-  "The max height of the corfu doc popup in characters."
+(defcustom corfu-infoframe-max-height 10
+  "The max height of the info frame in characters."
   :group 'corfu
   :type 'integer)
 
-(defcustom corfu-docframe-resize t
-  "Resize the corfu doc popup automatically if non-nil."
+(defcustom corfu-infoframe-resize t
+  "Resize the info frame automatically if non-nil."
   :group 'corfu
   :type 'boolean)
 
-(defvar-local corfu-docframe--toggle t
-  "Local docframe toggle state

[elpa] externals/corfu 7aa006e000 6/7: corfu-infoframe: Remap scroll commands

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 7aa006e0005fd54cbca140eb45c5f3272ae281ab
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-infoframe: Remap scroll commands
---
 extensions/corfu-infoframe.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index 26470467a2..1c3075329e 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -85,6 +85,8 @@
 (define-key map "\M-d" #'corfu-infoframe-documentation)
 (define-key map "\M-l" #'corfu-infoframe-location)
 (define-key map "\M-t" #'corfu-infoframe-toggle)
+(define-key map [remap scroll-other-window] #'corfu-infoframe-scroll-up)
+(define-key map [remap scroll-other-window-down] 
#'corfu-infoframe-scroll-down)
 map)
   "Additional keymap activated in infoframe mode.")
 



[nongnu] elpa/idris-mode ca860db9ae 4/6: Merge pull request #562 from keram/make-lemma-underscore

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit ca860db9ae49df43b7d784243698869ba02b5dd4
Merge: 1dc558ad24 3c3a87c66c
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #562 from keram/make-lemma-underscore

Fix failure to find beginning of function type definition
---
 idris-commands.el   | 4 ++--
 test-data/MakeLemma.idr | 6 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 3645b8ba7d..925cff867f 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -712,8 +712,8 @@ Otherwise, case split as a pattern variable."
  ;; now we add the type signature - search upwards for the 
current
  ;; signature, then insert before it
  (re-search-backward (if (idris-lidr-p)
- 
"^\\(>\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:"
-   
"^\\(\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:"))
+ 
"^\\(>\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:"
+   
"^\\(\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:"))
  (let ((indentation (match-string 1)) end-point)
(beginning-of-line)
(insert indentation)
diff --git a/test-data/MakeLemma.idr b/test-data/MakeLemma.idr
index 517e92b93e..d4f86f3d5d 100644
--- a/test-data/MakeLemma.idr
+++ b/test-data/MakeLemma.idr
@@ -3,8 +3,6 @@ module MakeLemma
 -- (idris-test-run-goto-char #'idris-make-lemma)
 data Test = A | B
 
-test : Test -> Test
+my_lemmaTest : Test -> Test
 --   +++
-test x = ?make_lemma
-
-
+my_lemmaTest x = ?my_lemmaTest_rhs



[nongnu] elpa/idris-mode updated (1dc558ad24 -> 67e06eccbd)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch elpa/idris-mode.

  from  1dc558ad24 Merge pull request #561 from jfdm/fix-test
   new  3c3a87c66c Fix failure to find beginning of function type definition
   new  ca860db9ae Merge pull request #562 from keram/make-lemma-underscore
   new  62c3ad2b0d Make empty string always return value from 
`idris-process-filter`
   new  43e8a6e723 Merge pull request #564 from 
keram/fix-encouragement-in-process-buffer
   new  8329b73be8 Move "words of encouragement" from minibuffer to Idris 
repl banner
   new  67e06eccbd Merge pull request #565 from 
keram/words-of-encouragement-in-repl-banner


Summary of changes:
 idris-commands.el   | 4 ++--
 idris-repl.el   | 4 +++-
 inferior-idris.el   | 8 +++-
 test-data/MakeLemma.idr | 6 ++
 4 files changed, 10 insertions(+), 12 deletions(-)



[nongnu] elpa/idris-mode 67e06eccbd 6/6: Merge pull request #565 from keram/words-of-encouragement-in-repl-banner

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit 67e06eccbd063078df9671169c60ed5bb941d9cf
Merge: 43e8a6e723 8329b73be8
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #565 from keram/words-of-encouragement-in-repl-banner

Move "words of encouragement" from minibuffer to Idris repl banner
---
 idris-repl.el | 4 +++-
 inferior-idris.el | 4 +---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/idris-repl.el b/idris-repl.el
index aaebbecd2b..81d10d366c 100644
--- a/idris-repl.el
+++ b/idris-repl.el
@@ -96,7 +96,9 @@ Returns non-`nil' on success, `nil' on failure."
  version-string)
 (insert (propertize (concat "Idris " version-string)
 'face 'italic)
-"\n\n")
+"\n")))
+(when idris-display-words-of-encouragement
+  (insert (idris-random-words-of-encouragement) "\n"
 
 (defun idris-repl-insert-prompt (&optional always-insert)
   "Insert or update Idris prompt in buffer.
diff --git a/inferior-idris.el b/inferior-idris.el
index 7e313552dd..b0b7ff5527 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -141,9 +141,7 @@ directory variables.")
 (set-process-query-on-exit-flag idris-connection t)
 (setq idris-process-current-working-directory "")
 (run-hooks 'idris-run-hook)
-(when idris-display-words-of-encouragement
-  (message "Connected. %s" (idris-random-words-of-encouragement)))
-))
+(message "Connection to Idris established.")))
 
 (defun idris-sentinel (_process msg)
   (message "Idris disconnected: %s" (substring msg 0 -1))



[nongnu] elpa/idris-mode 62c3ad2b0d 2/6: Make empty string always return value from `idris-process-filter`

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit 62c3ad2b0d67c376b5d5d1ce894ad9942531769c
Author: Marek L 
Commit: Marek L 

Make empty string always return value from `idris-process-filter`

Why:
In commit: 74731b53caa6b2a2a was introduced regression by moving the ""
inside of the if expression causing it being return value only in some
cases.
The return value from idris-process-filter is written into idris-process
buffer and
after commit 74731b5 this become mostly the output of idris-connect
which consequently returns idris-words-of-encouragement.
Because now the *idris-process* buffer is not empty it is moved to the
front and interrupts users workflow.

Downside of this fix is that the words of encouragement
may be lost from users sight due to another messages when loading
file to Idris. This will be addressed in separate commit.
---
 inferior-idris.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inferior-idris.el b/inferior-idris.el
index a74b573ba8..7e313552dd 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -189,8 +189,8 @@ directory variables.")
   (if (not (string-match idris-process-port-with-warning-output-regexp 
string))
   (idris-warn string)
 (idris-warn (match-string idris-warning-matcher string))
-(idris-connect (string-to-number (match-string 
idris-warning-port-matcher string
-  ""
+(idris-connect (string-to-number (match-string 
idris-warning-port-matcher string)
+"")))
 
 (defun idris-show-process-buffer (string)
   "Show the Idris process buffer if STRING is non-empty."



[nongnu] elpa/idris-mode 3c3a87c66c 1/6: Fix failure to find beginning of function type definition

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit 3c3a87c66cba6c16851999ea93002e78245d5a6a
Author: Marek L 
Commit: Marek L 

Fix failure to find beginning of function type definition

when lifting hole and function name contains underscore.
Previously in such case the `M-x make-lemma` command ends with:
```
Test idris-make-lemma/test-data/MakeLemma condition:
(search-failed "^\\(\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:")
```
---
 idris-commands.el   | 4 ++--
 test-data/MakeLemma.idr | 6 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 3645b8ba7d..925cff867f 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -712,8 +712,8 @@ Otherwise, case split as a pattern variable."
  ;; now we add the type signature - search upwards for the 
current
  ;; signature, then insert before it
  (re-search-backward (if (idris-lidr-p)
- 
"^\\(>\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:"
-   
"^\\(\\s-*\\)\\(([^)]+)\\|\\w+\\)\\s-*:"))
+ 
"^\\(>\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:"
+   
"^\\(\\s-*\\)\\(([^)]+)\\|[a-zA-Z_0-9]+\\)\\s-*:"))
  (let ((indentation (match-string 1)) end-point)
(beginning-of-line)
(insert indentation)
diff --git a/test-data/MakeLemma.idr b/test-data/MakeLemma.idr
index 517e92b93e..d4f86f3d5d 100644
--- a/test-data/MakeLemma.idr
+++ b/test-data/MakeLemma.idr
@@ -3,8 +3,6 @@ module MakeLemma
 -- (idris-test-run-goto-char #'idris-make-lemma)
 data Test = A | B
 
-test : Test -> Test
+my_lemmaTest : Test -> Test
 --   +++
-test x = ?make_lemma
-
-
+my_lemmaTest x = ?my_lemmaTest_rhs



[nongnu] elpa/idris-mode 43e8a6e723 5/6: Merge pull request #564 from keram/fix-encouragement-in-process-buffer

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit 43e8a6e7233757355b78489a1ee0f61730fb4b10
Merge: ca860db9ae 62c3ad2b0d
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #564 from keram/fix-encouragement-in-process-buffer

Make empty string always return value from `idris-process-filter`
---
 inferior-idris.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inferior-idris.el b/inferior-idris.el
index a74b573ba8..7e313552dd 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -189,8 +189,8 @@ directory variables.")
   (if (not (string-match idris-process-port-with-warning-output-regexp 
string))
   (idris-warn string)
 (idris-warn (match-string idris-warning-matcher string))
-(idris-connect (string-to-number (match-string 
idris-warning-port-matcher string
-  ""
+(idris-connect (string-to-number (match-string 
idris-warning-port-matcher string)
+"")))
 
 (defun idris-show-process-buffer (string)
   "Show the Idris process buffer if STRING is non-empty."



[nongnu] elpa/idris-mode 8329b73be8 3/6: Move "words of encouragement" from minibuffer to Idris repl banner

2022-11-18 Thread ELPA Syncer
branch: elpa/idris-mode
commit 8329b73be8f16012f340af2825278c55ce235ac8
Author: Marek L 
Commit: Marek L 

Move "words of encouragement" from minibuffer to Idris repl banner

Why:
To split concerns of "logging that Idris connection was created" and
displaying "words of encouragement for user".
To ensure that the words of encouragement are visible to user.

Relates to:
https://github.com/idris-hackers/idris-mode/pull/564
---
 idris-repl.el | 4 +++-
 inferior-idris.el | 4 +---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/idris-repl.el b/idris-repl.el
index aaebbecd2b..81d10d366c 100644
--- a/idris-repl.el
+++ b/idris-repl.el
@@ -96,7 +96,9 @@ Returns non-`nil' on success, `nil' on failure."
  version-string)
 (insert (propertize (concat "Idris " version-string)
 'face 'italic)
-"\n\n")
+"\n")))
+(when idris-display-words-of-encouragement
+  (insert (idris-random-words-of-encouragement) "\n"
 
 (defun idris-repl-insert-prompt (&optional always-insert)
   "Insert or update Idris prompt in buffer.
diff --git a/inferior-idris.el b/inferior-idris.el
index a74b573ba8..43bc7fac80 100644
--- a/inferior-idris.el
+++ b/inferior-idris.el
@@ -141,9 +141,7 @@ directory variables.")
 (set-process-query-on-exit-flag idris-connection t)
 (setq idris-process-current-working-directory "")
 (run-hooks 'idris-run-hook)
-(when idris-display-words-of-encouragement
-  (message "Connected. %s" (idris-random-words-of-encouragement)))
-))
+(message "Connection to Idris established.")))
 
 (defun idris-sentinel (_process msg)
   (message "Idris disconnected: %s" (substring msg 0 -1))



[nongnu] elpa/projectile 1654956cfe 1/2: Allow multiple project-files per type and wildcards in project-files

2022-11-18 Thread ELPA Syncer
branch: elpa/projectile
commit 1654956cfed4691f3e9553d91e573efe0be8646a
Author: toshokan 
Commit: Bozhidar Batsov 

Allow multiple project-files per type and wildcards in project-files
---
 CHANGELOG.md |  1 +
 doc/modules/ROOT/pages/projects.adoc | 17 +++--
 projectile.el| 30 ++
 test/projectile-test.el  | 19 +++
 4 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3538ab626e..154d6a907e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@
 * Add new command `projectile-find-references` (bound to `C-c C-p ?` and `C-c 
C-p s x`).
 * [#1737](https://github.com/bbatsov/projectile/pull/1737): Add helpers for 
`dir-local-variables` for 3rd party use. Functions 
`projectile-add-dir-local-variable` and `projectile-delete-dir-local-variable` 
wrap their built-in counterparts. They always use `.dir-locals.el` from the 
root of the current Projectile project.
 * Add a new defcustom (`projectile-dirconfig-file`) controlling the name of 
the file used as Projectile’s root marker and configuration file.
+* [#1813](https://github.com/bbatsov/projectile/pull/1813): Allow 
project-files to contain wildcards and allow multiple project-files per project 
type registration. Add a new project-type for .NET solutions. 
 
 ### Changes
 
diff --git a/doc/modules/ROOT/pages/projects.adoc 
b/doc/modules/ROOT/pages/projects.adoc
index c39beaca67..f3db50d8f1 100644
--- a/doc/modules/ROOT/pages/projects.adoc
+++ b/doc/modules/ROOT/pages/projects.adoc
@@ -162,8 +162,8 @@ initialization code
 What this does is:
 
 . add your own type of project, in this case `npm` package.
-. add a list of files and/or folders in a root of the project that helps to 
identify the type, in this case it is only `package.json`.
-. add _project-file_, which is typically the primary project configuration 
file. In this case that's `package.json`.
+. add a list of files and/or folders in a root of the project that helps to 
identify the type, in this case it is only `package.json`. This can also be a 
function which takes a project root as argument and verifies whether that 
directory has the correct project structure for the type.
+. add _project-file_, which is typically the primary project configuration 
file. In this case that's `package.json`. The value can contain wildcards 
and/or be a list containing multiple project files to look for.
 . add _compile-command_, in this case it is `npm install`.
 . add _test-command_, in this case it is `npm test`.
 . add _run-command_, in this case it is `npm start`.
@@ -171,6 +171,19 @@ What this does is:
 
 Let's see a couple of more complex examples.
 
+[source,elisp]
+
+;; .NET C# or F# projects
+(projectile-register-project-type 'dotnet #'projectile-dotnet-project-p
+  :project-file '("?*.csproj" "?*.fsproj")
+  :compile "dotnet build"
+  :run "dotnet run"
+  :test "dotnet test")
+
+
+This example uses _projectile-dotnet-project-p_ to validate the project's 
structure.
+Since C# and F# project files have names containing the name of the project, 
it uses a list of wildcards to specify the different valid _project-file_ name 
patterns.
+
 [source,elisp]
 
 ;; Ruby + RSpec
diff --git a/projectile.el b/projectile.el
index db275a1f40..62e1d40e62 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1181,7 +1181,7 @@ which we're looking."
 (null file)
 (string-match locate-dominating-stop-dir-regexp file)))
   (setq try (if (stringp name)
-(projectile-file-exists-p (expand-file-name name file))
+(projectile-file-exists-p 
(projectile-expand-file-name-wildcard name file))
   (funcall name file)))
   (cond (try (setq root file))
 ((equal file (setq file (file-name-directory
@@ -1204,7 +1204,7 @@ Return the first (topmost) matched directory or nil if 
not found."
   (projectile-locate-dominating-file
dir
(lambda (dir)
- (cl-find-if (lambda (f) (projectile-file-exists-p (expand-file-name f 
dir)))
+ (cl-find-if (lambda (f) (projectile-file-exists-p 
(projectile-expand-file-name-wildcard f dir)))
  (or list projectile-project-root-files)
 
 (defun projectile-root-marked (dir)
@@ -1232,9 +1232,9 @@ topmost sequence of matched directories.  Nil otherwise."
  (projectile-locate-dominating-file
   dir
   (lambda (dir)
-(and (projectile-file-exists-p (expand-file-name f dir))
+(and (projectile-file-exists-p (projectile-expand-file-name-wildcard f 
dir))
  (or (string-match locate-dominating-stop-dir-regexp 
(projectile-parent dir))
- (not (projectile-file-exists-p (expand-file-name f 
(projectile-parent dir)

[nongnu] elpa/projectile 5703797bb2 2/2: Add project-file specs for dotnet projects, find dotnet .sln files

2022-11-18 Thread ELPA Syncer
branch: elpa/projectile
commit 5703797bb2a400e962479e670086aca4241a77b7
Author: toshokan 
Commit: Bozhidar Batsov 

Add project-file specs for dotnet projects, find dotnet .sln files
---
 projectile.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/projectile.el b/projectile.el
index 62e1d40e62..1360644543 100644
--- a/projectile.el
+++ b/projectile.el
@@ -3174,6 +3174,12 @@ a manual COMMAND-TYPE command is created with
   :run "cabal run"
   :test-suffix "Spec")
 (projectile-register-project-type 'dotnet #'projectile-dotnet-project-p
+  :project-file '("?*.csproj" "?*.fsproj")
+  :compile "dotnet build"
+  :run "dotnet run"
+  :test "dotnet test")
+(projectile-register-project-type 'dotnet-sln '("src")
+  :project-file "?*.sln"
   :compile "dotnet build"
   :run "dotnet run"
   :test "dotnet test")



[nongnu] elpa/projectile updated (7d414ea342 -> 5703797bb2)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch elpa/projectile.

  from  7d414ea342 [Docs] Mention projectile-root-marked
   new  1654956cfe Allow multiple project-files per type and wildcards in 
project-files
   new  5703797bb2 Add project-file specs for dotnet projects, find dotnet 
.sln files


Summary of changes:
 CHANGELOG.md |  1 +
 doc/modules/ROOT/pages/projects.adoc | 17 +++--
 projectile.el| 36 
 test/projectile-test.el  | 19 +++
 4 files changed, 63 insertions(+), 10 deletions(-)



[elpa] externals/corfu 8c10f25a42 3/7: README update

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 8c10f25a4224faf49326d0c8093e2f9f280f065e
Author: Daniel Mendler 
Commit: Daniel Mendler 

README update
---
 README.org | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index d67d2ccc1f..b3a08aa508 100644
--- a/README.org
+++ b/README.org
@@ -53,7 +53,7 @@ provides an alternative overlay-based display.
 - Deprecated candidates are crossed out in the display.
 - Icons can be provided by an external package via margin formatter functions.
 - Rich set of extensions: Quick keys, Index keys, Sorting by history, Candidate
-  documentation in popup or separate buffer
+  documentation in echo area, popup or separate buffer
 
 * Installation and Configuration
 
@@ -445,7 +445,8 @@ be enabled manually if desired. Furthermore it is possible 
to install all of the
 files separately, both ~corfu.el~ and the ~corfu-*.el~ extensions. Currently 
the
 following extensions come with the Corfu ELPA package:
 
-- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-echo.el][corfu-echo]]:
 Display brief candidate documentation in the echo area.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-echo.el][corfu-echo]]:
 =corfu-echo-mode= displays a brief candidate documentation in the
+  echo area.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-history.el][corfu-history]]:
 =corfu-history-mode= remembers selected candidates and sorts the
   candidates by their history position.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]:
 =corfu-indexed-mode= allows you to select indexed candidates with



[elpa] externals/corfu 78b77306d6 7/7: Simplify corfu-echo

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 78b77306d617d8c1abf1dec3671092a05a3fd027
Author: Daniel Mendler 
Commit: Daniel Mendler 

Simplify corfu-echo
---
 extensions/corfu-echo.el | 31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/extensions/corfu-echo.el b/extensions/corfu-echo.el
index 9f01cdd9c8..bca5e94941 100644
--- a/extensions/corfu-echo.el
+++ b/extensions/corfu-echo.el
@@ -57,12 +57,19 @@ floats to specify initial and subsequent delay."
 (defvar-local corfu-echo--message nil
   "Last echo message.")
 
-(defun corfu-echo--cancel (&optional hide)
-  "Cancel echo timer and optionally HIDE message."
+(defun corfu-echo--refresh ()
+  "Refresh message to avoid flicker."
+  (corfu-echo--cancel corfu-echo--message))
+
+(defun corfu-echo--cancel (&optional msg)
+  "Cancel echo timer and refresh MSG."
   (when corfu-echo--timer
 (cancel-timer corfu-echo--timer)
 (setq corfu-echo--timer nil))
-  (corfu-echo--show (unless hide corfu-echo--message)))
+  (corfu-echo--show msg)
+  (unless corfu--echo-message
+(kill-local-variable 'corfu-echo--timer)
+(kill-local-variable 'corfu-echo--message)))
 
 (defun corfu-echo--show (msg)
   "Show MSG in echo area."
@@ -84,18 +91,12 @@ floats to specify initial and subsequent delay."
(nth corfu--index corfu--candidates
   (if (or (eq delay t) (<= delay 0))
   (corfu-echo--show (funcall fun cand))
-(corfu-echo--cancel 'hide)
+(corfu-echo--cancel)
 (setq corfu-echo--timer
   (run-at-time delay nil
(lambda ()
  (corfu-echo--show (funcall fun cand))
-(corfu-echo--cancel 'hide)))
-
-(defun corfu-echo--teardown ()
-  "Teardown echo display."
-  (corfu-echo--cancel 'hide)
-  (kill-local-variable 'corfu-echo--timer)
-  (kill-local-variable 'corfu-echo--message))
+(corfu-echo--cancel)))
 
 ;;;###autoload
 (define-minor-mode corfu-echo-mode
@@ -103,13 +104,13 @@ floats to specify initial and subsequent delay."
   :global t :group 'corfu
   (cond
(corfu-echo-mode
-(advice-add #'corfu--pre-command :before #'corfu-echo--cancel)
+(advice-add #'corfu--pre-command :before #'corfu-echo--refresh)
 (advice-add #'corfu--exhibit :after #'corfu-echo--exhibit)
-(advice-add #'corfu--teardown :before #'corfu-echo--teardown))
+(advice-add #'corfu--teardown :before #'corfu-echo--cancel))
(t
-(advice-remove #'corfu--pre-command #'corfu-echo--cancel)
+(advice-remove #'corfu--pre-command #'corfu-echo--refresh)
 (advice-remove #'corfu--exhibit #'corfu-echo--exhibit)
-(advice-remove #'corfu--teardown #'corfu-echo--teardown
+(advice-remove #'corfu--teardown #'corfu-echo--cancel
 
 (provide 'corfu-echo)
 ;;; corfu-echo.el ends here



[elpa] externals/corfu 98a0b8d958 5/7: corfu-infoframe: Add completion predicates

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 98a0b8d9586801c1d50fb99ceff7e73ed3076791
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-infoframe: Add completion predicates
---
 extensions/corfu-infoframe.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index da897d952f..2466dfdc76 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -440,5 +440,11 @@ not be displayed until this command is called again, even 
if
 (advice-remove #'corfu--exhibit #'corfu-infoframe--exhibit)
 (advice-remove #'corfu--teardown #'corfu-infoframe--teardown
 
+;; Emacs 28: Do not show Corfu commands with M-X
+(dolist (sym '(corfu-infoframe-scroll-down corfu-infoframe-scroll-down
+   corfu-infoframe-documentation corfu-infoframe-location
+   corfu-infoframe-toggle))
+  (put sym 'completion-predicate #'ignore))
+
 (provide 'corfu-infoframe)
 ;;; corfu-infoframe.el ends here



[elpa] externals/corfu eb1cf62843 1/7: README update

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit eb1cf628432dca5131d3aeaaab135b1d97a0718d
Author: Daniel Mendler 
Commit: Daniel Mendler 

README update
---
 README.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index d0b81318f6..bf509c 100644
--- a/README.org
+++ b/README.org
@@ -52,7 +52,8 @@ provides an alternative overlay-based display.
 - Support for candidate annotations and documentation in the echo area.
 - Deprecated candidates are crossed out in the display.
 - Icons can be provided by an external package via margin formatter functions.
-- Extensions: Quick keys, Index keys, Sorting by history, Candidate 
documentation
+- Rich set of extensions: Quick keys, Index keys, Sorting by history, Candidate
+  documentation in popup or separate buffer
 
 * Installation and Configuration
 



[elpa] externals/corfu 21723ad548 4/7: Add changelog (Fix #33)

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 21723ad548ac89b2f75cda6b2a58df8131201aeb
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add changelog (Fix #33)
---
 CHANGELOG.org | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
new file mode 100644
index 00..5ba728b699
--- /dev/null
+++ b/CHANGELOG.org
@@ -0,0 +1,18 @@
+#+title: corfu.el - Changelog
+#+author: Daniel Mendler
+#+language: en
+
+* Development
+
+- Add =corfu-infoframe= extension to display candidate documentation and 
location
+  in a small child frame next to the candidate menu. This extension has been
+  contributed by Yuwei Tian who assigned copyright to the FSF. The extension
+  supersedes Yuwei's =corfu-doc= package.
+- Extract the =corfu-echo= extension from =corfu.el=. In order to see echo
+  messages, enable =corfu-echo-mode=. You probably want to enable either
+  =corfu-echo-mode= or =corfu-infoframe-mode=.
+- Rename =corfu-echo-documentation= to =corfu-echo-delay=.
+
+* Version 0.28 (2022-10-16)
+
+- Start of changelog.



[elpa] externals/corfu 638e33a98d 2/7: BREAKING CHANGE: Extract corfu-echo extension from corfu.el

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 638e33a98db3574261bc41b738186d5f6b87b39d
Author: Daniel Mendler 
Commit: Daniel Mendler 

BREAKING CHANGE: Extract corfu-echo extension from corfu.el

Enable corfu-echo-mode to enable echo messages. The corfu-infoframe somewhat
conflicts with corfu-echo, since it is disturbing it both the info frame 
and the
echo message pop up after each other. Therefore it makes sense to maintain
corfu-echo as a separate extension, on the same level as corfu-infoframe.
---
 README.org   |   2 +-
 corfu.el |  61 -
 extensions/corfu-echo.el | 115 +++
 3 files changed, 116 insertions(+), 62 deletions(-)

diff --git a/README.org b/README.org
index bf509c..d67d2ccc1f 100644
--- a/README.org
+++ b/README.org
@@ -83,7 +83,6 @@ Here is an example configuration:
 ;; (corfu-preview-current nil);; Disable current candidate preview
 ;; (corfu-preselect-first nil);; Disable candidate preselection
 ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
-;; (corfu-echo-documentation nil) ;; Disable documentation in the echo area
 ;; (corfu-scroll-margin 5);; Use scroll margin
 
 ;; Enable Corfu only for certain modes.
@@ -446,6 +445,7 @@ be enabled manually if desired. Furthermore it is possible 
to install all of the
 files separately, both ~corfu.el~ and the ~corfu-*.el~ extensions. Currently 
the
 following extensions come with the Corfu ELPA package:
 
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-echo.el][corfu-echo]]:
 Display brief candidate documentation in the echo area.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-history.el][corfu-history]]:
 =corfu-history-mode= remembers selected candidates and sorts the
   candidates by their history position.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]:
 =corfu-indexed-mode= allows you to select indexed candidates with
diff --git a/corfu.el b/corfu.el
index 41d25f20ec..bd1a047632 100644
--- a/corfu.el
+++ b/corfu.el
@@ -126,18 +126,6 @@ separator: Only stay alive if there is no match and
   "Width of the bar in units of the character width."
   :type 'float)
 
-(defcustom corfu-echo-documentation '(1.0 . 0.2)
-  "Show documentation string in the echo area after that number of seconds.
-Set to nil to disable the echo message or to t for an instant message.
-The value can be a pair of two floats to specify initial and subsequent
-delay."
-  :type '(choice (const :tag "Never" nil)
- (const :tag "Instant" t)
- (number :tag "Delay in seconds")
- (cons :tag "Two Delays"
-   (choice :tag "Initial   " number)
-   (choice :tag "Subsequent" number
-
 (defcustom corfu-margin-formatters nil
   "Registry for margin formatter functions.
 Each function of the list is called with the completion metadata as
@@ -208,10 +196,6 @@ The completion backend can override this with
 (t :background "gray"))
   "The background color used for the thin border.")
 
-(defface corfu-echo
-  '((t :inherit completions-annotations))
-  "Face used for echo area messages.")
-
 (defface corfu-annotations
   '((t :inherit completions-annotations))
   "Face used for annotations.")
@@ -285,12 +269,6 @@ The completion backend can override this with
 (defvar-local corfu--change-group nil
   "Undo change group.")
 
-(defvar-local corfu--echo-timer nil
-  "Echo area message timer.")
-
-(defvar-local corfu--echo-message nil
-  "Last echo message.")
-
 (defvar corfu--frame nil
   "Popup frame.")
 
@@ -305,8 +283,6 @@ The completion backend can override this with
 corfu--total
 corfu--preview-ov
 corfu--extra
-corfu--echo-timer
-corfu--echo-message
 corfu--change-group
 corfu--metadata)
   "Buffer-local state variables used by Corfu.")
@@ -830,40 +806,6 @@ there hasn't been any input, then quit."
 (overlay-put corfu--preview-ov 'window (selected-window))
 (overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display) 
cand)))
 
-(defun corfu--echo-cancel (&optional msg)
-  "Cancel echo timer and refresh MSG to prevent flicker during redisplay."
-  (when corfu--echo-timer
-(cancel-timer corfu--echo-timer)
-(setq corfu--echo-timer nil))
-  (corfu--echo-show msg))
-
-(defun corfu--echo-show (msg)
-  "Show MSG in echo area."
-  (when (or msg corfu--echo-message)
-(setq msg (or msg "")
-  corfu--echo-message msg)
-(corfu--message "%s" (if (text-property-not-all 0 (length msg) 'face nil 
msg)
- msg
-   (propertize msg 'face 'corfu-echo)
-
-(defun corfu--echo-documentation ()
-  "Show documentation string of current candidate in echo area."
-  (if-let* ((delay (if (consp corfu-echo-documentation)
-   (funcall (if c

[elpa] externals/corfu updated (cfc97d4885 -> 78b77306d6)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  cfc97d4885 corfu-infoframe: Reduce print length (Fix #249)
   new  eb1cf62843 README update
   new  638e33a98d BREAKING CHANGE: Extract corfu-echo extension from 
corfu.el
   new  8c10f25a42 README update
   new  21723ad548 Add changelog (Fix #33)
   new  98a0b8d958 corfu-infoframe: Add completion predicates
   new  f8d54d71d6 README update
   new  78b77306d6 Simplify corfu-echo


Summary of changes:
 CHANGELOG.org |  18 +++
 README.org|   8 +--
 corfu.el  |  61 --
 extensions/corfu-echo.el  | 116 ++
 extensions/corfu-infoframe.el |   6 +++
 5 files changed, 145 insertions(+), 64 deletions(-)
 create mode 100644 CHANGELOG.org
 create mode 100644 extensions/corfu-echo.el



[elpa] externals/corfu f8d54d71d6 6/7: README update

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit f8d54d71d6ca5ceccdc6734dccdd55b38051a45d
Author: Daniel Mendler 
Commit: Daniel Mendler 

README update
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index b3a08aa508..216426c40e 100644
--- a/README.org
+++ b/README.org
@@ -49,7 +49,7 @@ provides an alternative overlay-based display.
   arbitrary characters, after inserting a space via =M-SPC= (configurable via
   ~corfu-quit-at-boundary~ and ~corfu-separator~).
 - Deferred completion style highlighting for performance.
-- Support for candidate annotations and documentation in the echo area.
+- Support for candidate annotations (=annotation-function=, 
=affixation-function=).
 - Deprecated candidates are crossed out in the display.
 - Icons can be provided by an external package via margin formatter functions.
 - Rich set of extensions: Quick keys, Index keys, Sorting by history, Candidate



[elpa] externals/url-scgi 105d201abe: Keep GitHub Actions up-to-date with Dependabot

2022-11-18 Thread ELPA Syncer
branch: externals/url-scgi
commit 105d201abea9d8bb818102e0002da4ef3335a605
Author: Stefan Kangas 
Commit: Stefan Kangas 

Keep GitHub Actions up-to-date with Dependabot
---
 .github/dependabot.yml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00..8eb3c27c3e
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+# Check for outdated GitHub Actions in workflows.
+
+# See 
https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file
+version: 2
+
+updates:
+  # See 
https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
+  - package-ecosystem: github-actions
+directory: "/"
+schedule:
+  interval: "daily"



[nongnu] elpa/mentor ab0a3e522f 2/2: Update copyright year in test-rtorrent.py

2022-11-18 Thread ELPA Syncer
branch: elpa/mentor
commit ab0a3e522fcaabd920f9efab0b225aa818c069f4
Author: Stefan Kangas 
Commit: Stefan Kangas 

Update copyright year in test-rtorrent.py
---
 test-rtorrent.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test-rtorrent.py b/test-rtorrent.py
index f2dbd90ed6..ed55feba38 100755
--- a/test-rtorrent.py
+++ b/test-rtorrent.py
@@ -6,8 +6,7 @@
 # Run as follows:
 # python rtorrent-test.py
 
-
-# Copyright (C) 2016-2021 Stefan Kangas.
+# Copyright (C) 2016-2022 Stefan Kangas.
 #
 # This file is NOT part of GNU Emacs.
 #



[nongnu] elpa/mentor updated (88ef7deabd -> ab0a3e522f)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch elpa/mentor.

  from  88ef7deabd Fix typo in README
   new  a8da4c3934 Keep GitHub Actions up-to-date with Dependabot
   new  ab0a3e522f Update copyright year in test-rtorrent.py


Summary of changes:
 .github/dependabot.yml | 11 +++
 test-rtorrent.py   |  3 +--
 2 files changed, 12 insertions(+), 2 deletions(-)
 create mode 100644 .github/dependabot.yml



[nongnu] elpa/mentor a8da4c3934 1/2: Keep GitHub Actions up-to-date with Dependabot

2022-11-18 Thread ELPA Syncer
branch: elpa/mentor
commit a8da4c393424e8da95b235487c249ef6263aa25b
Author: Stefan Kangas 
Commit: Stefan Kangas 

Keep GitHub Actions up-to-date with Dependabot
---
 .github/dependabot.yml | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00..8eb3c27c3e
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+# Check for outdated GitHub Actions in workflows.
+
+# See 
https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#about-the-dependabotyml-file
+version: 2
+
+updates:
+  # See 
https://docs.github.com/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
+  - package-ecosystem: github-actions
+directory: "/"
+schedule:
+  interval: "daily"



[elpa] externals/corfu updated (78b77306d6 -> 21214caa8e)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  78b77306d6 Simplify corfu-echo
   new  251859ffa0 README: Update corfu-enable-in-minibuffer
   new  21214caa8e Update changelog


Summary of changes:
 CHANGELOG.org | 8 
 README.org| 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)



[elpa] externals/corfu 251859ffa0 1/2: README: Update corfu-enable-in-minibuffer

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 251859ffa00ef5a2ae5a5b17267ab02f2571138c
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Update corfu-enable-in-minibuffer
---
 README.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 216426c40e..f09739b78f 100644
--- a/README.org
+++ b/README.org
@@ -229,7 +229,8 @@ effect.
   (defun corfu-enable-in-minibuffer ()
 "Enable Corfu in the minibuffer if `completion-at-point' is bound."
 (when (where-is-internal #'completion-at-point (list (current-local-map)))
-  ;; (setq-local corfu-auto nil) Enable/disable auto completion
+  ;; (setq-local corfu-auto nil) ;; Enable/disable auto completion
+  (setq-local corfu-echo-delay nil) ;; Disable echo
   (corfu-mode 1)))
   (add-hook 'minibuffer-setup-hook #'corfu-enable-in-minibuffer)
 #+end_src



[elpa] externals/detached 8c7a2e1129: Update when a session is registered

2022-11-18 Thread ELPA Syncer
branch: externals/detached
commit 8c7a2e1129b254946d86a7b7ae1c8378afab7b69
Author: Niklas Eklund 
Commit: Niklas Eklund 

Update when a session is registered

This patch updates the time the session is being registered. Instead
of being when detached-create-session is being called it is registered
in the different start functions. This will make the code more
flexible so that sessions can be created at one point in time and
started later.
---
 detached-compile.el |  8 ++--
 detached.el | 14 ++
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/detached-compile.el b/detached-compile.el
index 78a94b2066..1121d243d7 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -130,8 +130,12 @@ Optionally EDIT-COMMAND."
   (detached-session-directory 
detached-current-session)
 (detached-session-working-directory 
detached-current-session
(if (eq detached-session-mode 'detached)
-(detached-start-session detached-current-session)
- (apply compilation-start `(,(if (detached-session-started-p 
detached-current-session)
+(detached--start-session-process detached-current-session
+ (detached-session-start-command
+  detached-current-session
+  :type 'string))
+  (detached-register-session detached-current-session)
+  (apply compilation-start `(,(if (detached-session-started-p 
detached-current-session)
   (detached-session-attach-command 
detached-current-session

:type 'string)
 (detached-session-start-command 
detached-current-session
diff --git a/detached.el b/detached.el
index 479f1fdc17..e4ef56ae17 100644
--- a/detached.el
+++ b/detached.el
@@ -752,12 +752,11 @@ active session.  For sessions created with 
`detached-compile' or
 :metadata (detached-metadata)
 :state 'unknown
 :initialized-emacsen `(,(emacs-pid)
- (detached--create-session-validator session)
- (detached--watch-session-directory (detached-session-directory session))
  session)))
 
 (defun detached--start-session-process (session start-command)
   "Start SESSION with START-COMMAND."
+  (detached-register-session session)
   (if (detached--session-local-p session)
   (apply #'start-process-shell-command `("detached" nil ,start-command))
 (apply #'start-file-process-shell-command `("detached" nil 
,start-command
@@ -936,12 +935,11 @@ This function uses the `notifications' library."
   (not (get-buffer-process 
buffer)
  (command (detached-session-start-command session
   :type 'string)))
+(detached-register-session session)
 (funcall #'async-shell-command command buffer)
 (with-current-buffer buffer
   (setq detached-buffer-session session
 
-; Public session functions
-
 (defun detached-start-session (session)
   "Start SESSION."
   (if (eq 'detached (detached--session-initial-mode session))
@@ -952,8 +950,16 @@ This function uses the `notifications' library."
 (detached-with-session session
   (funcall (detached-session-run-function session) session
 
+(defun detached-register-session (session)
+  "Register the existence of SESSION and start monitoring it."
+  (detached--create-session-validator session)
+  (detached--watch-session-directory (detached-session-directory session)))
+
+; Public session functions
+
 (cl-defun detached-session-start-command (session &key type)
   "Return command to start SESSION with specified TYPE."
+  (detached-register-session session)
   (detached-connection-local-variables
(let* ((socket (detached--session-file session 'socket t))
   (detached-session-mode (detached--session-initial-mode session))



[elpa] externals/corfu 21214caa8e 2/2: Update changelog

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 21214caa8e75745b348783c06aed229cc76be5a7
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update changelog
---
 CHANGELOG.org | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 5ba728b699..445c3cd4be 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,14 +4,14 @@
 
 * Development
 
+- BREAKING: Extract the =corfu-echo= extension from =corfu.el=. In order to 
see echo
+  messages, enable =corfu-echo-mode=. You probably want to enable either
+  =corfu-echo-mode= or =corfu-infoframe-mode=.
+- BREAKING: Rename =corfu-echo-documentation= to =corfu-echo-delay=.
 - Add =corfu-infoframe= extension to display candidate documentation and 
location
   in a small child frame next to the candidate menu. This extension has been
   contributed by Yuwei Tian who assigned copyright to the FSF. The extension
   supersedes Yuwei's =corfu-doc= package.
-- Extract the =corfu-echo= extension from =corfu.el=. In order to see echo
-  messages, enable =corfu-echo-mode=. You probably want to enable either
-  =corfu-echo-mode= or =corfu-infoframe-mode=.
-- Rename =corfu-echo-documentation= to =corfu-echo-delay=.
 
 * Version 0.28 (2022-10-16)
 



[elpa] externals/corfu 709ca22543 1/6: Fix corfu-infoframe placement (Fix #250)

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 709ca2254379c94d35aeec387ea24b8ffd2ad71f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix corfu-infoframe placement (Fix #250)
---
 extensions/corfu-infoframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-infoframe.el
index 2466dfdc76..521101514a 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-infoframe.el
@@ -215,7 +215,7 @@ relative to the corfu popup, its value can be 'right or 
'left."
(`(,cfx ,cfy ,cfw ,_cfh) (corfu-infoframe--frame-geometry 
corfu--frame))
(x-on-right (+ cfx cfw space))
(w-remaining-right (- pfw 1 x-on-right border border))
-   (x-on-left (- cfx space pfw))
+   (x-on-left (- cfx space border width border))
(w-remaining-left (- cfx space 1 border border)))
 (cond
  ((> w-remaining-right width)



[elpa] externals/corfu e3210e0b22 3/6: Extract buffer parameters

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit e3210e0b22098ffbff1f5688896ca8d0998c00ee
Author: Daniel Mendler 
Commit: Daniel Mendler 

Extract buffer parameters
---
 extensions/corfu-popupinfo.el | 24 ++--
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index c5d3e5c62b..89d9385b37 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -90,6 +90,16 @@
 map)
   "Additional keymap activated in popupinfo mode.")
 
+(defvar corfu-popupinfo--buffer-parameters
+  '((line-move-visual . t)
+(truncate-partial-width-windows . nil)
+(truncate-lines . nil)
+(left-margin-width . 1)
+(right-margin-width . 1)
+(word-wrap . t)
+(fringe-indicator-alist (continuation)))
+  "Buffer parameters.")
+
 (defvar-local corfu-popupinfo--toggle t
   "Local popupinfo toggle state.")
 
@@ -313,16 +323,10 @@ the candidate popup, its value is 'bottom, 'top, 'right 
or 'left."
   (when doc-changed
 (if-let (doc (funcall corfu-popupinfo--function candidate))
 (with-current-buffer (corfu--make-buffer " *corfu-popupinfo*" doc)
-  ;; TODO extract settings
-  (setq-local line-move-visual t
-  truncate-partial-width-windows nil
-  left-margin-width 1
-  right-margin-width 1
-  truncate-lines nil
-  word-wrap t
-  fringe-indicator-alist '((continuation))
-  face-remapping-alist (copy-tree 
face-remapping-alist))
-  (setf (alist-get 'default face-remapping-alist) 
'corfu-popupinfo))
+  (dolist (var corfu-popupinfo--buffer-parameters)
+(set (make-local-variable (car var)) (cdr var)))
+  (setf face-remapping-alist (copy-tree face-remapping-alist)
+(alist-get 'default face-remapping-alist) 
'corfu-popupinfo))
   (corfu-popupinfo--hide)
   (setq doc-changed nil edges-changed nil)))
   (when (or doc-changed edges-changed)



[elpa] externals/corfu 9f0cad7cd2 6/6: Remove unnecessary get-buffer calls

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 9f0cad7cd2facd38cca90778281bb10431e143cd
Author: Daniel Mendler 
Commit: Daniel Mendler 

Remove unnecessary get-buffer calls
---
 extensions/corfu-popupinfo.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index dd0c5246e3..88d4fc09ce 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -338,7 +338,7 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
   (setq corfu-popupinfo--frame
 (corfu--make-frame corfu-popupinfo--frame
area-x area-y area-w area-h
-   (get-buffer " *corfu-popupinfo*"))
+   " *corfu-popupinfo*")
 corfu-popupinfo--direction area-d)))
   (setq corfu-popupinfo--candidate candidate
 corfu-popupinfo--edges new-edges
@@ -355,7 +355,7 @@ See `scroll-up' for details."
   (interactive "p")
   (when (corfu-popupinfo--visible-p)
 (with-selected-frame corfu-popupinfo--frame
-  (with-current-buffer (get-buffer " *corfu-popupinfo*")
+  (with-current-buffer " *corfu-popupinfo*"
 (scroll-up n)
 
 (defun corfu-popupinfo-scroll-down (&optional n)



[elpa] externals/corfu e8f6e92ba9 5/6: Cleanup corfu-popupinfo--size

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit e8f6e92ba9124edbc85bb6c60f5689e6b6f3c748
Author: Daniel Mendler 
Commit: Daniel Mendler 

Cleanup corfu-popupinfo--size
---
 extensions/corfu-popupinfo.el | 42 +++---
 1 file changed, 19 insertions(+), 23 deletions(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 51c913c190..dd0c5246e3 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -27,8 +27,8 @@
 ;;; Commentary:
 
 ;; NOTE: This extension has been added recently to Corfu. It is still
-;; experimental. The extension may get renamed and the public interface may
-;; change any time.
+;; experimental. The extension may get renamed and the public interface
+;; may change any time.
 ;;
 ;; Display a documentation popup for completion candidate when using
 ;; Corfu. The `corfu-popupinfo-mode' must be enabled globally. Set
@@ -180,27 +180,21 @@ See `frame-edges' for details.")
  (buffer-string)))
   (and (not (string-blank-p res)) res
 
-;; TODO get rid of optional arguments?
-(defun corfu-popupinfo--size (&optional width height)
-  "Calculate popup size in the form of (width height).
-
-If WIDTH and HEIGHT is speicified, just return (WIDTH HEIGHT)."
+;; TODO return pair, not list?
+(defun corfu-popupinfo--size ()
+  "Calculate popup size in the form of (width height)."
   (let ((max-width (* (frame-char-width) corfu-popupinfo-max-width))
 (max-height (* (default-line-height) corfu-popupinfo-max-height)))
-(if (and width height)
-(list (min width max-width) (min height max-height))
-  (pcase-let* ((`(,popup-width ,popup-height)
-(if (not corfu-popupinfo-resize)
-(list (or width max-width) (or height max-height))
-  (pcase-let ((`(,win-width . ,win-height)
-   (save-window-excursion
- (with-current-buffer " *corfu-popupinfo*"
-   (set-window-dedicated-p nil nil)
-   (set-window-buffer nil (current-buffer))
-   (window-text-pixel-size nil (point-min) 
(point-max)
-   (* 2 max-width) 
(* 2 max-height))
-(list (or width win-width) (or height win-height))
-(list (min popup-width max-width) (min popup-height max-height))
+(if corfu-popupinfo-resize
+(pcase-let ((`(,width . ,height)
+ (save-window-excursion
+   (with-current-buffer " *corfu-popupinfo*"
+ (set-window-dedicated-p nil nil)
+ (set-window-buffer nil (current-buffer))
+ (window-text-pixel-size nil (point-min) (point-max)
+ (* 2 max-width) (* 2 
max-height))
+  (list (min width max-width) (min height max-height)))
+  (list max-width max-height
 
 (defun corfu-popupinfo--frame-geometry (frame)
   "Return position and size geometric attributes of FRAME.
@@ -297,8 +291,10 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
 (apply #'corfu-popupinfo--display-area-vertical
(corfu-popupinfo--size)))
(t
-(pcase-let* ((`(,width ,height)  ;; popup inner width and height
-  (corfu-popupinfo--size width height))
+(pcase-let* ((`(,width ,height)
+  (if (and width height)
+  (list width height)
+(corfu-popupinfo--size)))
  ((and h-a `(,_h-x ,_h-y ,h-w ,h-h ,_h-d))
   (corfu-popupinfo--display-area-horizontal width height))
  ((and v-a `(,_v-x ,_v-y ,v-w ,v-h ,_v-d))



[elpa] externals/corfu 51004b233a 4/6: corfu-popupinfo: Expand note ; )

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 51004b233a440ac72d21be466ee20874f2ef244d
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-popupinfo: Expand note ;)
---
 extensions/corfu-popupinfo.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 89d9385b37..51c913c190 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -27,7 +27,8 @@
 ;;; Commentary:
 
 ;; NOTE: This extension has been added recently to Corfu. It is still
-;; experimental. The public interface may change any time.
+;; experimental. The extension may get renamed and the public interface may
+;; change any time.
 ;;
 ;; Display a documentation popup for completion candidate when using
 ;; Corfu. The `corfu-popupinfo-mode' must be enabled globally. Set



[elpa] externals/corfu edf5e1ad3d 2/6: Rename extension once more

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit edf5e1ad3d527cc5e95b7e4f3c55fa76c7934631
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename extension once more

"popup" fits better than the overloaded word "frame".
---
 README.org |   4 +-
 .../{corfu-infoframe.el => corfu-popupinfo.el} | 349 ++---
 2 files changed, 176 insertions(+), 177 deletions(-)

diff --git a/README.org b/README.org
index f09739b78f..5e08230138 100644
--- a/README.org
+++ b/README.org
@@ -453,8 +453,8 @@ following extensions come with the Corfu ELPA package:
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]:
 =corfu-indexed-mode= allows you to select indexed candidates with
   prefix arguments.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-info.el][corfu-info]]:
 Actions to access the candidate location and documentation.
-- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-infoframe.el][corfu-infoframe]]:
 Display candidate documentation or source in a popup frame
-  next to the candidate menu.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-popupinfo.el][corfu-popupinfo]]:
 Display candidate documentation or source in a popup next to
+  the candidate menu.
 - 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-quick.el][corfu-quick]]:
 Commands to select using Avy-style quick keys.
 
 See the Commentary of those files for configuration details.
diff --git a/extensions/corfu-infoframe.el b/extensions/corfu-popupinfo.el
similarity index 55%
rename from extensions/corfu-infoframe.el
rename to extensions/corfu-popupinfo.el
index 521101514a..c5d3e5c62b 100644
--- a/extensions/corfu-infoframe.el
+++ b/extensions/corfu-popupinfo.el
@@ -1,4 +1,4 @@
-;;; corfu-infoframe.el --- Candidate information popup frame for Corfu -*- 
lexical-binding: t -*-
+;;; corfu-popupinfo.el --- Candidate information popup for Corfu -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -30,13 +30,13 @@
 ;; experimental. The public interface may change any time.
 ;;
 ;; Display a documentation popup for completion candidate when using
-;; Corfu. The `corfu-infoframe-mode' must be enabled globally. Set
-;; `corfu-infoframe-auto' if you want the documentation popup frame to
-;; be displayed automatically.
+;; Corfu. The `corfu-popupinfo-mode' must be enabled globally. Set
+;; `corfu-popupinfo-auto' if you want the documentation popup to be
+;; displayed automatically.
 
-;; For manual toggling the commands `corfu-infoframe-toggle',
-;; `corfu-infoframe-location' and `corfu-infoframe-documentation' are
-;; bound in the `corfu-infoframe-map'.
+;; For manual toggling the commands `corfu-popupinfo-toggle',
+;; `corfu-popupinfo-location' and `corfu-popupinfo-documentation' are
+;; bound in the `corfu-popupinfo-map'.
 
 ;;; Code:
 
@@ -44,70 +44,70 @@
 (eval-when-compile
   (require 'subr-x))
 
-(defface corfu-infoframe
+(defface corfu-popupinfo
   '((t :inherit corfu-default :height 0.8))
-  "Face used for the info frame."
+  "Face used for the info popup."
   :group 'corfu-faces)
 
-(defcustom corfu-infoframe-auto t
-  "Display documentation popup automatically."
+(defcustom corfu-popupinfo-auto t
+  "Display info popup automatically."
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-infoframe-delay 1.0
+(defcustom corfu-popupinfo-delay 1.0
   "The number of seconds to wait before displaying the documentation popup."
   :group 'corfu
   :type '(choice (const :tag "immediate" 0)
  (number :tag "seconds")))
 
-(defcustom corfu-infoframe-hide t
+(defcustom corfu-popupinfo-hide t
   "Hide the popup during the transition between candidates."
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-infoframe-max-width 50
-  "The max width of the info frame in characters."
+(defcustom corfu-popupinfo-max-width 50
+  "The max width of the info popup in characters."
   :group 'corfu
   :type 'integer)
 
-(defcustom corfu-infoframe-max-height 10
-  "The max height of the info frame in characters."
+(defcustom corfu-popupinfo-max-height 10
+  "The max height of the info popup in characters."
   :group 'corfu
   :type 'integer)
 
-(defcustom corfu-infoframe-resize t
-  "Resize the info frame automatically if non-nil."
+(defcustom corfu-popupinfo-resize t
+  "Resize the info popup automatically if non-nil."
   :group 'corfu
   :type 'boolean)
 
-(defvar corfu-infoframe-map
+(defvar corfu-popupinfo-map
   (let ((map (make-sparse-keymap)))
-(define-key map "\M-d" #'corfu-infoframe-documentation)
-(define-key map "\M-l" #'corfu-infoframe-location)
-(define-key map "\M-t" #'corfu-infoframe-toggle)
-(define-key map [remap scroll-other-window] #'corfu-infoframe-scroll-up)
-(define-key map [remap scroll-other-window-down] 
#'corfu-infoframe-scroll-down)
+(define-key map "\M-d" #'corfu-popupinfo-documentation)
+(define-key map "\M-l" #'corfu-popu

[elpa] externals/corfu updated (21214caa8e -> 9f0cad7cd2)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  21214caa8e Update changelog
   new  709ca22543 Fix corfu-infoframe placement (Fix #250)
   new  edf5e1ad3d Rename extension once more
   new  e3210e0b22 Extract buffer parameters
   new  51004b233a corfu-popupinfo: Expand note ;)
   new  e8f6e92ba9 Cleanup corfu-popupinfo--size
   new  9f0cad7cd2 Remove unnecessary get-buffer calls


Summary of changes:
 README.org|   4 +-
 extensions/corfu-infoframe.el | 450 --
 extensions/corfu-popupinfo.el | 450 ++
 3 files changed, 452 insertions(+), 452 deletions(-)
 delete mode 100644 extensions/corfu-infoframe.el
 create mode 100644 extensions/corfu-popupinfo.el



[elpa] externals/corfu 568a770400: corfu-popupinfo--get-location: Support scrolling a bit further

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 568a77040081247a9595f5715bf58012bbf0d012
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-popupinfo--get-location: Support scrolling a bit further
---
 extensions/corfu-popupinfo.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 88d4fc09ce..286bbc9c44 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -157,7 +157,8 @@ See `frame-edges' for details.")
   (goto-char (point-min))
   (forward-line (1- (cdr loc
 (let ((beg (point)))
-  (forward-line (* 2 corfu-popupinfo-max-height))
+  ;; Support a little bit of scrolling.
+  (forward-line (* 10 corfu-popupinfo-max-height))
   (when jit-lock-mode
 (jit-lock-fontify-now beg (point)))
   (setq res (buffer-substring beg (point)))



[elpa] externals/corfu e9435e3dd7: Simplify corfu-popupinfo

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit e9435e3dd791f432648667af67fde5eee96a726a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Simplify corfu-popupinfo
---
 extensions/corfu-popupinfo.el | 29 +
 1 file changed, 13 insertions(+), 16 deletions(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 286bbc9c44..8029d3aada 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -117,21 +117,18 @@
 (defvar-local corfu-popupinfo--candidate nil
   "Completion candidate for the info popup.")
 
-(defvar-local corfu-popupinfo--edges nil
-  "Coordinates of the candidate popup edges.
-
-The coordinates list has the form (LEFT TOP RIGHT BOTTOM) where all
-values are in pixels relative to the origin - the position (0, 0)
-- of FRAME's display.  For terminal frames all values are
-relative to LEFT and TOP which are both zero.
-See `frame-edges' for details.")
+(defvar-local corfu-popupinfo--coordinates nil
+  "Coordinates of the candidate popup.
+The coordinates list has the form (LEFT TOP RIGHT BOTTOM) where
+all values are in pixels relative to the origin. See
+`frame-edges' for details.")
 
 (defvar-local corfu-popupinfo--direction nil
   "Position direction of the info popup relative to the candidate popup.")
 
 (defconst corfu-popupinfo--state-vars
   '(corfu-popupinfo--candidate
-corfu-popupinfo--edges
+corfu-popupinfo--coordinates
 corfu-popupinfo--direction
 corfu-popupinfo--toggle
 corfu-popupinfo--function)
@@ -316,8 +313,8 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
 (let* ((doc-changed
 (not (and (corfu-popupinfo--visible-p)
   (equal candidate corfu-popupinfo--candidate
-   (new-edges (frame-edges corfu--frame 'inner-edges))
-   (edges-changed (not (equal new-edges corfu-popupinfo--edges
+   (new-coords (frame-edges corfu--frame 'inner-edges))
+   (coords-changed (not (equal new-coords 
corfu-popupinfo--coordinates
   (when doc-changed
 (if-let (doc (funcall corfu-popupinfo--function candidate))
 (with-current-buffer (corfu--make-buffer " *corfu-popupinfo*" doc)
@@ -326,8 +323,8 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
   (setf face-remapping-alist (copy-tree face-remapping-alist)
 (alist-get 'default face-remapping-alist) 
'corfu-popupinfo))
   (corfu-popupinfo--hide)
-  (setq doc-changed nil edges-changed nil)))
-  (when (or doc-changed edges-changed)
+  (setq doc-changed nil coords-changed nil)))
+  (when (or doc-changed coords-changed)
 (pcase-let* ((border (alist-get 'child-frame-border-width 
corfu--frame-parameters))
  (`(,area-x ,area-y ,area-w ,area-h ,area-d)
   (corfu-popupinfo--display-area
@@ -340,9 +337,9 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
 (corfu--make-frame corfu-popupinfo--frame
area-x area-y area-w area-h
" *corfu-popupinfo*")
-corfu-popupinfo--direction area-d)))
-  (setq corfu-popupinfo--candidate candidate
-corfu-popupinfo--edges new-edges
+corfu-popupinfo--direction area-d
+corfu-popupinfo--candidate candidate
+corfu-popupinfo--coordinates new-coords))
 
 (defun corfu-popupinfo--hide ()
   "Clear the info popup buffer content and hide it."



[nongnu] elpa/subed updated (a1c61d7d4d -> 7842bb9f15)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch elpa/subed.

  from  a1c61d7d4d Parse and retain comments in VTT files, and simplify 
creating files
   new  f8a09225e4 Add functions subed-copy-region-text, 
subed-subtitle-list-text
   new  7842bb9f15 Clean up warnings


Summary of changes:
 NEWS.org   |  13 ++
 subed/subed-ass.el |  20 +--
 subed/subed-common.el  | 321 +++--
 subed/subed-config.el  |  13 +-
 subed/subed-debug.el   |   6 +-
 subed/subed-mpv.el |   4 +
 subed/subed-srt.el |  26 ++--
 subed/subed-vtt.el |  16 ++-
 subed/subed.el |   8 +-
 tests/test-subed-common.el |  37 +-
 tests/test-subed-vtt.el|  24 +++-
 11 files changed, 319 insertions(+), 169 deletions(-)



[nongnu] elpa/subed f8a09225e4 1/2: Add functions subed-copy-region-text, subed-subtitle-list-text

2022-11-18 Thread ELPA Syncer
branch: elpa/subed
commit f8a09225e405e17a990785e5af6225f7d4cc3365
Author: Sacha Chua 
Commit: Sacha Chua 

Add functions subed-copy-region-text, subed-subtitle-list-text

* subed/subed-common.el: Macros have been moved earlier in the file to
help with compilation.
(subed-subtitle-list-text): New function.
(subed-copy-region-text): New command.
(subed-convert): Optionally include comments when converting to TXT.
* tests/test-subed-common.el ("Getting the text of a list",
"Copying region text"): Add tests.
* tests/test-subed-vtt.el ("VTT"): Add conversion test.
---
 NEWS.org   |   9 ++
 subed/subed-common.el  | 219 ++---
 subed/subed.el |   2 +-
 tests/test-subed-common.el |  37 +++-
 tests/test-subed-vtt.el|  24 -
 5 files changed, 197 insertions(+), 94 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index f2f17e03ce..6a49f5e89d 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,6 +2,15 @@
 
 * subed news
 
+** Version 1.0.23 - 2022-11-18 - Sacha Chua
+
+You can now use ~subed-copy-region-text~ to copy the text from
+subtitles in a region. Call it with a prefix argument (~C-u M-x
+subed-copy-region-text~) to include comments.
+
+Calling ~C-u M-x subed-convert~ will retain comments in the TXT
+output.
+
 ** Version 1.0.22 - 2022-11-17 - Sacha Chua
 
 VTT comments are now parsed and returned as part of ~subed-subtitle~
diff --git a/subed/subed-common.el b/subed/subed-common.el
index 84c17f6487..6dc0a55501 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -35,10 +35,11 @@
 
 ;;; Generic functions
 
-
 (defvar-local subed--regexp-separator nil "Regexp separating subtitles.")
 (defvar-local subed--regexp-timestamp nil "Regexp matching timestamps.")
 
+;;; Macros
+
 (defmacro subed-define-generic-function (name args &rest body)
   "Declare an object method and provide the old way of calling it.
 NAME is the part of the function name that will go after the
@@ -82,6 +83,89 @@ interactive form."
  #',(intern (concat "subed--" (symbol-name name)))
  ,doc)
 
+(defmacro subed-save-excursion (&rest body)
+  "Restore relative point within current subtitle after executing BODY.
+This also works if the buffer changes (e.g. when sorting
+subtitles) as long the subtitle IDs don't change."
+  (declare (debug t))
+  (save-excursion
+`(let ((sub-id (subed-subtitle-id))
+   (sub-pos (subed-subtitle-relative-point)))
+   (progn ,@body)
+   (subed-jump-to-subtitle-id sub-id)
+   ;; Subtitle text may have changed and we may not be able to move to the
+   ;; exact original position
+   (condition-case nil
+   (forward-char sub-pos)
+ ('beginning-of-buffer nil)
+ ('end-of-buffer nil)
+
+(defmacro subed-for-each-subtitle (beg end reverse &rest body)
+  "Run BODY for each subtitle between the region specified by BEG and END.
+If END is nil, it defaults to `point-max'.
+If BEG and END are both nil, run BODY only on the subtitle at point.
+If REVERSE is non-nil, start on the subtitle at END and move backwards.
+Before BODY is run, point is placed on the subtitle's ID."
+  (declare (indent defun))
+  `(atomic-change-group
+ (if (not ,beg)
+ ;; Run body on subtitle at point
+ (save-excursion (subed-jump-to-subtitle-id)
+ ,@body)
+   (let ((begm (make-marker))
+ (endm (make-marker)))
+ (set-marker begm ,beg)
+ (set-marker endm (or ,end (point-max)))
+ ;; Run body on multiple subtitles
+ (if ,reverse
+ ;; Iterate backwards
+ (save-excursion (goto-char endm)
+ (subed-jump-to-subtitle-id)
+ (catch 'first-subtitle-reached
+   (while t
+ ;; The subtitle includes every character up 
to the next subtitle's ID (or eob)
+ (let ((sub-end (save-excursion 
(subed-jump-to-subtitle-end
+   (when (< sub-end begm)
+ (throw 'first-subtitle-reached t)))
+ (progn ,@body)
+ (unless (subed-backward-subtitle-id)
+   (throw 'first-subtitle-reached t)
+   ;; Iterate forwards
+   (save-excursion (goto-char begm)
+   (subed-jump-to-subtitle-id)
+   (catch 'last-subtitle-reached
+ (while t
+   (when (> (point) endm)
+ (throw 'last-subtitle-reached t))
+   (progn ,@body)
+   (unless (subed-forward-subtitle-id)
+ (throw 'last-subtitle-reached t))
+
+(defmacro subed-with-subtitle-rep

[nongnu] elpa/subed 7842bb9f15 2/2: Clean up warnings

2022-11-18 Thread ELPA Syncer
branch: elpa/subed
commit 7842bb9f15f08ea3d223f98bf7be98d6d01be522
Author: Sacha Chua 
Commit: Sacha Chua 

Clean up warnings
---
 NEWS.org  |   4 ++
 subed/subed-ass.el|  20 ++
 subed/subed-common.el | 102 ++
 subed/subed-config.el |  13 ---
 subed/subed-debug.el  |   6 ++-
 subed/subed-mpv.el|   4 ++
 subed/subed-srt.el|  26 +++--
 subed/subed-vtt.el|  16 
 subed/subed.el|   8 +++-
 9 files changed, 123 insertions(+), 76 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 6a49f5e89d..f84274e536 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -2,6 +2,10 @@
 
 * subed news
 
+** Version 1.0.24 - 2022-11-18 - Sacha Chua
+
+subed should compile without checkdoc warnings or obsolete functions now.
+
 ** Version 1.0.23 - 2022-11-18 - Sacha Chua
 
 You can now use ~subed-copy-region-text~ to copy the text from
diff --git a/subed/subed-ass.el b/subed/subed-ass.el
index f2ca52ccd9..4898af12b1 100644
--- a/subed/subed-ass.el
+++ b/subed/subed-ass.el
@@ -149,7 +149,8 @@ If SUB-ID is not given, use subtitle on point.  Return 
point or
 nil if no stop time could be found.  Use the format-specific
 function for MAJOR-MODE."
   (when (subed-jump-to-subtitle-id sub-id)
-(re-search-forward (concat "\\(?:" subed--regexp-timestamp "\\),") 
(point-at-eol) t)
+(re-search-forward (concat "\\(?:" subed--regexp-timestamp "\\),")
+   (line-end-position) t)
 (when (looking-at subed--regexp-timestamp)
   (point
 
@@ -205,13 +206,14 @@ format-specific function for MAJOR-MODE."
 
 ;;; Manipulation
 
-(cl-defmethod subed--make-subtitle (&context (major-mode subed-ass-mode) 
&optional id start stop text comment)
+(cl-defmethod subed--make-subtitle (&context (major-mode subed-ass-mode)
+ &optional _ start stop text _)
   "Generate new subtitle string.
 
-ID, START default to 0.
+START default to 0.
 STOP defaults to (+ START `subed-subtitle-spacing')
 TEXT defaults to an empty string.
-COMMENT is ignored.
+The ID and comment are ignored.
 
 A newline is appended to TEXT, meaning you'll get two trailing
 newlines if TEXT is nil or empty.  Use the format-specific
@@ -222,7 +224,8 @@ function for MAJOR-MODE."
 
subed-default-subtitle-length)))
   (replace-regexp-in-string "\n" "\\n" (or text ""
 
-(cl-defmethod subed--prepend-subtitle (&context (major-mode subed-ass-mode) 
&optional id start stop text comment)
+(cl-defmethod subed--prepend-subtitle (&context (major-mode subed-ass-mode)
+&optional id start stop text 
comment)
   "Insert new subtitle before the subtitle at point.
 
 ID and START default to 0.
@@ -233,11 +236,12 @@ COMMENT is ignored.
 Move point to the text of the inserted subtitle.  Return new
 point.  Use the format-specific function for MAJOR-MODE."
   (subed-jump-to-subtitle-id)
-  (insert (subed-make-subtitle id start stop text))
+  (insert (subed-make-subtitle id start stop text comment))
   (forward-line -1)
   (subed-jump-to-subtitle-text))
 
-(cl-defmethod subed--append-subtitle (&context (major-mode subed-ass-mode) 
&optional id start stop text comment)
+(cl-defmethod subed--append-subtitle (&context (major-mode subed-ass-mode)
+   &optional id start stop text 
comment)
   "Insert new subtitle after the subtitle at point.
 
 ID, START default to 0.
@@ -251,7 +255,7 @@ point.  Use the format-specific function for MAJOR-MODE."
 ;; Point is on last subtitle or buffer is empty
 (subed-jump-to-subtitle-end)
 (unless (bolp) (insert "\n")))
-  (insert (subed-make-subtitle id start stop text))
+  (insert (subed-make-subtitle id start stop text comment))
   (forward-line -1)
   (subed-jump-to-subtitle-text))
 
diff --git a/subed/subed-common.el b/subed/subed-common.el
index 6dc0a55501..4899c48267 100644
--- a/subed/subed-common.el
+++ b/subed/subed-common.el
@@ -32,6 +32,7 @@
 (require 'subed-debug)
 (require 'subed-mpv)
 
+(declare-function subed-tsv-mode "subed-tsv" ())
 
 ;;; Generic functions
 
@@ -71,7 +72,7 @@ interactive form."
  '("srt" "vtt" "ass"))
,(if is-interactive
 `(defun ,(intern (concat "subed-" (symbol-name name))) ,args
-   ,(concat doc "\n\nThis function calls the generic function `"
+   ,(concat doc "\n\nThis function calls the generic function\n`"
 (concat "subed--" (symbol-name name)) "' for the 
actual implementation.")
,(car body)
(,(intern (concat "subed--" (symbol-name name)))
@@ -341,7 +342,7 @@ If SUB-ID is not given, set the text of the current 
subtitle."
 (when start-point
   (- (point) start-point
 
-(subed-define-generic-function subtitle-comment (&optional sub-id)
+(subed-define-generic-function subtitle-comment 

[elpa] externals/corfu 2501ab4344: Use the same delay specification for corfu-echo and corfu-popupinfo

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit 2501ab43448479edb5de1204e64b1ab89336d83e
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use the same delay specification for corfu-echo and corfu-popupinfo
---
 extensions/corfu-echo.el  |  2 +-
 extensions/corfu-popupinfo.el | 40 ++--
 2 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/extensions/corfu-echo.el b/extensions/corfu-echo.el
index bca5e94941..f01f1bb438 100644
--- a/extensions/corfu-echo.el
+++ b/extensions/corfu-echo.el
@@ -39,7 +39,7 @@
   "Face used for echo area messages."
   :group 'corfu-faces)
 
-(defcustom corfu-echo-delay '(1.0 . 0.2)
+(defcustom corfu-echo-delay '(1.0 . 0.5)
   "Show documentation string in the echo area after that number of seconds.
 Set to t for an instant message. The value can be a pair of two
 floats to specify initial and subsequent delay."
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 8029d3aada..48dfd8e934 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -32,8 +32,8 @@
 ;;
 ;; Display a documentation popup for completion candidate when using
 ;; Corfu. The `corfu-popupinfo-mode' must be enabled globally. Set
-;; `corfu-popupinfo-auto' if you want the documentation popup to be
-;; displayed automatically.
+;; `corfu-popupinfo-delay' to nil if the documentation popup should not
+;; appear automatically.
 
 ;; For manual toggling the commands `corfu-popupinfo-toggle',
 ;; `corfu-popupinfo-location' and `corfu-popupinfo-documentation' are
@@ -50,16 +50,17 @@
   "Face used for the info popup."
   :group 'corfu-faces)
 
-(defcustom corfu-popupinfo-auto t
-  "Display info popup automatically."
-  :group 'corfu
-  :type 'boolean)
-
-(defcustom corfu-popupinfo-delay 1.0
-  "The number of seconds to wait before displaying the documentation popup."
-  :group 'corfu
-  :type '(choice (const :tag "immediate" 0)
- (number :tag "seconds")))
+(defcustom corfu-popupinfo-delay '(1.0 . 0.5)
+  "Show documentation popup after that number of seconds.
+Set to t for an instant message. The value can be a pair of two
+floats to specify initial and subsequent delay."
+  :type '(choice (const :tag "Never" nil)
+ (const :tag "Instant" t)
+ (number :tag "Delay in seconds")
+ (cons :tag "Two Delays"
+   (choice :tag "Initial   " number)
+   (choice :tag "Subsequent" number)))
+  :group 'corfu)
 
 (defcustom corfu-popupinfo-hide t
   "Hide the popup during the transition between candidates."
@@ -387,7 +388,7 @@ If ARG is omitted or nil, scroll down by a near full 
screen."
 
 When using this command to manually hide the info popup, it will
 not be displayed until this command is called again, even if
-`corfu-popupinfo-auto' is non-nil."
+`corfu-popupinfo-delay' is non-nil."
   (interactive)
   (if-let ((candidate (and (>= corfu--index 0)
   (nth corfu--index corfu--candidates)))
@@ -402,20 +403,23 @@ not be displayed until this command is called again, even 
if
   (if (and (frame-live-p corfu--frame)
(frame-visible-p corfu--frame)
(>= corfu--index 0))
-  (when (and corfu-popupinfo-auto corfu-popupinfo--toggle)
+  (when (and corfu-popupinfo-delay corfu-popupinfo--toggle)
 (when corfu-popupinfo--auto-timer
   (cancel-timer corfu-popupinfo--auto-timer)
   (setq corfu-popupinfo--auto-timer nil))
-(let ((candidate (nth corfu--index corfu--candidates)))
-  (if (or (= corfu-popupinfo-delay 0)
+(let ((candidate (nth corfu--index corfu--candidates))
+  (delay (if (consp corfu-popupinfo-delay)
+ (funcall (if (corfu-popupinfo--visible-p) #'cdr #'car)
+  corfu-popupinfo-delay)
+   corfu-popupinfo-delay)))
+  (if (or (eq delay t) (<= delay 0)
   (equal candidate corfu-popupinfo--candidate))
   (corfu-popupinfo--show candidate)
 (if corfu-popupinfo-hide
 (corfu-popupinfo--hide)
   (corfu-popupinfo--show corfu-popupinfo--candidate))
 (setq corfu-popupinfo--auto-timer
-  (run-at-time corfu-popupinfo-delay nil
-   #'corfu-popupinfo--show candidate)
+  (run-at-time delay nil #'corfu-popupinfo--show candidate)
 (corfu-popupinfo--hide)))
 
 (defun corfu-popupinfo--teardown ()



[elpa] externals/corfu updated (2501ab4344 -> bb4b0b0854)

2022-11-18 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  2501ab4344 Use the same delay specification for corfu-echo and 
corfu-popupinfo
   new  e728474c08 Increase popupinfo size
   new  bb4b0b0854 corfu-popupinfo: Minor cleanup


Summary of changes:
 extensions/corfu-popupinfo.el | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)



[elpa] externals/corfu bb4b0b0854 2/2: corfu-popupinfo: Minor cleanup

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit bb4b0b0854a2566e6e7ef4c65c7f35a3c74ce079
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-popupinfo: Minor cleanup
---
 extensions/corfu-popupinfo.el | 19 ---
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 98537c1542..7a0e7c4c12 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -135,17 +135,18 @@ all values are in pixels relative to the origin. See
 corfu-popupinfo--function)
   "Buffer-local state variables used by corfu-popupinfo.")
 
-(defun corfu-popupinfo--visible-p ()
-  "Determine whether the info popup is visible."
-  (and (frame-live-p corfu-popupinfo--frame)
-   (frame-visible-p corfu-popupinfo--frame)))
+(defun corfu-popupinfo--visible-p (&optional frame)
+  "Return non-nil if FRAME is visible."
+  (setq frame (or frame corfu-popupinfo--frame))
+  (and (frame-live-p frame) (frame-visible-p frame)))
 
 (defun corfu-popupinfo--get-location (candidate)
   "Get source at location of CANDIDATE."
   (save-excursion
 (when-let* ((fun (plist-get corfu--extra :company-location))
 (loc (funcall fun candidate))
-(res (or (and (bufferp (car loc)) (car loc)) 
(find-file-noselect (car loc) t
+(res (or (and (bufferp (car loc)) (car loc))
+ (find-file-noselect (car loc) t
   (with-current-buffer res
 (save-excursion
   (save-restriction
@@ -308,9 +309,7 @@ the candidate popup, its value is 'bottom, 'top, 'right or 
'left."
   (when corfu-popupinfo--auto-timer
 (cancel-timer corfu-popupinfo--auto-timer)
 (setq corfu-popupinfo--auto-timer nil))
-  (when (and (corfu--popup-support-p)
- (frame-live-p corfu--frame)
- (frame-visible-p corfu--frame))
+  (when (and (corfu--popup-support-p) (corfu-popupinfo--visible-p 
corfu--frame))
 (let* ((doc-changed
 (not (and (corfu-popupinfo--visible-p)
   (equal candidate corfu-popupinfo--candidate
@@ -400,9 +399,7 @@ not be displayed until this command is called again, even if
   "Update the info popup automatically."
   (add-to-list 'minor-mode-overriding-map-alist
`(,#'corfu-popupinfo-mode . ,corfu-popupinfo-map))
-  (if (and (frame-live-p corfu--frame)
-   (frame-visible-p corfu--frame)
-   (>= corfu--index 0))
+  (if (and (>= corfu--index 0) (corfu-popupinfo--visible-p corfu--frame))
   (when (and corfu-popupinfo-delay corfu-popupinfo--toggle)
 (when corfu-popupinfo--auto-timer
   (cancel-timer corfu-popupinfo--auto-timer)



[elpa] externals/corfu e728474c08 1/2: Increase popupinfo size

2022-11-18 Thread ELPA Syncer
branch: externals/corfu
commit e728474c087dcb275725f9dc2387f18179eef8d8
Author: Daniel Mendler 
Commit: Daniel Mendler 

Increase popupinfo size
---
 extensions/corfu-popupinfo.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 48dfd8e934..98537c1542 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -67,7 +67,7 @@ floats to specify initial and subsequent delay."
   :group 'corfu
   :type 'boolean)
 
-(defcustom corfu-popupinfo-max-width 50
+(defcustom corfu-popupinfo-max-width 70
   "The max width of the info popup in characters."
   :group 'corfu
   :type 'integer)



[elpa] externals/auctex 52a7f4050f 27/48: ; * doc/auctex.texi (Adding Environments): Adjust indentation.

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 52a7f4050f48f1459e61aedd86935c2d95b14a50
Author: Arash Esbati 
Commit: Arash Esbati 

; * doc/auctex.texi (Adding Environments): Adjust indentation.
---
 doc/auctex.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index f281352d24..a74489c2a2 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -5659,8 +5659,8 @@ list to be inserted as an optional argument to the 
@samp{itemize}
 environment:
 @lisp
 (LaTeX-add-environments
-'("itemize" LaTeX-env-item-args
-  [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
+ '("itemize" LaTeX-env-item-args
+   [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
 @end lisp
 
 @item LaTeX-env-figure



[elpa] externals/auctex 487c91fddb 04/48: ; Pacify compiler warning: Unused lexical argument `ignored'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 487c91fddbcb6f1e3cf649956374814761802797
Author: Arash Esbati 
Commit: Arash Esbati 

; Pacify compiler warning: Unused lexical argument `ignored'

* tex-bar.el (TeX-bar-LaTeX-button-alist): Mark unused arguments.
---
 tex-bar.el | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tex-bar.el b/tex-bar.el
index 5c36f24b4f..a6804e1862 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -273,13 +273,13 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
:command (progn
   (TeX-save-document #'TeX-master-file)
   (TeX-command "LaTeX" #'TeX-master-file -1))
-   :help ,(lambda (&rest ignored)
+   :help ,(lambda (&rest _ignored)
 (TeX-bar-help-from-command-list "LaTeX")))
 (pdflatex :image "pdftex"
   :command (progn
  (TeX-save-document #'TeX-master-file)
  (TeX-command "PDFLaTeX" #'TeX-master-file -1))
-  :help ,(lambda (&rest ignored)
+  :help ,(lambda (&rest _ignored)
(TeX-bar-help-from-command-list "PDFLaTeX")))
 (next-error :image "error"
 :command TeX-next-error
@@ -287,30 +287,30 @@ the argument BUTTON-ALIST in function 
`toolbarx-install-toolbar'."
 :visible (TeX-error-report-has-errors-p))
 (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
   :command (TeX-command "View" #'TeX-master-file -1)
-  :help ,(lambda (&rest ignored)
+  :help ,(lambda (&rest _ignored)
(TeX-bar-help-from-command-list "View")))
 (file :image "dvips"
   :command (TeX-command "File" #'TeX-master-file -1)
   :visible (not TeX-PDF-mode)
-  :help ,(lambda (&rest ignored)
+  :help ,(lambda (&rest _ignored)
(TeX-bar-help-from-command-list "File")))
 (bibtex :image "bibtex"
 :command (TeX-command (if LaTeX-using-Biber "Biber" "BibTeX")
   #'TeX-master-file -1)
-:help ,(lambda (&rest ignored)
+:help ,(lambda (&rest _ignored)
  (TeX-bar-help-from-command-list
   (if LaTeX-using-Biber "Biber" "BibTeX"
 (clean  :image "delete"
 :command (TeX-command "Clean" #'TeX-master-file -1)
-:help ,(lambda (&rest ignored)
+:help ,(lambda (&rest _ignored)
  (TeX-bar-help-from-command-list "Clean")))
 (spell  :image "spell"
 :command (TeX-command "Spell" #'TeX-master-file -1)
-:help ,(lambda (&rest ignored)
+:help ,(lambda (&rest _ignored)
  (TeX-bar-help-from-command-list "Spell")))
 (latex-symbols-experimental . (:alias :eval-group
-   LaTeX-symbols-toolbar-switch-contents
-   LaTeX-symbols-toolbar-contents)))
+  LaTeX-symbols-toolbar-switch-contents
+  LaTeX-symbols-toolbar-contents)))
   "Alist for button definitions in TeX bar.
 Value should le a list where each element is of format (KEY .
 PROPS), where KEY is a symbol that labels the button and PROPS is



[elpa] externals/auctex 82a23a93ae 43/48: Add some variables containing font declarations

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 82a23a93ae656291b19419692d6a4920c627aefb
Author: Arash Esbati 
Commit: Arash Esbati 

Add some variables containing font declarations

* latex.el (LaTeX-font-family, LaTeX-font-series)
(LaTeX-font-shape, LaTeX-font-size): New variables.
---
 latex.el | 16 
 1 file changed, 16 insertions(+)

diff --git a/latex.el b/latex.el
index e561a9289e..eea54db4eb 100644
--- a/latex.el
+++ b/latex.el
@@ -8859,6 +8859,22 @@ wrapped in \\(?:...\\)? then."
;; We are done.  Just search until the next closing bracket
"[^]]*\\]"))
 
+(defvar LaTeX-font-family '("normalfont" "rmfamily"
+"sffamily"   "ttfamily")
+  "List of LaTeX font family declarations.")
+
+(defvar LaTeX-font-series '("mdseries" "bfseries")
+  "List of LaTeX font series declarations.")
+
+(defvar LaTeX-font-shape '("itshape" "slshape"  "scshape"  "sscshape"
+   "swshape" "ulcshape" "upshape")
+  "List of LaTeX font shape declarations.")
+
+(defvar LaTeX-font-size '("tiny" "scriptsize" "footnotesize" "small"
+  "normalsize" "large" "Large"
+  "LARGE" "huge" "Huge")
+  "List of LaTeX font size declarations.")
+
 (provide 'latex)
 
 ;;; latex.el ends here



[elpa] externals/auctex 8f70cd5211 14/48: Simplify implementation of style/ulem.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 8f70cd521184481b7256d1dd1a1d86c814b76a33
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/ulem.el

* style/ulem.el (LaTeX-ulem-fontdecl, LaTeX-ulem-fontcmd)
(TeX-arg-ulem-fontdecl, TeX-arg-ulem-fontcmd)
(TeX-arg-ulem-useunder): Remove variables and functions.
("ulem"): Move the functionality into the style hook.
---
 style/ulem.el | 56 
 1 file changed, 12 insertions(+), 44 deletions(-)

diff --git a/style/ulem.el b/style/ulem.el
index fa9cefb066..f2383e2024 100644
--- a/style/ulem.el
+++ b/style/ulem.el
@@ -57,8 +57,18 @@
 ;; \useunder {underline_command}{font_declaration}{font_command}
 ;; replaces occurences of font_declaration and font_command with the
 ;; underline_command
-'("useunder" TeX-arg-ulem-useunder
-  TeX-arg-ulem-fontdecl TeX-arg-ulem-fontcmd))
+'("useunder"
+  (TeX-arg-completing-read ("\\uline" "\\uuline" "\\uwave" "\\sout"
+"\\xout"  "\\dashuline" "\\dotuline")
+   "Underline command")
+  (TeX-arg-completing-read ("\\itshape"  "\\bfseries" "\\scshape"
+"\\ttfamily" "\\upshape"  "\\mdseries"
+"\\rmfamily" "\\sffamily" "\\slshape")
+   "Font declaration")
+  (TeX-arg-completing-read ("\\textit" "\\textbf" "\\textsc"
+"\\texttt" "\\textup" "\\textmd"
+"\\textrm" "\\textsf" "\\textsl")
+   "Font command")))
 
;; \ULdepth can be changed with \setlength
(LaTeX-add-lengths "ULdepth")
@@ -80,48 +90,6 @@
   'underline-command)))
  TeX-dialect)
 
-(defvar LaTeX-ulem-fontdecl
-  (mapcar (lambda (str) (concat "\\" str))
-  '("itshape" "bfseries" "scshape"
-"ttfamily" "upshape" "mdseries"
-"rmfamily" "sffamily" "slshape"))
-  "List of font declaration commands in LaTeX.")
-
-(defvar LaTeX-ulem-fontcmd
-  (mapcar (lambda (str) (concat "\\" str))
-  '("textit" "textbf" "textsc"
-"texttt" "textup" "textmd"
-"textrm" "textsf" "textsl"))
-  "List of font commands in LaTeX")
-
-(defun TeX-arg-ulem-fontdecl (optional &optional prompt)
-  "Prompt for the font-declaration un \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt
- optional prompt "Font declaration")
-LaTeX-ulem-fontdecl nil t)
-   optional))
-
-(defun TeX-arg-ulem-fontcmd (optional &optional prompt)
-  "Prompt for the font-declaration un \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt
- optional prompt "Font command")
-LaTeX-ulem-fontcmd nil t)
-   optional))
-
-;; adapted from url.el: TeX-arg-urlstyle
-(defun TeX-arg-ulem-useunder (optional &optional prompt)
-  "Prompt for underline command used in \\useunder."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt "Underline command")
-(mapcar (lambda (str) (concat "\\" str))
-'("uline" "uuline"
-  "uwave" "sout" "xout"
-  "dashuline" "dotuline"))
-nil t)
-   optional))
-
 (defvar LaTeX-ulem-package-options
   '("UWforbf" "ULforem" "normalbf" "normalem")
   "Package options for the ulem package.")



[elpa] externals/auctex 20cabef81f 20/48: ; Delete unnecessary `TeX-arg-string'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 20cabef81f4bf85161f810c02eb8bff7966d2eee
Author: Arash Esbati 
Commit: Arash Esbati 

; Delete unnecessary `TeX-arg-string'

* style/textpos.el ("textpos"):
* style/thm-restate.el ("thm-restate"):
* style/wrapfig.el ("wrapfig"): Drop using unnecessary
`TeX-arg-string'.
---
 style/textpos.el | 4 ++--
 style/thm-restate.el | 4 ++--
 style/wrapfig.el | 8 
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/style/textpos.el b/style/textpos.el
index 50187f92d9..c3ee081a84 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -95,7 +95,7 @@ them."
(and (fboundp 
'LaTeX-color-definecolor-list)
 
(LaTeX-color-definecolor-list
 "Color name"))
-((TeX-arg-string "Color name"
+("Color name")))
 
 `("textblockrulecolour"
   (TeX-arg-conditional (TeX-member "\\`x?color\\'" (TeX-style-list) 
#'string-match)
@@ -105,7 +105,7 @@ them."
(and (fboundp 
'LaTeX-color-definecolor-list)
 
(LaTeX-color-definecolor-list
 "Color name"))
-((TeX-arg-string "Color name"
+("Color name")))
 
 '("TPshowboxestrue")
 '("TPshowboxesfalse")
diff --git a/style/thm-restate.el b/style/thm-restate.el
index 9f85050b5a..0fcd6ecea8 100644
--- a/style/thm-restate.el
+++ b/style/thm-restate.el
@@ -99,7 +99,7 @@
;; Provide restatable\\*? environment
(LaTeX-add-environments
 `("restatable"  LaTeX-env-args
-  [TeX-arg-string "Heading"]
+  ["Heading"]
   (TeX-arg-completing-read
;; Name of the environment we are referring to; this can be
;; defined via amsthm.sty, ntheorem.sty or thmtools.sty:
@@ -119,7 +119,7 @@
   LaTeX-env-thmrestate-restatable)
 
 `("restatable*" LaTeX-env-args
-  [TeX-arg-string "Heading"]
+  ["Heading"]
   (TeX-arg-completing-read
;; Name of the environment we are referring to; this can be
;; defined via amsthm.sty, ntheorem.sty or thmtools.sty:
diff --git a/style/wrapfig.el b/style/wrapfig.el
index cde72ae028..f56f40412d 100644
--- a/style/wrapfig.el
+++ b/style/wrapfig.el
@@ -43,7 +43,7 @@
(LaTeX-add-environments
 ;; \begin{wrapfigure}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wrapfigure}
 '("wrapfigure" LaTeX-env-args
-  [TeX-arg-string "Number of narrow lines"]
+  ["Number of narrow lines"]
   (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
"Placement")
   [TeX-arg-length "Overhang"]
@@ -51,7 +51,7 @@
 
 ;; \begin{wraptable}[No.lines]{Placement}[Overhang]{Width} ... 
\end{wraptable}
 '("wraptable" LaTeX-env-args
-  [TeX-arg-string "Number of narrow lines"]
+  ["Number of narrow lines"]
   (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
"Placement")
   [TeX-arg-length "Overhang"]
@@ -71,8 +71,8 @@
 ,(lambda ()
(mapcar #'car (LaTeX-newfloat-DeclareFloatingEnvironment-list)))
 "Float type"))
-((TeX-arg-string "Float type")))
-  [TeX-arg-string "Number of narrow lines"]
+("Float type"))
+  ["Number of narrow lines"]
   (TeX-arg-completing-read ("r" "R" "l" "L" "i" "I" "o" "O")
"Placement")
   [TeX-arg-length "Overhang"]



[elpa] externals/auctex 42150568f1 06/48: Allow user to insert "$" (bug#57626)

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 42150568f1d8ef9a556ecdc3f107e7f4cb02e7a9
Author: Ikumi Keita 
Commit: Ikumi Keita 

Allow user to insert "$" (bug#57626)

* tex.el (TeX-insert-dollar): Let user to insert "$" when `texmathp'
thinks that the math mode didn't start with dollar, considering it
isn't actually in math mode.
Fix doc string along with the above change.
* texmathp.el: Add cases* env issue in BUGS section of header
comments.
---
 tex.el  | 92 +++--
 texmathp.el | 17 
 2 files changed, 58 insertions(+), 51 deletions(-)

diff --git a/tex.el b/tex.el
index a52bf3cbf3..9a57d45895 100644
--- a/tex.el
+++ b/tex.el
@@ -5942,9 +5942,8 @@ point.  You can choose between \"$...$\" and 
\"\\(...\\)\"."
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
 
-If current math mode was not entered with a dollar, refuse to
-insert one.  Show matching dollar sign if this dollar sign ends
-the TeX math mode and `blink-matching-paren' is non-nil.
+Show matching dollar sign if this dollar sign ends the TeX math
+mode and `blink-matching-paren' is non-nil.
 
 When outside math mode, the behavior is controlled by the variable
 `TeX-electric-math'.
@@ -5996,51 +5995,54 @@ With optional ARG, insert that many dollar signs."
  (buffer-substring
   (point) (progn (end-of-line) (point
  (t
-  ;; Math mode was not entered with dollar - we cannot finish it
-  ;; with one.
-  (message "Math mode started with `%s' cannot be closed with dollar"
-   (car texmathp-why)
+  ;; Math mode was not entered with dollar - we assume that
+  ;; `texmathp' was wrong and behave as if not in math
+  ;; mode. (bug#57626)
+  (TeX--insert-dollar-1
(t
 ;; Just somewhere in the text.
+(TeX--insert-dollar-1
+
+(defun TeX--insert-dollar-1 ()
+  "Do the job of `TeX-insert-dollar' in non-math mode."
+  (cond
+   ((and TeX-electric-math (TeX-active-mark)
+ (/= (point) (mark)))
+(if (> (point) (mark))
+(exchange-point-and-mark))
 (cond
- ((and TeX-electric-math (TeX-active-mark)
-   (/= (point) (mark)))
-  (if (> (point) (mark))
-  (exchange-point-and-mark))
-  (cond
-   ;; $...$ to $$...$$
-   ((and (eq last-command #'TeX-insert-dollar)
- (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
-(replace-match "$$\\1$$" t)
-(set-mark (match-beginning 0)))
-   ;; \(...\) to \[...\]
-   ((and (eq last-command #'TeX-insert-dollar)
- (re-search-forward "\\=(\\([^z-a]*\\))" (mark) t))
-(replace-match "[\\1]" t)
-(set-mark (match-beginning 0)))
-   ;; Strip \[...\] or $$...$$
-   ((and (eq last-command #'TeX-insert-dollar)
- (or (re-search-forward "\\=\\[\\([^z-a]*\\)\\]" (mark) t)
- (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
-(replace-match "\\1" t)
-(set-mark (match-beginning 0)))
-   (t
-;; We use `save-excursion' because point must be situated
-;; before opening symbol.
-(save-excursion (insert (car TeX-electric-math)))
-(exchange-point-and-mark)
-(insert (cdr TeX-electric-math
-  ;; Keep the region active.
-  (TeX-activate-region))
- (TeX-electric-math
-  (insert (car TeX-electric-math))
-  (save-excursion (insert (cdr TeX-electric-math)))
-  (if blink-matching-paren
-  (save-excursion
-(backward-char)
-(sit-for blink-matching-delay
- ;; In any other case just insert a single $.
- ((insert "$")
+ ;; $...$ to $$...$$
+ ((and (eq last-command #'TeX-insert-dollar)
+   (re-search-forward "\\=\\$\\([^$][^z-a]*[^$]\\)\\$" (mark) t))
+  (replace-match "$$\\1$$" t)
+  (set-mark (match-beginning 0)))
+ ;; \(...\) to \[...\]
+ ((and (eq last-command #'TeX-insert-dollar)
+   (re-search-forward "\\=(\\([^z-a]*\\))" (mark) t))
+  (replace-match "[\\1]" t)
+  (set-mark (match-beginning 0)))
+ ;; Strip \[...\] or $$...$$
+ ((and (eq last-command #'TeX-insert-dollar)
+   (or (re-search-forward "\\=\\[\\([^z-a]*\\)\\]" (mark) t)
+   (re-search-forward "\\=\\$\\$\\([^z-a]*\\)\\$\\$" (mark) t)))
+  (replace-match "\\1" t)
+  (set-mark (match-beginning 0)))
+ (t
+  ;; We use `save-excursion' because point must be situated
+  ;; before opening symbol.
+  (save-excursion (insert (car TeX-electric-math)))
+  (exchange-point-and-mark)
+  (insert (cdr TeX-electric-math
+(TeX-activate-region))
+   (TeX-electric-math
+(insert (car TeX-electric-math))
+(save-excursion (insert (cdr TeX-electric-math)))
+(if blink-matching-paren
+(save-excursion
+  (backwar

[elpa] externals/auctex ff5a83f345 17/48: Simplify implementation of style/thm-restate.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit ff5a83f34534f534d95decb9bb4159c7bda817bf
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/thm-restate.el

* style/thm-restate.el (LaTeX-thmrestate-restatable-marco-regexp):
Recognize the starred version of the environment as well.
(LaTeX-thmrestate-auto-cleanup): Fontify new macros.
(LaTeX-env-thmrestate-restatable): Insert only the last mandatory
argument.  Other arguments are included in the style hook.
(LaTeX-thm-restate-package-options): New variable.
---
 style/thm-restate.el | 93 +---
 1 file changed, 59 insertions(+), 34 deletions(-)

diff --git a/style/thm-restate.el b/style/thm-restate.el
index 15d33a9cda..9f85050b5a 100644
--- a/style/thm-restate.el
+++ b/style/thm-restate.el
@@ -1,6 +1,6 @@
 ;;; thm-restate.el --- AUCTeX style for `thm-restate.sty' (v66)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2018--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati 
 ;; Maintainer: auctex-de...@gnu.org
@@ -39,14 +39,17 @@
 ;; Silence the parser:
 (declare-function LaTeX-thmtools-declaretheorem-list
   "thmtools" ())
+(declare-function font-latex-add-keywords
+  "font-latex"
+  (keywords class))
 
 ;; Setup for macro names defined with
-;; \begin{restatable}[]{}{}:
+;; \begin{restatable*?}[]{}{}:
 
 (TeX-auto-add-type "thmrestate-restatable-macro" "LaTeX")
 
 (defvar LaTeX-thmrestate-restatable-marco-regexp
-  `(,(concat "begin{restatable}"
+  `(,(concat "begin{restatable\\*?}"
  "[ \t\n\r%]*"
  "\\(?:\\[[^]]*\\]\\)?"
  "[ \t\n\r%]*"
@@ -62,43 +65,25 @@
 (defun LaTeX-thmrestate-auto-cleanup ()
   "Process parsed elements from thm-restate package."
   (dolist (newmac (mapcar #'car (LaTeX-thmrestate-restatable-macro-list)))
-(TeX-add-symbols `(,newmac 0)
- `(,(concat newmac "*") 0
+(TeX-add-symbols newmac (concat newmac "*"))
+(when (and (featurep 'font-latex)
+   (eq TeX-install-font-lock 'font-latex-setup))
+  (font-latex-add-keywords `((,newmac "*"))
+   'function
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-thmrestate-auto-prepare t)
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmrestate-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
 (defun LaTeX-env-thmrestate-restatable (optional)
-  "Insert arguments for restatable environment from thm-restate package."
-  ;; The optional heading argument:
-  (let ((TeX-arg-opening-brace LaTeX-optop)
-(TeX-arg-closing-brace LaTeX-optcl))
-(TeX-argument-insert
- (TeX-read-string
-  (TeX-argument-prompt t nil "Heading"))
- t))
-  ;; Name of the environment we are referring to; this can be defined
-  ;; via amsthm.sty, ntheorem.sty or thmtools.sty:
-  (TeX-argument-insert
-   (completing-read
-(TeX-argument-prompt optional nil "Environment")
-(append
- ;; Cater for environments defined with amsthm's \newtheorem
- (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
-(LaTeX-amsthm-newtheorem-list))
-   (LaTeX-amsthm-newtheorem-list))
- ;; Cater for environments defined with ntheorem's \newtheorem
- (when (and (fboundp 'LaTeX-ntheorem-newtheorem-list)
-(LaTeX-ntheorem-newtheorem-list))
-   (LaTeX-ntheorem-newtheorem-list))
- ;; Environments defined with \declaretheorem
- (LaTeX-thmtools-declaretheorem-list)))
-   optional)
+  "Insert last argument of restatable environment from thm-restate package."
   (let ((mac (TeX-read-string
   (TeX-argument-prompt optional nil "Macro"
-(TeX-add-symbols `(,mac 0)
- `(,(concat mac "*") 0))
+(when (and (featurep 'font-latex)
+   (eq TeX-install-font-lock 'font-latex-setup))
+  (font-latex-add-keywords `((,mac "*"))
+   'function))
+(TeX-add-symbols mac (concat mac "*"))
 (TeX-argument-insert mac optional)))
 
 (TeX-add-style-hook
@@ -113,8 +98,48 @@
 
;; Provide restatable\\*? environment
(LaTeX-add-environments
-'("restatable"  LaTeX-env-args LaTeX-env-thmrestate-restatable)
-'("restatable*" LaTeX-env-args LaTeX-env-thmrestate-restatable)))
+`("restatable"  LaTeX-env-args
+  [TeX-arg-string "Heading"]
+  (TeX-arg-completing-read
+   ;; Name of the environment we are referring to; this can be
+   ;; defined via amsthm.sty, ntheorem.sty or thmtools.sty:
+   ,(lambda ()
+  (append
+   ;; Cater for environments defined with amsthm's \newtheorem
+   (when (and (fboundp 'LaTeX-amsthm-newtheorem-list)
+  (LaTeX-amsthm-newtheorem-list))
+ (LaTeX-amsthm-newtheorem-list))
+   ;; Cater for environments defined with ntheorem's \newtheorem
+   

[elpa] externals/auctex updated (c569c7d486 -> 93430d7ab0)

2022-11-18 Thread Tassilo Horn
tsdh pushed a change to branch externals/auctex.

  from  c569c7d486 Release GNU AUCTeX 13.1.5
   new  0ee39626e4 Use `TeX-arg-completing-read'
   new  05cd0440c5 Use `TeX-arg-completing-read-multiple'
   new  7642155b73 Don't let-bind `inhibit-point-motion-hooks' to t
   new  487c91fddb ; Pacify compiler warning: Unused lexical argument 
`ignored'
   new  d7e6fa0d41 Cleanup `TeX-insert-dollar'
   new  42150568f1 Allow user to insert "$" (bug#57626)
   new  35ec84ba6f Add capf for LaTeX marco/environment arguments
   new  a617944b4b Fix style/xspace.el
   new  d3970b77da ; * latex.el (LaTeX-common-initialization): Remove dupe 
textcircled.
   new  1f6e9e7e58 Update style/XCharter.el to package version 1.24
   new  cdf57fba58 * latex.el (TeX-arg-conditional): Declare 'indent'.
   new  5949388ca2 Simplify argument queries in style/wrapfig.el
   new  8775c8355f Replace `TeX-arg-url-urlstyle' in style/url.el
   new  8f70cd5211 Simplify implementation of style/ulem.el
   new  8e3137f641 Simplify implementation of style/titlesec.el
   new  978ebea1e8 Simplify implementation of style/thmtools.el
   new  ff5a83f345 Simplify implementation of style/thm-restate.el
   new  9b365b7419 Simplify implementation of style/textpos.el
   new  49987f08dd Provide completion candidates for `TeX-arg-length'
   new  20cabef81f ; Delete unnecessary `TeX-arg-string'
   new  748449959c New option `TeX-refuse-unmatched-dollar'
   new  c6c7c3f024 ; Use #' to quote function
   new  a0ba387b2c ; Trivial cleanups
   new  ce15e3fd87 Extend Japanese TeX support
   new  e83a4b87b3 Use the correct function to retrieve the key=vals
   new  4eaed332ba Add new hooks for inserting environments with arguments
   new  52a7f4050f ; * doc/auctex.texi (Adding Environments): Adjust 
indentation.
   new  21e624026a Improve support for TikZ
   new  316550f0bf Fix `ConTeXt-add-environments'
   new  c0c9556338 Don't insert empty node name
   new  cb7b44227d Improve fontification of indexing macros
   new  0c482642cc Simplify implementation of style/currvita.el
   new  a7a7209a08 Extend the argument list of some functions
   new  d5ff42e0bd Simplify implementation of style/enumitem.el
   new  c525dd42dd Simplify implementation of style/tcolorboxlib-raster.el
   new  835e01ddb6 Extend the argument list of `TeX-arg-string'
   new  e53bb19a90 ; Recognize large arguments with many lines
   new  b9548da54a Simplify implementation of style/tcolorboxlib-theorems.el
   new  52738d11b2 Remove entry in 
`LaTeX-completion-function-map-alist-keyval'
   new  c8d638ac9d Use `functionp' to recognize a function
   new  3d8d93e4fd ; Make code more resilient
   new  615e12f650 Simplify implementation of style/tcolorbox.el
   new  82a23a93ae Add some variables containing font declarations
   new  47f9ead1c6 Respect `TeX-exit-mark' when inserting enviroments
   new  04a3138c81 Simplify implementation of style/theorem.el
   new  50c0fb3d31 * style/afterpage.el ("afterpage"): Fontify the only 
macro.
   new  6cbeff713b Simplify implementation of style/fancyhdr.el
   new  93430d7ab0 Merge remote-tracking branch 'origin/master' into 
externals/auctex


Summary of changes:
 context-en.el  |   5 +-
 context-nl.el  |   5 +-
 context.el |  25 +-
 doc/auctex.texi|  52 +++-
 doc/changes.texi   |  15 +
 font-latex.el  |   2 +-
 latex.el   | 669 ++---
 style/MyriadPro.el |   8 +-
 style/XCharter.el  | 116 +--
 style/afterpage.el |  18 +-
 style/amsthm.el|   4 +-
 style/arabxetex.el |  16 +-
 style/babel.el |  37 +--
 style/biblatex.el  |  20 +-
 style/bigdelim.el  |  33 +-
 style/caption.el   |  28 +-
 style/changes.el   |  10 +-
 style/csquotes.el  |  24 +-
 style/currvita.el  |  51 +---
 style/doc.el   |  19 +-
 style/enumitem.el  | 236 +++
 style/environ.el   |   4 +-
 style/etoolbox.el  |  13 +-
 style/exam.el  |  64 +---
 style/fancyhdr.el  |  62 ++--
 style/fancyvrb.el  |  44 +--
 style/floatrow.el  |  36 +--
 style/fontaxes.el  |  26 +-
 style/fontspec.el  |  17 +-
 style/footmisc.el  |  43 ++-
 style/graphicx.el  |  52 ++--
 style/harvard.el   |  17 +-
 style/hologo.el|  12 +-
 style/ifthen.el|   4 +-
 style/imakeidx.el  |  23 +-
 style/l3doc.el |  12 +-
 style/ltugboat.el  |  18 +-
 style/ltxdoc.el|   4 +-
 style/makeidx.el  

[elpa] externals/auctex cb7b44227d 31/48: Improve fontification of indexing macros

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit cb7b44227d23366996fa94c1ffe19208add6c127
Author: Arash Esbati 
Commit: Arash Esbati 

Improve fontification of indexing macros

* font-latex.el (font-latex-built-in-keyword-classes): Add entries
for \makeindex and \makeglossary macros.

* style/imakeidx.el ("imakeidx"):
* style/makeidx.el ("makeidx"):
* style/multind.el ("multind"):
* style/splitidx.el ("splitidx"): Improve fontification of
indexing macros.
---
 font-latex.el |  2 +-
 style/imakeidx.el | 23 ---
 style/makeidx.el  | 17 ++---
 style/multind.el  | 20 +---
 style/splitidx.el |  2 ++
 5 files changed, 54 insertions(+), 10 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index 52c0fca11e..4067564d17 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -378,7 +378,7 @@ variable `font-latex-fontify-sectioning'." ',num)
   ("TeX" "") ("LaTeX" "") ("LaTeXe" "")
   ("normalfont" "") ("normalshape" "")
   ("tableofcontents" "") ("listoffigures" "") ("listoftables" "")
-  ("maketitle" ""))
+  ("maketitle" "") ("makeindex" "") ("makeglossary" ""))
  font-lock-function-name-face 2 command)
 ("sectioning-0"
  (("part" "*[{"))
diff --git a/style/imakeidx.el b/style/imakeidx.el
index 325631efed..ef434137b3 100644
--- a/style/imakeidx.el
+++ b/style/imakeidx.el
@@ -1,6 +1,6 @@
 ;;; imakeidx.el --- AUCTeX style for `imakeidx.sty'.  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2012-2013, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Author: Mosè Giordano 
@@ -29,6 +29,11 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+  "font-latex"
+  (keywords class))
+
 (require 'tex)
 (require 'latex)
 
@@ -65,7 +70,7 @@
'(("headers")
 
(TeX-add-symbols
-'("makeindex" [ (TeX-arg-key-val LaTeX-imakeidx-makeindex-options) ])
+'("makeindex" [TeX-arg-key-val LaTeX-imakeidx-makeindex-options])
 '("indexsetup" (TeX-arg-key-val LaTeX-imakeidx-indexsetup-options))
 '("splitindexoptions" "Command line option")
 '("index" [ "Index name" ] TeX-arg-index)
@@ -92,7 +97,19 @@
   '(("|see{\\([^{}\n\r]*\\)" 1 LaTeX-index-entry-list))
   TeX-complete-list))
(and (fboundp 'reftex-add-index-macros)
-(reftex-add-index-macros '(default
+(reftex-add-index-macros '(default)))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+  (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("makeindex" "[")
+("indexsetup""{")
+("splitindexoptions" "{")
+("indexprologue" "[{")
+("printindex""["))
+  'function)
+ (font-latex-add-keywords '(("index" "[{"))
+  'reference)))
  TeX-dialect)
 
 (defvar LaTeX-imakeidx-package-options
diff --git a/style/makeidx.el b/style/makeidx.el
index 4fe7ce464c..658094c3b1 100644
--- a/style/makeidx.el
+++ b/style/makeidx.el
@@ -1,6 +1,6 @@
 ;;; makeidx.el --- AUCTeX support for makeidx.sty  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 1999, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2020, 2022 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik 
 ;; Maintainer: auctex-de...@gnu.org
@@ -24,13 +24,18 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+  "font-latex"
+  (keywords class))
+
 (require 'tex)
 
 (TeX-add-style-hook
  "makeidx"
  (lambda ()
(TeX-add-symbols
-"printindex" "indexspace")
+"printindex")
 
;; Parsing the default index macro is defined in latex.el
;; The same is true form completion in the index macro
@@ -43,7 +48,13 @@
 
;; RefTeX support
(and (fboundp 'reftex-add-index-macros)
-(reftex-add-index-macros '(default
+(reftex-add-index-macros '(default)))
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+  (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("printindex" ""))
+  'function)))
  TeX-dialect)
 
 (defvar LaTeX-makeidx-package-options nil
diff --git a/style/multind.el b/style/multind.el
index 68a4ab6a9f..b3ced1327a 100644
--- a/style/multind.el
+++ b/style/multind.el
@@ -1,6 +1,6 @@
 ;;; multind.el --- AUCTeX support for multiple indices with multind.sty.  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 1999, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 1999--2022 Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik 
 ;; Maintainer: auctex-de...@gnu.org
@@ -24,6 +24,11 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-late

[elpa] externals/auctex 4eaed332ba 26/48: Add new hooks for inserting environments with arguments

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 4eaed332ba600d8fc90d2177815597e9407c3f2b
Author: Arash Esbati 
Commit: Arash Esbati 

Add new hooks for inserting environments with arguments

* doc/auctex.texi (Adding Environments): Document new functions
`LaTeX-env-item-args' and `LaTeX-env-label-args'.

* latex.el (LaTeX--env-parse-args, LaTeX--env-item): New helper
functions which contain body used be part of `LaTeX-env-args' and
`LaTeX-env-item'.
(LaTeX-env-item, LaTeX-env-args): Use new helpers.
(LaTeX-env-item-args, LaTeX-env-label-args): New functions like
their counterparts without '-args' but allowing additional
arguments.

* latex.el (LaTeX-completion-parse-args): Recognize new functions.
---
 doc/auctex.texi | 17 +
 latex.el| 46 +++---
 2 files changed, 52 insertions(+), 11 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 682e4ed86c..f281352d24 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -5650,6 +5650,19 @@ Following is a list of available hooks for
 @item LaTeX-env-item
 Insert the given environment and the first item.
 
+@item LaTeX-env-item-args
+Insert the given environment plus further arguments, and the first item.
+You can use this as a hook in case you want to specify multiple complex
+arguments just like in elements of @code{TeX-add-symbols}.  Here is an
+example from @file{enumitem.el} in order to prompt for a @samp{key=value}
+list to be inserted as an optional argument to the @samp{itemize}
+environment:
+@lisp
+(LaTeX-add-environments
+'("itemize" LaTeX-env-item-args
+  [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
+@end lisp
+
 @item LaTeX-env-figure
 Insert the given figure-like environment with a caption and a label.
 
@@ -5660,6 +5673,10 @@ specifications.
 @item LaTeX-env-label
 Insert the given environment with a label.
 
+@item LaTeX-env-label-args
+Insert the given environment with a label and further arguments to the
+environment.
+
 @item LaTeX-env-list
 Insert the given list-like environment, a specifier for the label and
 the first item.
diff --git a/latex.el b/latex.el
index e096603b4e..9bb5e005c5 100644
--- a/latex.el
+++ b/latex.el
@@ -1061,9 +1061,18 @@ If nil, act like the empty string is given, but do not 
prompt."
   :group 'LaTeX-label
   :type 'string)
 
-(defun LaTeX-env-item (environment)
-  "Insert ENVIRONMENT and the first item."
-  (LaTeX-insert-environment environment)
+(defun LaTeX--env-parse-args (args)
+  "Helper function to insert arguments defined by ARGS."
+  (save-excursion
+(LaTeX-find-matching-begin)
+(end-of-line)
+(let ((TeX-exit-mark (or TeX-exit-mark
+ (make-marker
+  (TeX-parse-arguments args
+
+(defun LaTeX--env-item (environment)
+  "Helper function running inside `LaTeX-env-item'.
+The body of this function used to be part of `LaTeX-env-item'."
   (if (TeX-active-mark)
   (progn
 (LaTeX-find-matching-begin)
@@ -1088,6 +1097,19 @@ If nil, act like the empty string is given, but do not 
prompt."
 (current-fill-column)))
 (LaTeX-fill-paragraph nil)))
 
+(defun LaTeX-env-item (environment)
+  "Insert ENVIRONMENT and the first item.
+The first item is inserted by the function `LaTeX--env-item'."
+  (LaTeX-insert-environment environment)
+  (LaTeX--env-item environment))
+
+(defun LaTeX-env-item-args (environment &rest args)
+  "Insert ENVIRONMENT followed by ARGS and first item.
+The first item is inserted by the function `LaTeX--env-item'."
+  (LaTeX-insert-environment environment)
+  (LaTeX--env-parse-args args)
+  (LaTeX--env-item environment))
+
 (defcustom LaTeX-label-alist
   '(("figure" . LaTeX-figure-label)
 ("table" . LaTeX-table-label)
@@ -1296,6 +1318,11 @@ Just like array and tabular."
 ;; Restore the positions of point and mark.
 (exchange-point-and-mark)))
 
+(defun LaTeX-env-label-args (environment &rest args)
+  "Run `LaTeX-env-label' on ENVIRONMENT and insert ARGS."
+  (LaTeX-env-label environment)
+  (LaTeX--env-parse-args args))
+
 (defun LaTeX-env-list (environment)
   "Insert ENVIRONMENT and the first item."
   (let ((label (TeX-read-string "Default Label: ")))
@@ -1422,12 +1449,7 @@ Just like array and tabular."
 (defun LaTeX-env-args (environment &rest args)
   "Insert ENVIRONMENT and arguments defined by ARGS."
   (LaTeX-insert-environment environment)
-  (save-excursion
-(LaTeX-find-matching-begin)
-(end-of-line)
-(let ((TeX-exit-mark (or TeX-exit-mark
- (make-marker
-  (TeX-parse-arguments args
+  (LaTeX--env-parse-args args))
 
 (defun LaTeX-env-label-as-keyval (_optional &optional keyword keyvals 
environment)
   "Query for a label and insert it in the optional argument of an environment.
@@ -7458,10 +7480,12 @@ or `LaTeX-environment-list' and returns it."
 (TeX-symbol-list)
  

[elpa] externals/auctex d7e6fa0d41 05/48: Cleanup `TeX-insert-dollar'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit d7e6fa0d418b66dbaaef56d723bc22b1a9862b8e
Author: Ikumi Keita 
Commit: Ikumi Keita 

Cleanup `TeX-insert-dollar'

* tex.el (TeX-insert-dollar): Don't insert "\)\(" when we have empty
active region and `TeX-electric-math' is ("\(" . "\)").
Use `insert-char' instead of `insert'+`make-string' to insert multiple
"$"s.
Supply FIXEDCASE argument for `replace-match'.
Use `save-excursion' for robustness to blink matching paren.
Add "*" at the beginning of interactive spec to declare explicitly
it's invalid in read-only buffer.
Fix line break of doc string and comment.
(TeX-symbol-marker,TeX-symbol-marker-pos,TeX-dollar-sign)
(TeX-dollar-string,TeX-dollar-regexp): Declare as obsolete explicitly.
* doc/auctex.texi (Quotes): Write cons value in "(A . B)" form instead
of "(cons A B)".
---
 doc/auctex.texi |  8 
 tex.el  | 56 ++--
 2 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index fb34568b44..d323e6f272 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -433,14 +433,14 @@ will blink when @code{blink-matching-paren} is non-nil.  
If
 @code{TeX-electric-math} is nil, typing @kbd{$} simply inserts @samp{$}
 at point, this is the default.
 
-Besides @code{nil}, possible values for this variable are @code{(cons
-"$" "$")} for @TeX{} inline equations @samp{$...$}, and @code{(cons
-"\\(" "\\)")} for @LaTeX{} inline equations @samp{\(...\)}.
+Besides @code{nil}, possible values for this variable are @code{("$"
+. "$")} for @TeX{} inline equations @samp{$...$}, and @code{("\(" . "\)")}
+for @LaTeX{} inline equations @samp{\(...\)}.
 
 If the variable is non-nil and point is inside math mode right between a
 couple of single dollars, pressing @kbd{$} will insert another pair of
 dollar signs and leave the point between them.  Thus, if
-@code{TeX-electric-math} is set to @code{(cons "$" "$")} you can easily
+@code{TeX-electric-math} is set to @code{("$" . "$")} you can easily
 obtain a @TeX{} display equation @samp{$$...$$} by pressing @kbd{$}
 twice in a row.  (Note that you should not use double dollar signs in
 @LaTeX{} because this practice can lead to wrong spacing in typeset
diff --git a/tex.el b/tex.el
index 0494f7daaa..a52bf3cbf3 100644
--- a/tex.el
+++ b/tex.el
@@ -5891,18 +5891,20 @@ See also `TeX-font-replace' and 
`TeX-font-replace-function'."
 ;; Rewritten from scratch with use of `texmathp' by
 ;; Carsten Dominik 
 
+;; The following variables are no longer used, but kept in case some
+;; foreign code uses any of them.
 (defvar TeX-symbol-marker nil)
-
 (defvar TeX-symbol-marker-pos 0)
-
-;; The following constants are no longer used, but kept in case some
-;; foreign code uses any of them.
-(defvar TeX-dollar-sign ?$
-  "Character used to enter and leave math mode in TeX.")
+(defvar TeX-dollar-sign ?$)
 (defconst TeX-dollar-string (char-to-string TeX-dollar-sign))
 (defconst TeX-dollar-regexp
   (concat "^" (regexp-quote TeX-dollar-string) "\\|[^" TeX-esc "]"
   (regexp-quote TeX-dollar-string)))
+(make-obsolete-variable 'TeX-symbol-marker nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-symbol-marker-pos nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-sign nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-string nil "AUCTeX 9.9d++")
+(make-obsolete-variable 'TeX-dollar-regexp nil "AUCTeX 9.9d++")
 
 (defcustom TeX-math-toggle-off-input-method t
   "If non-nil, auto turn off some input methods when entering math mode.
@@ -5947,19 +5949,19 @@ the TeX math mode and `blink-matching-paren' is non-nil.
 When outside math mode, the behavior is controlled by the variable
 `TeX-electric-math'.
 
-With raw \\[universal-argument] prefix, insert exactly one dollar
-sign.  With optional ARG, insert that many dollar signs."
-  (interactive "P")
+With raw \\[universal-argument] prefix, insert exactly one dollar sign.
+With optional ARG, insert that many dollar signs."
+  (interactive "*P")
   (cond
((and arg (listp arg))
 ;; C-u always inserts one
 (insert "$"))
(arg
 ;; Numerical arg inserts that many
-(insert (make-string (prefix-numeric-value arg) ?\$)))
+(insert-char ?\$ (prefix-numeric-value arg)))
((or (TeX-escaped-p) (TeX-verbatim-p))
-;; Point is escaped with `\' or is in a verbatim-like construct, so just
-;; insert one $.
+;; Point is escaped with `\' or is in a verbatim-like construct,
+;; so just insert one $.
 (insert "$"))
((texmathp)
 ;; We are inside math mode
@@ -5967,16 +5969,17 @@ sign.  With optional ARG, insert that many dollar 
signs."
  ((and TeX-electric-math
(eq (preceding-char) ?\$)
(eq (following-char) ?\$))
-  ;; Point is between "$$" and `TeX-electric-math' is non-nil - insert
-  ;; another pair of dollar signs and leave point between them.
+  ;; Point is betwee

[elpa] externals/auctex 05cd0440c5 02/48: Use `TeX-arg-completing-read-multiple'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 05cd0440c5d72ffaf98f3b76c0cae124a420cc10
Author: Arash Esbati 
Commit: Arash Esbati 

Use `TeX-arg-completing-read-multiple'

* style/babel.el ("babel"):
* style/biblatex.el ("biblatex"):
* style/doc.el ("doc"):
* style/enumitem.el ("enumitem"):
* style/ntheorem.el ("ntheorem"):
* style/thmtools.el ("thmtools"):
* style/titleps.el ("titleps"):
* style/xcolor.el ("xcolor"): Use
`TeX-arg-completing-read-multiple' instead of `TeX-arg-eval' and
`mapconcat ...' combination.
---
 style/babel.el| 21 ++---
 style/biblatex.el |  8 +++-
 style/doc.el  |  7 ++-
 style/enumitem.el | 20 +---
 style/fontaxes.el | 12 +---
 style/ntheorem.el |  6 ++
 style/thmtools.el | 32 +++-
 style/titleps.el  | 14 --
 style/xcolor.el   | 10 --
 9 files changed, 50 insertions(+), 80 deletions(-)

diff --git a/style/babel.el b/style/babel.el
index 1c89e8ffab..c58ea9fab6 100644
--- a/style/babel.el
+++ b/style/babel.el
@@ -286,11 +286,8 @@
 '("useshorthands"  "Character")
 '("useshorthands*" "Character")
 '("defineshorthand"
-  [TeX-arg-eval mapconcat #'identity
-(TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Language(s)")
- (LaTeX-babel-active-languages))
-","]
+  [TeX-arg-completing-read-multiple (LaTeX-babel-active-languages)
+"Language(s)"]
   t nil)
 '("languageshorthands" TeX-arg-babel-lang)
 '("babelshorthand"   "Short hand")
@@ -304,11 +301,8 @@
 
 ;; 1.14 Selecting fonts
 '("babelfont"
-  [TeX-arg-eval mapconcat #'identity
-(TeX-completing-read-multiple
- (TeX-argument-prompt t nil "Language(s)")
- LaTeX-babel-language-list)
-","]
+  [TeX-arg-completing-read-multiple LaTeX-babel-language-list
+"Language(s)"]
   (TeX-arg-eval let ((fontfam (completing-read
(TeX-argument-prompt nil nil "font family")
'("rm" "sf" "tt"
@@ -341,11 +335,8 @@
   (TeX-arg-completing-read ("soft" "hard" "repeat" "nobreak" "empty") 
"Type/Text"))
 
 '("babelhyphenation"
-  [TeX-arg-eval mapconcat #'identity
-(TeX-completing-read-multiple
- (TeX-argument-prompt nil nil "Language(s)")
- LaTeX-babel-language-list)
-","]
+  [TeX-arg-completing-read-multiple LaTeX-babel-language-list
+"Language(s)"]
   t)
 
 ;; 1.23 Selecting scripts
diff --git a/style/biblatex.el b/style/biblatex.el
index 47cdb16f54..3254ce8566 100644
--- a/style/biblatex.el
+++ b/style/biblatex.el
@@ -275,9 +275,8 @@ for citation keys."
 ;;; Global Customization
 ;; Setting Package Options
 '("ExecuteBibliographyOptions"
-  [TeX-arg-eval  mapconcat #'identity
- (TeX-completing-read-multiple
-  "Entry type: " LaTeX-biblatex-entrytype) ","]
+  [TeX-arg-completing-read-multiple LaTeX-biblatex-entrytype
+"Entry type"]
   (TeX-arg-key-val LaTeX-biblatex-executebibliographyoptions-options))
 ;;; Bibliography Commands
 ;; Resources
@@ -328,8 +327,7 @@ for citation keys."
 '("defbibcheck" "Name" t)
 ;; Dynamic Entry Sets
 '("defbibentryset" "Set"
-  (TeX-arg-eval mapconcat #'identity (TeX-completing-read-multiple
-  "Keys: " (LaTeX-bibitem-list)) ","))
+  (TeX-arg-completing-read-multiple (LaTeX-bibitem-list) "Keys"))
 ;;; Citation Commands
 '("cite" (TeX-arg-conditional TeX-arg-cite-note-p
   (["Prenote"] ["Postnote"]) ()) TeX-arg-cite)
diff --git a/style/doc.el b/style/doc.el
index 892e578616..d57e1e05b1 100644
--- a/style/doc.el
+++ b/style/doc.el
@@ -275,11 +275,8 @@ percent sign at the beginning of a line before
(format "%s" file)
 
 ;; 2.2 Package options
-'("SetupDoc" (TeX-arg-eval mapconcat #'identity
-   (TeX-completing-read-multiple
-(TeX-argument-prompt nil nil "Options")
-LaTeX-doc-package-options)
-   ","))
+'("SetupDoc" (TeX-arg-completing-read-multiple LaTeX-doc-package-options
+   "Options"))
 
 ;; 2.4 Describing the usage of macros and environments
 '("DescribeMacro"
diff --git a/style/enumitem.el b/style/enumitem.el
index 51106b4ccc..4e0e929a56 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -430,17 +430,15 @@ provided.  OPTIONAL is ignored."
 '("setlist" LaTeX

[elpa] externals/auctex 1f6e9e7e58 10/48: Update style/XCharter.el to package version 1.24

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 1f6e9e7e58d929689f08e276fa58ab6377c890bb
Author: Arash Esbati 
Commit: Arash Esbati 

Update style/XCharter.el to package version 1.24

* style/XCharter.el ("XCharter"): Add support for new macros
incl. fontification.
(LaTeX-XCharter-package-options): Turn variable into a function
which reads key=val package options.
---
 style/XCharter.el | 116 +++---
 1 file changed, 92 insertions(+), 24 deletions(-)

diff --git a/style/XCharter.el b/style/XCharter.el
index 6f35b36933..4edb5a37ef 100644
--- a/style/XCharter.el
+++ b/style/XCharter.el
@@ -1,6 +1,6 @@
-;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.094)  -*- 
lexical-binding: t; -*-
+;;; XCharter.el --- AUCTeX style for `XCharter.sty' (v1.24)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2014, 2017, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2014--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati 
 ;; Maintainer: auctex-de...@gnu.org
@@ -26,12 +26,13 @@
 
 ;;; Commentary:
 
-;; This file adds support for `XCharter.sty' (v1.094) from 2017/08/08.
+;; This file adds support for `XCharter.sty' (v1.24) from 2022/04/16.
 ;; `XCharter.sty' is part of TeXLive.
 
 ;;; Code:
 
 (require 'tex)
+(require 'latex)
 
 ;; Silence the compiler:
 (declare-function font-latex-add-keywords
@@ -43,7 +44,9 @@
  (lambda ()
 
;; Run style hook for various packages loaded by XCharter
-   (TeX-run-style-hooks "textcomp" "fontaxes")
+   (if (memq TeX-engine '(xetex luatex))
+   (TeX-run-style-hooks "fontspec")
+ (TeX-run-style-hooks "textcomp" "fontaxes"))
 
;; New symbols
(TeX-add-symbols
@@ -51,47 +54,112 @@
 ;; Only preamble commands
 '("useosf"  0)
 '("useosfI" 0)
+'("useproportional" 0)
 
 ;; Text commands
-'("textsu" t)   ; superior figures
-'("sustyle"   -1)   ;
-'("textin" t)   ; inferior figures
-'("instyle"   -1)   ;
 '("textlf" t)   ; lining figures
 '("lfstyle"   -1)   ;
 '("textosf"t)   ; oldstyle figures
 '("textosfI"   t)   ; oldstyle figures alternate
 '("osfstyle"  -1)   ; whatever oldstyle option is in force
+'("texttlf"t)
+'("tlfstyle"  -1)
+'("texttosf"   t)
+'("tosfstyle" -1)
+
+'("liningnums"   -1)
+'("tabularnums"  -1)
+'("oldstylenums" -1)
+'("proportionalnums" -1)
+
+'("textsu" t)   ; superior figures
+'("sustyle"   -1)   ;
+'("textinf"t)   ; inferior figures
+'("instyle"   -1)   ;
+
 '("textnumerator"   t) ; numerators
-'("textnu"  t) ;
+'("textnum" t)
 '("textdenominator" t) ; denominators
 '("textde"  t) ;
-'("textfrac"2))
+'("textfrac"  ["Number"] "Numerator" "Denominator")
+'("textsfrac" ["Number"] "Numerator" "Denominator")
+
+'("textth"  t)
+'("textthit"t)
+'("thfamily"   -1))
+
+   ;; \textnu isn't available with 'notextnu' package option
+   (unless (LaTeX-provided-package-options-member "xcharter" "notextnu")
+ (TeX-add-symbols '("textnu" t))
+ (when (and (featurep 'font-latex)
+(eq TeX-install-font-lock 'font-latex-setup))
+   (font-latex-add-keywords '(("textnu" "{"))
+'type-command)))
 
;; Fontification
(when (and (featurep 'font-latex)
   (eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '(("textsu""{")
-("textin""{")
-("textlf""{")
+ (font-latex-add-keywords '(("textlf""{")
 ("textosf"   "{")
 ("textosfI"  "{")
+("texttlf"   "{")
+("texttosf"  "{")
+("textsu""{")
+("textinf"   "{")
 ("textnumerator"   "{")
-("textnu"  "{")
+("textnum" "{")
 ("textdenominator" "{")
 ("textde"  "{")
-("textfrac""{{"))
+("textth"  "{")
+("textthit""{"))
   'type-command)
- (font-latex-add-keywords '(("sustyle"   "")
-("instyle"   "")
-("lfstyle"   "")
-("osfstyle"  ""))
-  'type-declaration)))
+ (font-latex-add-keywords '(("lfstyle"   "")
+("osfstyle"  "")
+("tlfstyle"  "")
+("tosfstyle" "")
+   

[elpa] externals/auctex 9b365b7419 18/48: Simplify implementation of style/textpos.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 9b365b7419b6f972af34ea3dff04151717c1e02d
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/textpos.el

* style/textpos.el ("textpos"): Use `TeX-arg-conditional' instead
of `TeX-arg-eval' in the style hook.
---
 style/textpos.el | 42 --
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/style/textpos.el b/style/textpos.el
index 0f02efb35f..50187f92d9 100644
--- a/style/textpos.el
+++ b/style/textpos.el
@@ -1,6 +1,6 @@
 ;;; textpos.el --- AUCTeX style for `textpos.sty' version v1.7j  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015, 2016, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati 
 ;; Maintainer: auctex-de...@gnu.org
@@ -87,27 +87,25 @@ them."
 '("TPMargin*" (TeX-arg-length "Margin around textblock"))
 
 ;; We ignore the `\textblock...color' (i.e. without `u') versions
-'("textblockcolour"
-  (TeX-arg-eval
-   (lambda ()
- (let ((color (cond ((member "xcolor" (TeX-style-list))
- (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-((member "color" (TeX-style-list))
- (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-(t
- (TeX-read-string "Color name: ")
-   (format "%s" color)
-
-'("textblockrulecolour"
-  (TeX-arg-eval
-   (lambda ()
- (let ((color (cond ((member "xcolor" (TeX-style-list))
- (completing-read "Color name: " 
(LaTeX-xcolor-definecolor-list)))
-((member "color" (TeX-style-list))
- (completing-read "Color name: " 
(LaTeX-color-definecolor-list)))
-(t
- (TeX-read-string "Color name: ")
-   (format "%s" color)
+`("textblockcolour"
+  (TeX-arg-conditional (TeX-member "\\`x?color\\'" (TeX-style-list) 
#'string-match)
+  ((TeX-arg-completing-read ,(lambda ()
+   (or (and (fboundp 
'LaTeX-xcolor-definecolor-list)
+
(LaTeX-xcolor-definecolor-list))
+   (and (fboundp 
'LaTeX-color-definecolor-list)
+
(LaTeX-color-definecolor-list
+"Color name"))
+((TeX-arg-string "Color name"
+
+`("textblockrulecolour"
+  (TeX-arg-conditional (TeX-member "\\`x?color\\'" (TeX-style-list) 
#'string-match)
+  ((TeX-arg-completing-read ,(lambda ()
+   (or (and (fboundp 
'LaTeX-xcolor-definecolor-list)
+
(LaTeX-xcolor-definecolor-list))
+   (and (fboundp 
'LaTeX-color-definecolor-list)
+
(LaTeX-color-definecolor-list
+"Color name"))
+((TeX-arg-string "Color name"
 
 '("TPshowboxestrue")
 '("TPshowboxesfalse")



[elpa] externals/auctex ce15e3fd87 24/48: Extend Japanese TeX support

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit ce15e3fd876aaeaf8bc9a9047ed11ba7e379d354
Author: Ikumi Keita 
Commit: Ikumi Keita 

Extend Japanese TeX support

* latex.el (LaTeX-auto-counter-regexp-list)
(LaTeX-auto-length-regexp-list):
Support Japanese counter/length names.
---
 latex.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/latex.el b/latex.el
index 5fc9f735a7..e096603b4e 100644
--- a/latex.el
+++ b/latex.el
@@ -1748,12 +1748,14 @@ This is necessary since index entries may contain 
commands and stuff.")
   "List of regular expressions matching LaTeX pagestyles only.")
 
 (defvar LaTeX-auto-counter-regexp-list
-  '(("newcounter *{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter)
-("@definecounter{\\([A-Za-z]+\\)}" 1 LaTeX-auto-counter))
+  (let ((token TeX-token-char))
+`((,(concat "newcounter *{\\(" token "+\\)}") 1 LaTeX-auto-counter)
+  (,(concat "@definecounter{\\(" token "+\\)}") 1 LaTeX-auto-counter)))
   "List of regular expressions matching LaTeX counters only.")
 
 (defvar LaTeX-auto-length-regexp-list
-  '(("newlength *{?\\([A-Za-z]+\\)}?" 1 LaTeX-auto-length))
+  (let ((token TeX-token-char))
+`((,(concat "newlength *{?\\(" token "+\\)}?") 1 
LaTeX-auto-length)))
   "List of regular expressions matching LaTeX lengths only.")
 
 (defvar LaTeX-auto-savebox-regexp-list



[elpa] externals/auctex cdf57fba58 11/48: * latex.el (TeX-arg-conditional): Declare 'indent'.

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit cdf57fba58e7b2857a5f489db0a51d572427e82f
Author: Arash Esbati 
Commit: Arash Esbati 

* latex.el (TeX-arg-conditional): Declare 'indent'.
---
 latex.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/latex.el b/latex.el
index 910c046cad..20a337c515 100644
--- a/latex.el
+++ b/latex.el
@@ -2109,6 +2109,7 @@ It will setup BibTeX to store keys in an auto file."
 If EXPR evaluate to true, parse THEN as an argument list, else
 parse ELSE as an argument list.  The compatibility argument
 OPTIONAL is ignored."
+  (declare (indent 2))
   (TeX-parse-arguments (if (eval expr t) then else)))
 
 (defun TeX-arg-eval (optional &rest args)



[elpa] externals/auctex d5ff42e0bd 34/48: Simplify implementation of style/enumitem.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit d5ff42e0bd048bd90784f72fc1644a4a53931c8d
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/enumitem.el

* style/enumitem.el (LaTeX-enumitem-env-with-opts): Delete
function.
(LaTeX-arg-enumitem-SetEnumitemKey): Query and insert only the
first mandatory argument.  The second on is queried in the hook.
(LaTeX-arg-enumitem-SetEnumitemValue): Query and insert only the
second mandatory argument.  The others are queried in the hook.
(LaTeX-arg-enumitem-setlist): Delete function, now performed in
the hook.
(LaTeX-enumitem-auto-cleanup):
("enumitem"): Use the function `LaTeX-env-item-args' instead of
`LaTeX-enumitem-env-with-opts'.
---
 style/enumitem.el | 195 --
 1 file changed, 85 insertions(+), 110 deletions(-)

diff --git a/style/enumitem.el b/style/enumitem.el
index 4e0e929a56..e08f7c89ef 100644
--- a/style/enumitem.el
+++ b/style/enumitem.el
@@ -234,7 +234,9 @@
   (dolist (env-type (LaTeX-enumitem-newlist-list))
 (let* ((env  (car env-type))
(type (cadr env-type)))
-  (LaTeX-add-environments (list env 'LaTeX-enumitem-env-with-opts))
+  (LaTeX-add-environments
+   `(,env LaTeX-env-item-args
+  [TeX-arg-key-val (LaTeX-enumitem-key-val-options)]))
   ;; Tell AUCTeX about parsed description like environments.
   (when (or (string-equal type "description")
 (string-equal type "description*"))
@@ -246,54 +248,21 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-enumitem-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-enumitem-env-with-opts (env)
-  "Insert ENV provided by `enumitem' package."
-  (LaTeX-insert-environment
-   env
-   (let ((opts (TeX-read-key-val t (LaTeX-enumitem-key-val-options
- (when (and opts (not (string-equal opts "")))
-   (format "[%s]" opts
-  (if (TeX-active-mark)
-  (progn
-(LaTeX-find-matching-begin)
-(end-of-line 1))
-(end-of-line 0))
-  (delete-char 1)
-  (when (looking-at (concat "^[ \t]+$\\|"
-"^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
-(delete-region (point) (line-end-position)))
-  (delete-horizontal-space)
-  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
-  ;; from swapping point and mark and the \item ending up right after
-  ;; \begin{...}.
-  (deactivate-mark)
-  (LaTeX-insert-item)
-  ;; The inserted \item may have outdented the first line to the
-  ;; right.  Fill it, if appropriate.
-  (when (and auto-fill-function
- (not (looking-at "$"))
- (not (assoc env LaTeX-indent-environment-list))
- (> (- (line-end-position) (line-beginning-position))
-(current-fill-column)))
-(LaTeX-fill-paragraph nil)))
-
 (defun LaTeX-arg-enumitem-SetLabelAlign (optional)
   "Ask and insert a new type (value) for the \"align\" key.
 Insert value in brackets if OPTIONAL is non-nil."
-  (let ((val (TeX-read-string "Alignment: ")))
-(TeX-argument-insert val optional)
-(LaTeX-add-enumitem-SetLabelAligns val)))
+  (let ((val (TeX-read-string
+  (TeX-argument-prompt optional nil "Alignment"
+(LaTeX-add-enumitem-SetLabelAligns val)
+(TeX-argument-insert val optional)))
 
 (defun LaTeX-arg-enumitem-SetEnumitemKey (optional)
-  "Ask and insert a new key and its replacement.
+  "Ask and insert a new enumitem key option.
 Insert key and value in brackets if OPTIONAL is non-nil."
-  (let ((key (TeX-read-string "New Key: "))
-(replace (TeX-read-key-val optional
-   (LaTeX-enumitem-key-val-options)
-   "Replacement")))
-(TeX-argument-insert key optional)
-(TeX-argument-insert replace optional)
-(LaTeX-add-enumitem-SetEnumitemKeys key)))
+  (let ((key (TeX-read-string
+  (TeX-argument-prompt optional nil "New Key"
+(LaTeX-add-enumitem-SetEnumitemKeys key)
+(TeX-argument-insert key optional)))
 
 ;; In `LaTeX-enumitem-SetEnumitemValue-regexp', we match (0 1 2).
 ;; When adding a new `key=val', we need something unique for `0'-match
@@ -303,52 +272,18 @@ Insert key and value in brackets if OPTIONAL is non-nil."
 ;; invocation of `C-c C-n'.
 (defun LaTeX-arg-enumitem-SetEnumitemValue (optional)
   "Ask and insert for a new value added to an existing key.
-Insert key and value in brackets if OPTIONAL is non-nil."
-  (let ((key (completing-read  "Key: " LaTeX-enumitem-key-val-options))
-(val (TeX-read-string "String value: ")))
-(TeX-argument-insert key optional)
-(TeX-argument-insert val optional)
+This is the second mandatory argument of \\SetEnumitemValue
+macro.  Insert the value in brackets if OPTIONAL is non-nil."
+  (let ((key (save-excursion
+   (and (re-search-backward "SetEnumitemValue{\\([^}]+\\)}"
+   

[elpa] externals/auctex 835e01ddb6 36/48: Extend the argument list of `TeX-arg-string'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 835e01ddb6d25984edc33e44df7ea102c64be8b3
Author: Arash Esbati 
Commit: Arash Esbati 

Extend the argument list of `TeX-arg-string'

* tex.el (TeX-arg-string): Extend the argument list which will be
passed to `TeX-read-string' and change the brackets for insertion.
---
 tex.el | 29 -
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/tex.el b/tex.el
index 5cb86af1f1..7fe8095aba 100644
--- a/tex.el
+++ b/tex.el
@@ -3451,18 +3451,29 @@ TeX macro.  What is done depend on the type of the 
element:
  (insert TeX-grcl)
  (backward-char
 
-(defun TeX-arg-string (optional &optional prompt initial-input)
+(defun TeX-arg-string (optional &optional prompt initial-input
+history default-value
+leftbrace rightbrace)
   "Prompt for a string.
 
 If OPTIONAL is not nil then the PROMPT will start with ``(Optional) ''.
-INITIAL-INPUT is a string to insert before reading input."
-  (TeX-argument-insert
-   (if (and (not optional) (TeX-active-mark))
-   (let ((TeX-argument (buffer-substring (point) (mark
- (delete-region (point) (mark))
- TeX-argument)
- (TeX-read-string (TeX-argument-prompt optional prompt "Text") 
initial-input))
-   optional))
+INITIAL-INPUT is a string to insert before reading input.
+
+HISTORY and DEFAULT-VALUE are ultimately passed to `read-string',
+which see.
+
+The brackets used are controlled by the string values of
+LEFTBRACE and RIGHTBRACE."
+  (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+(TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace)))
+(TeX-argument-insert
+ (if (and (not optional) (TeX-active-mark))
+ (let ((TeX-argument (buffer-substring (point) (mark
+   (delete-region (point) (mark))
+   TeX-argument)
+   (TeX-read-string (TeX-argument-prompt optional prompt "Text")
+initial-input history default-value))
+ optional)))
 
 (defvar TeX-last-optional-rejected nil
   "Dynamically bound by `TeX-parse-arguments'.")



[elpa] externals/auctex 21e624026a 28/48: Improve support for TikZ

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 21e624026a250f39a508ec06274fbfa72b99b6a1
Author: Ikumi Keita 
Commit: Ikumi Keita 

Improve support for TikZ

* style/tikz.el ("tikz"): Add "tikz", "tikzset", "usetikzlibrary" and
"foreach" macros.
Run style hooks for graphicx, keyval and xcolor as well.
Include preliminary support for ConTeXt and plain TeX.
Allow optional argument for "tikzpicture" environment.
Add "scope" environment.
(AUCTeX-TikZ): New customize group.
(TeX-TikZ-point-name-regexp): Use it as group.
(TeX-TikZ-find-named-points): Add comment.
(): Add `declare-function'.
---
 style/tikz.el | 61 ---
 1 file changed, 58 insertions(+), 3 deletions(-)

diff --git a/style/tikz.el b/style/tikz.el
index 565e6b0aa4..eb7d92810e 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -33,11 +33,19 @@
 (require 'tex)
 (require 'latex)
 
+;; Silence compiler
+(declare-function ConTeXt-add-environments "context"
+  (&rest environments))
+
+(defgroup AUCTeX-TikZ nil
+  "AUCTeX TikZ support"
+  :group 'AUCTeX)
+
 (defcustom TeX-TikZ-point-name-regexp
   "(\\([A-Za-z0-9]+\\))"
   "A regexp that matches TikZ names."
   :type 'regexp
-  :group 'auctex-tikz)
+  :group 'AUCTeX-TikZ)
 
 (defconst TeX-TikZ-point-function-map
   '(("Rect Point" TeX-TikZ-arg-rect-point)
@@ -199,6 +207,10 @@ is finished."
 Begin by finding the span of the current TikZ enviroment and then
 searching within that span to find all named-points and return
 them as a list of strings, dropping the \\='()\\='."
+  ;; FIXME: This function depends on `LaTeX-find-matching-begin' and
+  ;; `LaTeX-find-matching-end', so it doesn't work for ConTeXt and
+  ;; plain TeX.  In addition, it isn't compatible with the TikZ code
+  ;; following \tikz.
   (let* ((env-end (save-excursion
 (LaTeX-find-matching-end)
  (point)))
@@ -278,8 +290,51 @@ return \"\"."
(TeX-add-symbols
 '("draw" (TeX-TikZ-draw-arg))
 '("coordinate" (TeX-TikZ-coordinate-arg))
-'("node" (TeX-TikZ-node-arg)))
+'("node" (TeX-TikZ-node-arg))
+'("tikz" ["TikZ option"])
+'("tikzset" "TikZ option")
+;; FIXME:
+;; 1. usetikzlibrary isn't much useful without completion support
+;;for available libraries.
+;; 2. ConTeXt users may prefer [...] over {...} as the argument.
+'("usetikzlibrary" t)
+;; XXX: Maybe we should create pgffor.el and factor out this entry
+;; into it.
+'("foreach" (TeX-arg-literal " ") (TeX-arg-free "Variable(s)")
+  (TeX-arg-literal " ") ["Foreach option"]
+  (TeX-arg-literal " in ") "Value list (Use \"...\" for range)"
+  (TeX-arg-literal " ") t
+
+;; LaTeX/docTeX specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
(LaTeX-add-environments
-'("tikzpicture"
+'("tikzpicture" ["TikZ option"])
+'("scope" ["TikZ option"]))
+   ;; tikz.sty loads pgfcore.sty, which loads packages graphicx,
+   ;; keyval and xcolor, too.
+   (TeX-run-style-hooks "pgf" "graphicx" "keyval" "xcolor"))
+ :latex)
+
+;; ConTeXt specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
+   (ConTeXt-add-environments
+'("tikzpicture" ["TikZ option"])
+'("scope" ["TikZ option"])))
+ :context)
+
+;; plain TeX specific stuff
+(TeX-add-style-hook
+ "tikz"
+ (lambda ()
+   (TeX-add-symbols
+'("tikzpicture" ["TikZ option"])
+"endtikzpicture"
+'("scope" ["TikZ option"])
+"endscope"))
+ :plain-tex)
 
 ;;; tikz.el ends here



[elpa] externals/auctex 748449959c 21/48: New option `TeX-refuse-unmatched-dollar'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 748449959c74220b40aff5bd69676bc0722ec8a9
Author: Ikumi Keita 
Commit: Ikumi Keita 

New option `TeX-refuse-unmatched-dollar'

* tex.el (TeX-refuse-unmatched-dollar): New option.
(TeX-insert-dollar): When the new option is enabled, retain the former
behavior.
Arrange the doc string.
* doc/auctex.texi (Quotes):
* doc/changes.texi:
Mention the change in the behavior of `TeX-insert-dollar'.
---
 doc/auctex.texi  | 14 ++
 doc/changes.texi |  9 +
 tex.el   | 26 +++---
 3 files changed, 46 insertions(+), 3 deletions(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index 5f8c725714..682e4ed86c 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -468,6 +468,20 @@ following to your init file
   (cons "\\(" "\\)"
 @end lisp
 
+Math mode which didn't start with dollar(s) shouldn't be closed with dollar.
+@defopt TeX-refuse-unmatched-dollar
+This option determines the behavior when the user types @kbd{$} at a
+position where @AUCTeX{} thinks that it is in math mode which didn't start
+with dollar(s).
+
+When this option is @code{nil}, @AUCTeX{} behaves in the same way as
+non-math mode, assuming that the user knows it isn't in math mode
+actually.  This is the default.
+
+When this option is non-@code{nil}, @AUCTeX{} refuses to insert @samp{$}
+to prevent unmatched dollar.
+@end defopt
+
 Note that Texinfo mode does nothing special for @kbd{$}.  It inserts
 dollar sign(s) just in the same way as the other normal keys do.
 
diff --git a/doc/changes.texi b/doc/changes.texi
index 67e9e458d4..d6973153c1 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -11,6 +11,15 @@
 @heading News since last release
 
 @itemize @bullet
+@item
+@AUCTeX{} no longer refuses to insert dollar sign when you type @kbd{$} at
+point where @AUCTeX{} thinks the current math mode didn't start with
+dollar(s).  @AUCTeX{} assumes the user knows that it isn't in math mode
+actually.
+
+You can keep the former behavior by enabling the new customize option
+@code{TeX-refuse-unmatched-dollar}.
+
 @item
 @AUCTeX{} supports completion-at-point of macro and environment arguments
 in @LaTeX{} buffers.  The responsible function recognizes the argument
diff --git a/tex.el b/tex.el
index 9a57d45895..976fafbaf9 100644
--- a/tex.el
+++ b/tex.el
@@ -5939,9 +5939,24 @@ point.  You can choose between \"$...$\" and 
\"\\(...\\)\"."
(string :tag "Insert before point")
(string :tag "Insert after point"
 
+(defcustom TeX-refuse-unmatched-dollar nil
+  "When non-nil, don't insert unmatched dollar sign.
+That is, `TeX-insert-dollar' refuses to insert \"$\" when
+`texmathp' tells that the current position is in math mode which
+didn't start with dollar(s).
+
+When nil, `TeX-insert-dollar' assumes the user knows that the
+current position is not in math mode actually and behaves in the
+same way as non-math mode."
+  :group 'TeX-macro
+  :type 'boolean)
+
 (defun TeX-insert-dollar (&optional arg)
   "Insert dollar sign.
 
+If current math mode was not entered with a dollar, refuse to
+insert one when `TeX-refuse-unmatched-dollar' is non-nil.
+
 Show matching dollar sign if this dollar sign ends the TeX math
 mode and `blink-matching-paren' is non-nil.
 
@@ -5994,10 +6009,15 @@ With optional ARG, insert that many dollar signs."
 (message "Matches %s"
  (buffer-substring
   (point) (progn (end-of-line) (point
+
+ ;; Math mode was not entered with dollar according to `texmathp'.
+ (TeX-refuse-unmatched-dollar
+  ;; We trust `texmathp' and refuse to finish it with one.
+  (message "Math mode started with `%s' cannot be closed with dollar"
+   (car texmathp-why)))
  (t
-  ;; Math mode was not entered with dollar - we assume that
-  ;; `texmathp' was wrong and behave as if not in math
-  ;; mode. (bug#57626)
+  ;; We assume that `texmathp' was wrong and behave as if not in
+  ;; math mode. (bug#57626)
   (TeX--insert-dollar-1
(t
 ;; Just somewhere in the text.



[elpa] externals/auctex d3970b77da 09/48: ; * latex.el (LaTeX-common-initialization): Remove dupe textcircled.

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit d3970b77dacea16bc235d3b9645faef6112ff826
Author: Arash Esbati 
Commit: Arash Esbati 

; * latex.el (LaTeX-common-initialization): Remove dupe textcircled.
---
 latex.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/latex.el b/latex.el
index 0c83a3a30b..910c046cad 100644
--- a/latex.el
+++ b/latex.el
@@ -8347,7 +8347,6 @@ function would return non-nil and `(match-string 1)' 
would return
  "texteuro" ; Type: Symbol -- Slot: 191
  "texttimes"; Type: Symbol -- Slot: 214
  "textdiv"  ; Type: Symbol -- Slot: 246
- '("textcircled"  1); Type: Command -- Slot: N/A
  '("capitalcedilla"   1); Type: Command -- Slot: N/A
  '("capitalogonek"1); Type: Command -- Slot: N/A
 



[elpa] externals/auctex 47f9ead1c6 44/48: Respect `TeX-exit-mark' when inserting enviroments

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 47f9ead1c614ff9a9afe474f45b774e589a6fd91
Author: Arash Esbati 
Commit: Arash Esbati 

Respect `TeX-exit-mark' when inserting enviroments

* latex.el (LaTeX--env-parse-args): Set `TeX-exit-mark' to current
point if not set yet.  Move point to the position of
`TeX-exit-mark' after parsing the arguments, so hooks can set the
value acc. to their needs.

* tex.el (TeX-exit-mark): Adjust docstring.
---
 latex.el | 14 +-
 tex.el   |  2 +-
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/latex.el b/latex.el
index eea54db4eb..744257e3c9 100644
--- a/latex.el
+++ b/latex.el
@@ -1062,13 +1062,17 @@ If nil, act like the empty string is given, but do not 
prompt."
   :type 'string)
 
 (defun LaTeX--env-parse-args (args)
-  "Helper function to insert arguments defined by ARGS."
-  (save-excursion
+  "Helper function to insert arguments defined by ARGS.
+This function checks if `TeX-exit-mark' is set, otherwise it's
+set to the point where this function starts.  Point will be at
+`TeX-exit-mark' when this function exits."
+  (let ((TeX-exit-mark (or TeX-exit-mark
+   (point-marker
 (LaTeX-find-matching-begin)
 (end-of-line)
-(let ((TeX-exit-mark (or TeX-exit-mark
- (make-marker
-  (TeX-parse-arguments args
+(TeX-parse-arguments args)
+(goto-char TeX-exit-mark)
+(set-marker TeX-exit-mark nil)))
 
 (defun LaTeX--env-item (environment)
   "Helper function running inside `LaTeX-env-item'.
diff --git a/tex.el b/tex.el
index c5fd9678e6..d74d10d0df 100644
--- a/tex.el
+++ b/tex.el
@@ -3367,7 +3367,7 @@ Space will complete and exit."
(call-interactively #'TeX-insert-macro)
 
 (defvar TeX-exit-mark nil
-  "Dynamically bound by `TeX-parse-macro' and `LaTeX-env-args'.")
+  "Dynamically bound by `TeX-parse-macro' and `LaTeX--env-parse-args'.")
 
 (defun TeX-parse-macro (symbol args)
   "How to parse TeX macros which takes one or more arguments.



[elpa] externals/auctex 8e3137f641 15/48: Simplify implementation of style/titlesec.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 8e3137f641654655c76f869ebf2be5dd5480d462
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/titlesec.el

* style/titlesec.el (LaTeX-titlesec-section-command-list): Delete
unnecessary `symbol-value'.
(LaTeX-titlesec-titlespec-key-val-options): New function replacing
`LaTeX-arg-titlesec-titlespec'.  The new function returns only
key=vals and doesn't insert them into buffer.
("titlesec"): Use the new function in the style hook.
---
 style/titlesec.el | 59 +--
 1 file changed, 27 insertions(+), 32 deletions(-)

diff --git a/style/titlesec.el b/style/titlesec.el
index 3c232b0f18..bc1faf13d8 100644
--- a/style/titlesec.el
+++ b/style/titlesec.el
@@ -75,34 +75,29 @@ Removal is based on the return value of function
 `TeX-esc'."
   (mapcar (lambda (elt) (concat TeX-esc elt))
   (if (< (LaTeX-largest-level) 2)
-  (symbol-value 'LaTeX-titlesec-section-command-list)
+  LaTeX-titlesec-section-command-list
 (remove "chapter" LaTeX-titlesec-section-command-list
 
-(defun LaTeX-arg-titlesec-titlespec (optional)
-  "Insert the first argument of \"\\titleformat\" and \"\\titlespacing\".
-Depending on returned value of function `LaTeX-largest-level',
-append a \"name\" key with corresponding values to
-`LaTeX-titlesec-key-val-options'.  The values are retrieved from
-`LaTeX-titlesec-section-command-list'.  The values of this list
-are also added stand-alone as keys.  If OPTIONAL is non-nil,
-insert the argument in brackets."
-  (let ((keyvals
- (TeX-read-key-val
-  optional
-  (append
-   `(("name"
-  ,(mapcar (lambda (elt) (concat TeX-esc elt))
-   (if (< (LaTeX-largest-level) 2)
-   (symbol-value 'LaTeX-titlesec-section-command-list)
- (remove "chapter" 
LaTeX-titlesec-section-command-list)
-   (mapcar #'list
-   (mapcar (lambda (elt) (concat TeX-esc elt))
-   (if (< (LaTeX-largest-level) 2)
-   (symbol-value 
'LaTeX-titlesec-section-command-list)
- (remove "chapter" 
LaTeX-titlesec-section-command-list
-   LaTeX-titlesec-key-val-options)
-  "Sectioning command")))
-(TeX-argument-insert keyvals optional)))
+(defun LaTeX-titlesec-titlespec-key-val-options ()
+  "Return key=val's for the 1st arg of \"\\titleformat\" and 
\"\\titlespacing\".
+Depending on the returned value of the function
+`LaTeX-largest-level', append a \"name\" key with corresponding
+values to `LaTeX-titlesec-key-val-options'.  The values are
+retrieved from `LaTeX-titlesec-section-command-list'.  The values
+of this list are also added stand-alone as keys."
+  (append
+   `(("name"
+  ,(mapcar (lambda (elt) (concat TeX-esc elt))
+   (if (< (LaTeX-largest-level) 2)
+   LaTeX-titlesec-section-command-list
+ (remove "chapter" LaTeX-titlesec-section-command-list)
+   (mapcar #'list
+   (mapcar (lambda (elt) (concat TeX-esc elt))
+   (if (< (LaTeX-largest-level) 2)
+   LaTeX-titlesec-section-command-list
+ (remove "chapter" LaTeX-titlesec-section-command-list
+   LaTeX-titlesec-key-val-options))
+
 
 (TeX-add-style-hook
  "titlesec"
@@ -117,30 +112,30 @@ insert the argument in brackets."
 '("titlelabel" t)
 
 ;; \titleformat*{}{}
-'("titleformat*" (LaTeX-arg-titlesec-titlespec) t)
+'("titleformat*" (TeX-arg-key-val 
(LaTeX-titlesec-titlespec-key-val-options)) t)
 
 ;; 3. Advanced Interface
 ;; 
\titleformat{}[]{}{}{}{}[]
 '("titleformat"
-  (LaTeX-arg-titlesec-titlespec)
+  (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
   [TeX-arg-completing-read LaTeX-titlesec-section-shape-list "Shape"]
   (TeX-arg-conditional (y-or-n-p "With optional after-code? ")
-   (4 [nil])
-   (4)))
+  (4 [nil])
+(4)))
 
 '("chaptertitlename" 0)
 
 ;; 3.2. Spacing
 ;; \titlespacing{}{}{}{}[]
 '("titlespacing"
-  (LaTeX-arg-titlesec-titlespec)
+  (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
   (TeX-arg-length "Left margin")
   (TeX-arg-length "Before vertical space")
   (TeX-arg-length "Space between title and text")
   [TeX-arg-length "Right margin"])
 
 '("titlespacing*"
-  (LaTeX-arg-titlesec-titlespec)
+  (TeX-arg-key-val (LaTeX-titlesec-titlespec-key-val-options))
   (TeX-arg-length "Left margin")
   (TeX-arg-length "Before vertical space")
   (TeX-arg-length "Space between title and text")



[elpa] externals/auctex 0c482642cc 32/48: Simplify implementation of style/currvita.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 0c482642ccb46af364fa14765abc3049635c21b8
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/currvita.el

* style/currvita.el ("currvita"): Use `LaTeX-env-item-args' in the
hook and subsequently delete `LaTeX-currvita-env-with-label'.
Add fontification support for \cvplace macro.
---
 style/currvita.el | 51 +++
 1 file changed, 15 insertions(+), 36 deletions(-)

diff --git a/style/currvita.el b/style/currvita.el
index f1f27a369b..2f290344dd 100644
--- a/style/currvita.el
+++ b/style/currvita.el
@@ -1,6 +1,6 @@
 ;;; currvita.el --- AUCTeX style for `currvita.sty' (v0.9i)  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2015--2021 Free Software Foundation, Inc.
+;; Copyright (C) 2015--2022 Free Software Foundation, Inc.
 
 ;; Author: Arash Esbati 
 ;; Maintainer: auctex-de...@gnu.org
@@ -31,49 +31,22 @@
 
 ;;; Code:
 
+;; Silence the compiler:
+(declare-function font-latex-add-keywords
+  "font-latex"
+  (keywords class))
+
 (require 'tex)
 (require 'latex)
 
-;; This is a modified version of `LaTeX-env-item'.
-(defun LaTeX-currvita-env-with-label (env)
-  "Insert ENV, a mandatory label and the first item."
-  (LaTeX-insert-environment
-   env
-   (let ((heading (TeX-read-string "Heading of list: ")))
- (format "{%s}" heading)))
-  (if (TeX-active-mark)
-  (progn
-(LaTeX-find-matching-begin)
-(end-of-line 1))
-(end-of-line 0))
-  (delete-char 1)
-  (when (looking-at (concat "^[ \t]+$\\|"
-"^[ \t]*" TeX-comment-start-regexp "+[ \t]*$"))
-(delete-region (point) (line-end-position)))
-  (delete-horizontal-space)
-  ;; Deactivate the mark here in order to prevent `TeX-parse-macro'
-  ;; from swapping point and mark and the \item ending up right after
-  ;; \begin{...}.
-  (deactivate-mark)
-  (LaTeX-insert-item)
-  ;; The inserted \item may have outdented the first line to the
-  ;; right.  Fill it, if appropriate.
-  (when (and auto-fill-function
- (not (looking-at "$"))
- (not (assoc env LaTeX-indent-environment-list))
- (> (- (line-end-position) (line-beginning-position))
-(current-fill-column)))
-(LaTeX-fill-paragraph nil)))
-
-
 (TeX-add-style-hook
  "currvita"
  (lambda ()
 
;; env's defined by currvita.sty
(LaTeX-add-environments
-'("cv"  "Heading of CV")
-'("cvlist"  LaTeX-currvita-env-with-label))
+'("cv" "Heading of CV")
+'("cvlist" LaTeX-env-item-args "Heading of list"))
 
;; Add "cvlist" to the list of environments which have an optional
;; argument for each item
@@ -88,7 +61,13 @@
 "cvbibname")
 
;; Add new lengths defined by currvita.sty
-   (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep"))
+   (LaTeX-add-lengths "cvlabelwidth" "cvlabelskip" "cvlabelsep")
+
+   ;; Fontification
+   (when (and (featurep 'font-latex)
+  (eq TeX-install-font-lock 'font-latex-setup))
+ (font-latex-add-keywords '(("cvplace" "{"))
+  'function)))
  TeX-dialect)
 
 (defvar LaTeX-currvita-package-options



[elpa] externals/auctex e53bb19a90 37/48: ; Recognize large arguments with many lines

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit e53bb19a90e99f14020a10f7988bdd861a0ca05a
Author: Arash Esbati 
Commit: Arash Esbati 

; Recognize large arguments with many lines

* latex.el (LaTeX-completion-find-argument-boundries): Enlarge the
portion of buffer searched for argument boundries.
---
 latex.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/latex.el b/latex.el
index d139192d4d..3e76243cc7 100644
--- a/latex.el
+++ b/latex.el
@@ -7712,8 +7712,8 @@ ARGS are characters passed to the function
 defined in the variable `LaTeX-completion-macro-delimiters' are
 taken."
   (save-restriction
-(narrow-to-region (line-beginning-position -20)
-  (line-beginning-position  20))
+(narrow-to-region (line-beginning-position -40)
+  (line-beginning-position  40))
 (let ((args (or args (LaTeX-completion-macro-delimiters
   (condition-case nil
   (with-syntax-table (apply #'TeX-search-syntax-table args)



[elpa] externals/auctex 8775c8355f 13/48: Replace `TeX-arg-url-urlstyle' in style/url.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 8775c8355f49cdb0051f063bf723261ecf2d8c78
Author: Arash Esbati 
Commit: Arash Esbati 

Replace `TeX-arg-url-urlstyle' in style/url.el

* style/url.el (TeX-arg-url-urlstyle): Delete function.
("url"): Move the functionality into the style hook.
---
 style/url.el | 19 +--
 1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/style/url.el b/style/url.el
index af524bf6f6..e1bac616c7 100644
--- a/style/url.el
+++ b/style/url.el
@@ -1,6 +1,6 @@
 ;;; url.el --- AUCTeX style for `url.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2004-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2004-2022  Free Software Foundation, Inc.
 
 ;; Author: Ralf Angeli 
 ;; Maintainer: auctex-de...@gnu.org
@@ -115,16 +115,6 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-url-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun TeX-arg-url-urlstyle (optional &optional prompt)
-  "Prompt for style used in \\urlstyle with completion.
-If OPTIONAL is non-nil, indicate it in the minibuffer during the
-query and insert the result in brackets.  PROMPT replaces the
-standard one."
-  (TeX-argument-insert
-   (completing-read (TeX-argument-prompt optional prompt "Style")
-'("rm" "same" "sf" "tt"))
-   optional))
-
 (defun TeX-arg-url-DeclareUrlCommand (optional &optional prompt)
   "Prompt for arguments of \\DeclareUrlCommand with completion.
 If OPTIONAL is non-nil, indicate it in the minibuffer during the
@@ -181,12 +171,13 @@ standard one."
 ;; "hyperref" redefines \url so that the argument is only in
 ;; braces.  We check here if hyperref is loaded:
 '("url" (TeX-arg-conditional (member "hyperref" (TeX-style-list))
- ("Url")
- ((TeX-arg-verb-delim-or-brace "Url"
+("Url")
+  ((TeX-arg-verb-delim-or-brace "Url"
 
 '("urldef" TeX-arg-url-urldef)
 
-'("urlstyle" TeX-arg-url-urlstyle))
+'("urlstyle" (TeX-arg-completing-read ("rm" "same" "sf" "tt")
+  "Style")))
 
;; For '\path', use the facilities provided by this style.  Also
;; don't add "path" for fontification below since



[elpa] externals/auctex 35ec84ba6f 07/48: Add capf for LaTeX marco/environment arguments

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 35ec84ba6faf078b114d5df62513d81900cf3b6c
Author: Arash Esbati 
Commit: Arash Esbati 

Add capf for LaTeX marco/environment arguments

* doc/changes.texi: Announce the new feature.

* doc/auctex.texi (Completion): Document the main new function.

* latex.el: Add functions for completion-at-point inside
marco/environment arguments in LaTeX buffers.
(LaTeX-common-initialization): Append the entry point
`LaTeX--arguments-completion-at-point' to
`completion-at-point-functions'.
---
 doc/auctex.texi  |  13 +-
 doc/changes.texi |   6 +
 latex.el | 470 +++
 3 files changed, 488 insertions(+), 1 deletion(-)

diff --git a/doc/auctex.texi b/doc/auctex.texi
index d323e6f272..5f8c725714 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1326,7 +1326,7 @@ define and register custom @code{completion-at-point} 
functions and when the
 user invokes @code{completion-at-point} (usually bound to
 @kbd{M-@key{TAB}}), all such registered functions are consulted for
 checking for possible completions.  Modern completion UIs like
-@i{company-mode} support this completion-at-point facility.
+@i{company-mode} or @i{corfu} support this completion-at-point facility.
 
 @defun TeX--completion-at-point
 @AUCTeX{}'s completion-at-point function which is automatically added to
@@ -1339,6 +1339,17 @@ It offers the same completion candidates as would
 like @i{company-mode}.
 @end defun
 
+@defun LaTeX--arguments-completion-at-point
+@AUCTeX{}'s completion-at-point function inside arguments which is
+automatically added to @code{completion-at-point-functions} in @LaTeX{}
+buffers.
+
+It offers the completion candidates stored in the variables
+@code{TeX-symbol-list} and @code{LaTeX-environment-list} for single
+candidate, multiple candidates separated by commas, or key-value
+candidates separated by commas and/or equal signs.
+@end defun
+
 A more direct way to insert a macro is with @code{TeX-insert-macro},
 bound to @kbd{C-c C-m} which is equivalent to @kbd{C-c @key{RET}}.  It
 has the advantage over completion that it knows about the argument of
diff --git a/doc/changes.texi b/doc/changes.texi
index debfec688b..67e9e458d4 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -11,6 +11,12 @@
 @heading News since last release
 
 @itemize @bullet
+@item
+@AUCTeX{} supports completion-at-point of macro and environment arguments
+in @LaTeX{} buffers.  The responsible function recognizes the argument
+position and extracts the corresponding candidates from the variables
+@code{TeX-symbol-list} and @code{LaTeX-environment-list}.
+
 @item
 @AUCTeX{} underlines the argument of macros which produce underlined text
 in the final product with @code{font-latex-underline-face}.  The
diff --git a/latex.el b/latex.el
index 901ddfd7d0..0c83a3a30b 100644
--- a/latex.el
+++ b/latex.el
@@ -7184,6 +7184,471 @@ page without enough text on it. ")
 Used as buffer local value of `TeX-error-description-list-local'.
 See its doc string for detail.")
 
+
+;;; LaTeX Capf for macro/environment arguments:
+
+;; tex.el defines the function `TeX--completion-at-point' which
+;; provides completion at point for (La)TeX macros.  Here we define
+;; `LaTeX--arguments-completion-at-point' which is the entry point for
+;; completion at point when inside a macro or environment argument.
+;; The general idea is:
+;;
+;; - Find out in which argument of macro/env the point is; this is
+;; done by the function `LaTeX-what-macro'.
+;;
+;; - Match the result against the information available in
+;; `TeX-symbol-list' or `LaTeX-environment-list' by the function
+;; `LaTeX-completion-parse-args'.
+;;
+;; - If there is a match, pass it to `LaTeX-completion-parse-arg'
+;; (note the missing `s') which parses the match and runs the
+;; corresponding function to calculate the candidates.  These are the
+;; functions `LaTeX-completion-candidates-key-val',
+;; `LaTeX-completion-candidates-completing-read-multiple', and
+;; `LaTeX-completion-candidates-completing-read'.
+;;
+;; Two mapping variables `LaTeX-completion-function-map-alist-keyval'
+;; and `LaTeX-completion-function-map-alist-cr' are provided in order
+;; to allow a redirection of the entry in `TeX-symbol-list' or
+;; `LaTeX-environment-list' to another function.
+
+(defvar LaTeX-completion-macro-delimiters
+  '((?\[ . ?\])
+(?\{ . ?\})
+(?\( . ?\))
+(?\< . ?\>))
+  "List of characters delimiting mandatory and optional arguments.
+Each element in the list is cons with opening char as car and the
+closing char as cdr.")
+
+(defun LaTeX-completion-macro-delimiters (&optional which)
+  "Return elements of the variable `LaTeX-completion-macro-delimiters'.
+If the optional WHICH is the symbol `open', return the car's of
+each element in the variable `LaTeX-completion-macro-delimiters'.
+If it is the symbol `close', return the cdr's.  If omitted or
+nil, return all elements."
+  (cond ((

[elpa] externals/auctex 52738d11b2 39/48: Remove entry in `LaTeX-completion-function-map-alist-keyval'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 52738d11b2e2987862cffe4ff1edb7837d817e20
Author: Arash Esbati 
Commit: Arash Esbati 

Remove entry in `LaTeX-completion-function-map-alist-keyval'

* latex.el (LaTeX-completion-function-map-alist-keyval): Remove
the entry for the deleted function `LaTeX-enumitem-env-with-opts'.
---
 latex.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/latex.el b/latex.el
index 3e76243cc7..e561a9289e 100644
--- a/latex.el
+++ b/latex.el
@@ -7624,8 +7624,7 @@ or `LaTeX-environment-list' and returns it."
   (t nil))
 result))
 
-(defvar LaTeX-completion-function-map-alist-keyval
-  '((LaTeX-enumitem-env-with-opts . LaTeX-enumitem-key-val-options))
+(defvar LaTeX-completion-function-map-alist-keyval '()
   "Alist mapping style funcs to completion-candidates counterparts.
 Each element is a cons with the name of the function used in an
 AUCTeX style file which queries and inserts something in the



[elpa] externals/auctex 0ee39626e4 01/48: Use `TeX-arg-completing-read'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 0ee39626e4c8eeefeb5484137c651c2ac0d699e4
Author: Arash Esbati 
Commit: Arash Esbati 

Use `TeX-arg-completing-read'

* latex.el (LaTeX-common-initialization):
* style/MyriadPro.el ("MyriadPro"):
* style/amsthm.el ("amsthm"):
* style/arabxetex.el ("arabxetex"):
* style/babel.el ("babel"):
* style/biblatex.el ("biblatex"):
* style/bigdelim.el ("bigdelim"):
* style/caption.el ("caption"):
* style/changes.el ("changes"):
* style/csquotes.el ("csquotes"):
* style/doc.el ("doc"):
* style/enumitem.el ("enumitem"):
* style/etoolbox.el ("etoolbox"):
* style/exam.el ("exam"):
* style/fancyvrb.el ("fancyvrb"):
* style/floatrow.el ("floatrow"):
* style/fontaxes.el ("fontaxes"):
* style/fontspec.el ("fontspec"):
* style/footmisc.el ("footmisc"):
* style/graphicx.el ("graphicx"):
* style/harvard.el ("harvard"):
* style/hologo.el ("hologo"):
* style/l3doc.el ("l3doc"):
* style/ltugboat.el ("ltugboat"):
* style/ltxdoc.el ("ltxdoc"):
* style/mathtools.el ("mathtools"):
* style/mdframed.el ("mdframed"):
* style/menukeys.el ("menukeys"):
* style/metalogo.el ("metalogo"):
* style/multirow.el ("multirow"):
* style/natbib.el ("natbib"):
* style/newfloat.el ("newfloat"):
* style/ntheorem.el ("ntheorem"):
* style/paracol.el ("paracol"):
* style/polyglossia.el ("polyglossia"):
* style/pythontex.el ("pythontex"):
* style/splitidx.el ("splitidx"):
* style/subcaption.el ("subcaption"):
* style/tcolorbox.el ("tcolorbox"):
* style/tex-live.el ("tex-live"):
* style/theorem.el ("theorem"):
* style/titleps.el ("titleps"):
* style/titlesec.el ("titlesec"):
* style/titletoc.el ("titletoc"):
* style/xcolor.el ("xcolor"):
* style/xr-hyper.el ("xr-hyper"): Use `TeX-arg-completing-read'
instead of `TeX-arg-eval' and `completing-read' combination.
---
 latex.el |  30 +--
 style/MyriadPro.el   |   8 +--
 style/amsthm.el  |   4 +-
 style/arabxetex.el   |  16 +++---
 style/babel.el   |  16 ++
 style/biblatex.el|  12 ++---
 style/bigdelim.el|  33 ++--
 style/caption.el |  28 ---
 style/changes.el |  10 ++--
 style/csquotes.el|  24 -
 style/doc.el |  12 ++---
 style/enumitem.el|  15 +++---
 style/etoolbox.el|  13 ++---
 style/exam.el|  64 ++--
 style/fancyvrb.el|  44 ++--
 style/floatrow.el|  36 +
 style/fontaxes.el|  14 ++
 style/fontspec.el|  17 +++
 style/footmisc.el|  43 +++-
 style/graphicx.el|  52 +--
 style/harvard.el |  17 +++
 style/hologo.el  |  12 ++---
 style/ifthen.el  |   4 +-
 style/l3doc.el   |  12 ++---
 style/ltugboat.el|  18 ++-
 style/ltxdoc.el  |   4 +-
 style/mathtools.el   |  16 ++
 style/mdframed.el|  31 
 style/menukeys.el| 128 ++-
 style/metalogo.el|  10 ++--
 style/multirow.el|  20 
 style/natbib.el  |  10 ++--
 style/newfloat.el|  12 ++---
 style/ntheorem.el|  45 -
 style/paracol.el |  24 -
 style/polyglossia.el |   7 +--
 style/pythontex.el   | 139 ---
 style/splitidx.el|  30 +++
 style/subcaption.el  |  50 +-
 style/tcolorbox.el   |  56 +
 style/tex-live.el|  45 -
 style/theorem.el |   6 +--
 style/titleps.el |  20 +++-
 style/titlesec.el|  32 
 style/titletoc.el|  24 -
 style/xcolor.el  |  76 
 style/xr-hyper.el|   6 +--
 47 files changed, 512 insertions(+), 833 deletions(-)

diff --git a/latex.el b/latex.el
index ae8dd89f30..901ddfd7d0 100644
--- a/latex.el
+++ b/latex.el
@@ -7664,10 +7664,10 @@ function would return non-nil and `(match-string 1)' 
would return
'("includeonly" t)
'("input" TeX-arg-input-file)
'("addcontentsline"
- (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot")))
- (TeX-arg-eval completing-read "Numbering style: " LaTeX-section-list) t)
+ (TeX-arg-completing-read ("toc" "lof" "lot") "File")
+ (TeX-arg-completing-read LaTeX-section-list "Numbering style") t)
'("addtocontents"
- (TeX-arg-eval completing-read "File: " '(("toc") ("lof") ("lot"))) t)
+ (TeX-arg-completing-read ("toc" "lof" "lot") "File") t)
'("typeout" t)
'("typein" [ TeX-arg-define-macro ] t)
'("verb" TeX-arg-verb)
@@ -7906,28 +7906,28 @@ function would return non-nil and `(match-string 1)' 
would return
 
  ;; Added in LaTeX 2021-11-15
  '("counterwithin"
-   [TeX-arg-eval completing-read
- (TeX-argument-prompt t nil "Format")
- '("\\arabic" "\\roman" "\\

[elpa] externals/auctex c0c9556338 30/48: Don't insert empty node name

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit c0c955633839777848a94400a45ef97667e7a992
Author: Ikumi Keita 
Commit: Ikumi Keita 

Don't insert empty node name

* style/tikz.el (TeX-TikZ-node-arg): Treat node name as optional to
avoid the insertion of empty node name.
(TeX-TikZ-arg-options, TeX-TikZ-arg-name,TeX-TikZ-arg-label):
Fix doc strings.
---
 style/tikz.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/style/tikz.el b/style/tikz.el
index eb7d92810e..a0edfd4650 100644
--- a/style/tikz.el
+++ b/style/tikz.el
@@ -112,7 +112,7 @@ Ask the user for r and theta values, and return the string
 
 (defun TeX-TikZ-arg-options (optional)
   "Prompt the user for options to a TikZ macro.
-If OPTIONAL is non-nil, always return `LaTeX-optop' and
+If OPTIONAL is nil, always return `LaTeX-optop' and
 `LaTeX-optcl', even if the user doesn't provide any input."
   (let ((options (TeX-read-string (TeX-argument-prompt optional nil "Options" 

 (if optional
@@ -121,7 +121,7 @@ If OPTIONAL is non-nil, always return `LaTeX-optop' and
 
 (defun TeX-TikZ-arg-name (optional)
   "Prompt the user for a TikZ name.
-If OPTIONAL is non-nil, always return \"()\", even if the user
+If OPTIONAL is nil, always return \"()\", even if the user
 doesn't provide any input."
   (let ((name (TeX-read-string (TeX-argument-prompt optional nil "Name" 
 (if optional
@@ -130,8 +130,8 @@ doesn't provide any input."
 
 (defun TeX-TikZ-arg-label (optional)
   "Prompt the user for TikZ label.
-If OPTIONAL is non-nil always return `TeX-grop' and `TeX-grcl',
-even if the user doesn't provide any input."
+If OPTIONAL is nil always return `TeX-grop' and `TeX-grcl', even
+if the user doesn't provide any input."
   (let ((label (TeX-read-string (TeX-argument-prompt optional nil "Label" 
 (if optional
 (TeX-TikZ-get-opt-arg-string label TeX-grop TeX-grcl)
@@ -278,7 +278,7 @@ return \"\"."
 (defun TeX-TikZ-node-arg (_ignored)
   "Prompt the user for the arguments to a TikZ node macro."
   (let ((options (TeX-TikZ-arg-options t))
-(name (TeX-TikZ-arg-name nil))
+(name (TeX-TikZ-arg-name t))
 (point (TeX-TikZ-single-macro-arg TeX-TikZ-point-function-map
   "Node point type: "))
 (label (TeX-TikZ-arg-label nil)))



[elpa] externals/auctex a0ba387b2c 23/48: ; Trivial cleanups

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit a0ba387b2cf614a03143a3f4711a5f7ef7f4b4b2
Author: Ikumi Keita 
Commit: Ikumi Keita 

; Trivial cleanups

* latex.el (LaTeX-environment-menu): Use `TeX-argument-prompt'.
* tex.el: Delete spurious defvar for `TeX-output-dir'.
---
 latex.el | 4 ++--
 tex.el   | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/latex.el b/latex.el
index 1d203d5eef..5fc9f735a7 100644
--- a/latex.el
+++ b/latex.el
@@ -632,8 +632,8 @@ It may be customized with the following variables:
  (dolist (elt prompts)
(let* ((optional (vectorp elt))
   (elt (if optional (elt elt 0) elt))
-  (arg (TeX-read-string (concat (when optional "(Optional) 
")
-elt ": "
+  (arg (TeX-read-string
+(TeX-argument-prompt optional elt nil
  (setq args (concat args
 (cond ((and optional (> (length arg) 0))
(concat LaTeX-optop arg 
LaTeX-optcl))
diff --git a/tex.el b/tex.el
index 976fafbaf9..317b8b490d 100644
--- a/tex.el
+++ b/tex.el
@@ -92,7 +92,6 @@
 (defvar LaTeX-optop)
 (defvar LaTeX-largest-level)
 (defvar LaTeX-section-list)
-(defvar TeX-output-dir)
 ;; tex-ispell.el
 (defvar TeX-ispell-verb-delimiters)
 ;; Others:



[elpa] externals/auctex a617944b4b 08/48: Fix style/xspace.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit a617944b4bea2d14e717a7376cc4aeb82e3cc4be
Author: Arash Esbati 
Commit: Arash Esbati 

Fix style/xspace.el

* style/xspace.el ("xspace"): Fix the name of the macro
\xspaceaddexceptions, insert braces for the argument.
Query for a token after \xspaceremoveexception.
Remove "xspace" from fontification since it's used only in a
macro argument itself.
---
 style/xspace.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/style/xspace.el b/style/xspace.el
index 5f04c5be88..889d17d3a3 100644
--- a/style/xspace.el
+++ b/style/xspace.el
@@ -1,6 +1,6 @@
 ;;; xspace.el --- AUCTeX style for `xspace.sty'  -*- lexical-binding: t; -*-
 
-;; Copyright (C) 2011, 2018, 2020 Free Software Foundation, Inc.
+;; Copyright (C) 2011--2022 Free Software Foundation, Inc.
 
 ;; Author: Mads Jensen 
 ;; Maintainer: auctex-de...@gnu.org
@@ -42,14 +42,13 @@
  (lambda ()
(TeX-add-symbols
 '("xspace" 0)
-"xspaceaddexception"
-"xspaceremoveexception")
+'("xspaceaddexceptions" t)
+'("xspaceremoveexception" "Token"))
 
;; Fontification
(when (and (featurep 'font-latex)
   (eq TeX-install-font-lock 'font-latex-setup))
- (font-latex-add-keywords '(("xspace" "")
-("xspaceaddexception" "{")
+ (font-latex-add-keywords '(("xspaceaddexceptions"   "{")
 ("xspaceremoveexception" "{"))
   'function)))
  TeX-dialect)



[elpa] externals/auctex 04a3138c81 45/48: Simplify implementation of style/theorem.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 04a3138c815954d7a39078b7c287ab14089c5a9f
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/theorem.el

* style/theorem.el (LaTeX-theorem-theoremstyle-list): Turn into a
plain list.
(LaTeX-theorem-fontdecl, LaTeX-arg-theorem-fontdecl): Delete
functions.
(LaTeX-theorem-auto-cleanup): Use `LaTeX-env-label-args' instead
of `LaTeX-theorem-env-label'.
("theorem"): Replace `TeX-arg-eval' with a closure.
Replace functionality of deleted functions with standard ones.
---
 style/theorem.el | 109 +++
 1 file changed, 38 insertions(+), 71 deletions(-)

diff --git a/style/theorem.el b/style/theorem.el
index 01474da87d..6657c3c05f 100644
--- a/style/theorem.el
+++ b/style/theorem.el
@@ -29,10 +29,20 @@
 ;; This file adds support for `theorem.sty' (v2.2c) from 2014/10/28.
 ;; `theorem.sty' is a standard LaTeX package and part of TeXLive.
 
-;; The style provides the function `LaTeX-theorem-env-label' which
-;; enables new defined environments with "\newtheoreom" to interact
-;; with AUCTeX and RefTeX mechanisms for inserting labels.  Check
-;; docstring of `LaTeX-theorem-env-label' for instructions.
+;; This style interacts with AUCTeX and RefTeX mechanisms for
+;; inserting labels into new defined environments with "\newtheoreom".
+;; AUCTeX users need to add the new environment to `LaTeX-label-alist'
+;; via customize or in init-file like this:
+;;
+;;   (add-to-list 'LaTeX-label-alist '("lemma" . "lem:"))
+;;
+;; RefTeX users have to add the value to both `LaTeX-label-alist' and
+;; `reftex-label-alist' like this:
+;;
+;;   (add-to-list 'LaTeX-label-alist '("lemma" . "lem:"))
+;;   (add-to-list 'reftex-label-alist
+;;'("lemma" ?m "lem:" "~ref{%s}"
+;;  nil ("Lemma" "lemma") nil))
 
 ;;; Code:
 
@@ -46,63 +56,9 @@
   (keywords class))
 
 (defvar LaTeX-theorem-theoremstyle-list
-  '(("plain") ("break") ("margin") ("change")
-("marginbreak") ("changebreak"))
+  '("plain" "break" "margin" "change" "marginbreak" "changebreak")
   "List of theorem styles provided by `theorem.sty'.")
 
-(defvar LaTeX-theorem-fontdecl
-  '(;; family
-"rmfamily" "sffamily" "ttfamily"
-;; series
-"mdseries" "bfseries"
-;; shape
-"upshape" "itshape" "slshape" "scshape"
-;; size
-"tiny"  "scriptsize" "footnotesize"
-"small" "normalsize" "large"
-"Large" "LARGE" "huge" "Huge"
-;; reset macro
-"normalfont")
-  "List of font declaration commands for \"\\theorem(body|header)font\".")
-
-(defun LaTeX-arg-theorem-fontdecl (optional &optional prompt)
-  "Prompt for font declaration commands in \"\\theorem(body|header)font\".
-If OPTIONAL is non-nil, insert the resulting value as an optional
-argument.  Use PROMPT as the prompt string."
-  ;; `INITIAL-INPUT' (5th argument to `TeX-completing-read-multiple')
-  ;; is hard-coded to `TeX-esc'.
-  (let* ((crm-separator (regexp-quote TeX-esc))
- (fontdecl (mapconcat #'identity
-  (TeX-completing-read-multiple
-   (TeX-argument-prompt optional prompt "Font")
-   LaTeX-theorem-fontdecl nil nil TeX-esc)
-  TeX-esc)))
-(TeX-argument-insert fontdecl optional)))
-
-(defun LaTeX-theorem-env-label (environment)
-  "Insert ENVIRONMENT, query for an optional argument and prompt
-for label.  AUCTeX users should add ENVIRONMENT to
-`LaTeX-label-alist' via customize or in init-file with:
-
-  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
-
-RefTeX users should customize or add ENVIRONMENT to
-`LaTeX-label-alist' and `reftex-label-alist', for example
-
-  (add-to-list \\='LaTeX-label-alist \\='(\"lemma\" . \"lem:\"))
-  (add-to-list \\='reftex-label-alist
-   \\='(\"lemma\" ?m \"lem:\" \"~\\ref{%s}\"
- nil (\"Lemma\" \"lemma\") nil))"
-  (let ((opthead (TeX-read-string
-  (TeX-argument-prompt t nil "Heading"
-(LaTeX-insert-environment environment
-  (when (and opthead
- (not (string= opthead "")))
-(format "[%s]" opthead
-  (when (LaTeX-label environment 'environment)
-(LaTeX-newline)
-(indent-according-to-mode)))
-
 ;; Setup parsing for \newtheorem
 (TeX-auto-add-type "theorem-newtheorem" "LaTeX")
 
@@ -114,7 +70,7 @@ RefTeX users should customize or add ENVIRONMENT to
   "Move parsed results from `LaTeX-auto-theorem-newtheorem' and
 make them available as new environments."
   (dolist (newthm (mapcar #'car (LaTeX-theorem-newtheorem-list)))
-(LaTeX-add-environments (list newthm #'LaTeX-theorem-env-label
+(LaTeX-add-environments (list newthm #'LaTeX-env-label-args ["Heading"]
 
 (add-hook 'TeX-auto-prepare-hook #'LaTeX-theorem-auto-prepare t)
 (add-hook 'TeX-auto-cl

[elpa] externals/auctex b9548da54a 38/48: Simplify implementation of style/tcolorboxlib-theorems.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit b9548da54ac8bfbec09ce1260e3d9bf432f1958c
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/tcolorboxlib-theorems.el

* style/tcolorboxlib-theorems.el
(LaTeX-tcolorbox-lib-theorems-auto-cleanup):
("tcolorboxlib-theorems"): Use `LaTeX-env-args' instead of
`LaTeX-env-tcolorbox-lib-theorems'.
(LaTeX-env-tcolorbox-lib-theorems): Delete function.
(LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem): Insert only the
first argument, other arguments are queried in the hook.
---
 style/tcolorboxlib-theorems.el | 50 ++
 1 file changed, 17 insertions(+), 33 deletions(-)

diff --git a/style/tcolorboxlib-theorems.el b/style/tcolorboxlib-theorems.el
index 20aa710d47..7205ed4c37 100644
--- a/style/tcolorboxlib-theorems.el
+++ b/style/tcolorboxlib-theorems.el
@@ -187,8 +187,14 @@
 (let ((env (car elt)))
   ;; Add newly defined env's to AUCTeX:
   (LaTeX-add-environments
-   `(,env LaTeX-env-tcolorbox-lib-theorems)
-   `(,(concat env "*") LaTeX-env-tcolorbox-lib-theorems))
+   `(,env LaTeX-env-args
+  [TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options)]
+  "Title"
+  (TeX-arg-literal ,TeX-grop ,TeX-grcl)
+  (LaTeX-env-label-as-keyval nil nil ,env))
+   `(,(concat env "*") LaTeX-env-args
+ [TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options)]
+ "Title"))
   ;; RefTeX: Make `reftex-label-regexps' buffer local and add env
   ;; to it:
   (when (boundp 'reftex-label-regexps)
@@ -210,40 +216,15 @@
   #'LaTeX-tcolorbox-lib-theorems-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-env-tcolorbox-lib-theorems (environment)
-  "Insert theorems ENVIRONMENT, ask for arguments and insert a label."
-  (LaTeX-insert-environment
-   environment
-   (let ((opts (TeX-read-key-val t 
(LaTeX-tcolorbox-lib--theorems-keyval-options)))
- (title (TeX-read-string
- (TeX-argument-prompt nil nil "Title"
- (concat
-  (when (and opts (not (string= opts "")))
-(format "[%s]" opts))
-  (concat TeX-grop title TeX-grcl)
-  (unless (string= (substring-no-properties environment -1) "*")
-(concat TeX-grop TeX-grcl)
-  (unless (string= (substring-no-properties environment -1) "*")
-(LaTeX-env-label-as-keyval nil nil nil environment)))
-
 (defun LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem (optional)
-  "Query and insert arguments of \\newtcbtheorem macro.
-If OPTIONAL is non-nil, insert the argument in brackets in not
+  "Query and insert the first argument of \\newtcbtheorem macro.
+If OPTIONAL is non-nil, insert the argument in brackets if not
 empty."
   (let ((env (TeX-read-string
-  (TeX-argument-prompt optional nil "Name")))
-(disp-name (TeX-read-string
-(TeX-argument-prompt optional nil "Display Name")))
-(opts (TeX-read-key-val optional
-
(LaTeX-tcolorbox-lib--theorems-keyval-options
+  (TeX-argument-prompt optional nil "Name"
 (LaTeX-add-tcolorbox-lib-theorems-newtcbtheorems env)
 (LaTeX-tcolorbox-lib-theorems-auto-cleanup)
-(TeX-argument-insert env optional)
-(TeX-argument-insert disp-name optional)
-(TeX-argument-insert opts optional)
-;; Our 'prefix' argument is always empty as we insert the 'label'
-;; key with a full label value:
-(insert TeX-grop TeX-grcl)))
+(TeX-argument-insert env optional)))
 
 (defun LaTeX-tcolorbox-lib-theorems-reftex-label-context-function (env)
   "Return a context string for RefTeX in ENV."
@@ -287,9 +268,12 @@ empty."
 
(TeX-add-symbols
 ;; 18.1 Macros of the Library
-'("newtcbtheorem"
+`("newtcbtheorem"
   [TeX-arg-key-val LaTeX-tcolorbox-init-options]
-  LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem)
+  LaTeX-arg-tcolorbox-lib-theorems-newtcbtheorem
+  "Display Name"
+  (TeX-arg-key-val (LaTeX-tcolorbox-lib--theorems-keyval-options))
+  (TeX-arg-literal ,TeX-grop ,TeX-grcl))
 
 `("renewtcbtheorem"
   [TeX-arg-key-val LaTeX-tcolorbox-init-options]



[elpa] externals/auctex 978ebea1e8 16/48: Simplify implementation of style/thmtools.el

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 978ebea1e8b58ee88ec43e0887e16faad97dab0c
Author: Arash Esbati 
Commit: Arash Esbati 

Simplify implementation of style/thmtools.el

* style/thmtools.el
(LaTeX-thmtools-declaretheoremstyle-key-val-options): Rename from
`LaTeX-thmtools-declaretheoremstyle-key-val'.
(LaTeX-thmtools-declaretheorem-key-val-options): Rename from
`LaTeX-thmtools-declaretheorem-key-val'.
(LaTeX-thmtools-listoftheorems-key-val-options): Rename from
`LaTeX-thmtools-listoftheorems-key-val'.
New functions now return only a key=val alist and don't query.
(LaTeX-arg-thmtools-declaretheoremstyle):
(LaTeX-arg-thmtools-declaretheorem): Insert only the mandatory
argument.  The query for the optional one happens in the hook.
(LaTeX-arg-thmtools-listoftheorems): Removed as not needed.
---
 style/thmtools.el | 162 +++---
 1 file changed, 68 insertions(+), 94 deletions(-)

diff --git a/style/thmtools.el b/style/thmtools.el
index 4a1067b922..dcf02db8d5 100644
--- a/style/thmtools.el
+++ b/style/thmtools.el
@@ -82,10 +82,8 @@
 (add-hook 'TeX-auto-cleanup-hook #'LaTeX-thmtools-auto-cleanup t)
 (add-hook 'TeX-update-style-hook #'TeX-auto-parse t)
 
-(defun LaTeX-thmtools-declaretheoremstyle-key-val (optional &optional prompt)
-  "Query and return a key=val string for \\declaretheoremstyle macro.
-If OPTIONAL is non-nil, indicate an optional argument in
-minibuffer.  PROMPT replaces the standard one."
+(defun LaTeX-thmtools-declaretheoremstyle-key-val-options ()
+  "Return key=val list for \\declaretheoremstyle macro."
   (let ((lengths (mapcar (lambda (x)
(concat TeX-esc x))
  (mapcar #'car (LaTeX-length-list
@@ -96,93 +94,73 @@ minibuffer.  PROMPT replaces the standard one."
  "tiny"  "scriptsize" "footnotesize"
  "small" "normalsize" "large"
  "Large" "LARGE" "huge" "Huge" "normalfont"
-(TeX-read-key-val
- optional
- `(("spaceabove" ,lengths)
-   ("spacebelow" ,lengths)
-   ("headfont" ,fonts)
-   ("notefont" ,fonts)
-   ("bodyfont" ,fonts)
-   ("headpunct")
-   ("notebraces")
-   ("postheadspace" ,lengths)
-   ("headformat" ("margin" "swapnumber" "\\NUMBER" "\\NAME" "\\NOTE"))
-   ("headindent" ,lengths))
- prompt)))
+`(("spaceabove" ,lengths)
+  ("spacebelow" ,lengths)
+  ("headfont" ,fonts)
+  ("notefont" ,fonts)
+  ("bodyfont" ,fonts)
+  ("headpunct")
+  ("notebraces")
+  ("postheadspace" ,lengths)
+  ("headformat" ("margin" "swapnumber" "\\NUMBER" "\\NAME" "\\NOTE"))
+  ("headindent" ,lengths
 
 (defun LaTeX-arg-thmtools-declaretheoremstyle (optional &optional prompt)
-  "Insert the key=val and style name defined by \\declaretheoremstyle.
+  "Insert the style name defined by \\declaretheoremstyle.
 If OPTIONAL is non-nil, also insert the second argument in square
 brackets.  PROMPT replaces the standard one for the second
 argument."
-  (let ((TeX-arg-opening-brace "[")
-(TeX-arg-closing-brace "]"))
-(TeX-argument-insert
- (LaTeX-thmtools-declaretheoremstyle-key-val t)
- t))
   (let ((style (TeX-read-string
 (TeX-argument-prompt optional prompt "Style"
 (LaTeX-add-thmtools-declaretheoremstyles style)
 (TeX-argument-insert style optional)))
 
-(defun LaTeX-thmtools-declaretheorem-key-val (optional &optional prompt)
-  "Query and return a key=val string for \\declaretheorem macro.
-If OPTIONAL is non-nil, indicate an optional argument in
-minibuffer.  PROMPT replaces the standard one."
+(defun LaTeX-thmtools-declaretheorem-key-val-options ()
+  "Return key=val list for \\declaretheorem macro."
   (let ((counters (mapcar #'car (LaTeX-counter-list
-(TeX-read-key-val
- optional
- `(("parent" ,counters)
-   ("numberwithin" ,counters)
-   ("within" ,counters)
-   ("sibling" ,counters)
-   ("numberlike" ,counters)
-   ("sharenumber" ,counters)
-   ("title")
-   ("name")
-   ("heading")
-   ("numbered" ("yes" "no" "unless unique"))
-   ("style"
-,(append
-  ;; check for \newtheoremstyle from amsthm.sty:
-  (when (and (fboundp 'LaTeX-amsthm-newtheoremstyle-list)
- (LaTeX-amsthm-newtheoremstyle-list))
-(mapcar #'car (LaTeX-amsthm-newtheoremstyle-list)))
-  ;; check for \newtheoremstyle from ntheorem.sty:
-  (when (and (fboundp 'LaTeX-ntheorem-newtheoremstyle-list)
- (LaTeX-ntheorem-newtheoremstyle-list))
-(mapcar #'car (LaTeX-ntheorem-newtheoremstyle-list)))
-  ;; thmtools version is called \declaretheoremstyle:
-  (mapcar #'car (LaTeX-thmtools-declaretheoremstyle-list
-   ("preheadhook")
-   ("postheadhook")
-   ("prefoothook")
-   ("postfoothook")
- 

[elpa] externals/auctex 316550f0bf 29/48: Fix `ConTeXt-add-environments'

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit 316550f0bfa61d197fca7b4a9fc9b864b1b46640
Author: Ikumi Keita 
Commit: Ikumi Keita 

Fix `ConTeXt-add-environments'

* context.el (ConTeXt-environment, ConTeXt-environment-menu): Use
function `ConTeXt-environment-list' to refer to the current
environments list.
(ConTeXt-environment-menu): Follow `LaTeX-environment-menu' to support
optional argument for environments.
* tex.el (TeX-auto-add-type): Use unique key for `TeX-auto-parser' in
order to discriminate ConTeXt environments from LaTeX environments.
* context-en.el (ConTeXt-en-mode-initialization):
* context-nl.el (ConTeXt-nl-mode-initialization):
Add comments.
---
 context-en.el |  5 -
 context-nl.el |  5 -
 context.el| 25 ++---
 tex.el| 12 
 4 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/context-en.el b/context-en.el
index f4b8fdf87c..54f30da3be 100644
--- a/context-en.el
+++ b/context-en.el
@@ -1,7 +1,7 @@
 ;;; context-en.el --- Support for the ConTeXt english interface. -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003-2004, 2006, 2008
-;;   2010, 2014, 2020, 2021 Free Software Foundation, Inc.
+;;   2010, 2014, 2020-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer 
 ;; Keywords: tex
@@ -188,6 +188,9 @@ That is, besides the section(-block) commands.")
 
 (defun ConTeXt-en-mode-initialization ()
   "ConTeXt english interface specific initialization."
+  ;; FIXME: This `mapc' seems spurious because
+  ;; `ConTeXt-language-variable-list' includes
+  ;; `ConTeXt-environment-list'.
   (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-en))
 
   (TeX-add-symbols
diff --git a/context-nl.el b/context-nl.el
index 9b49cce236..143a18a388 100644
--- a/context-nl.el
+++ b/context-nl.el
@@ -1,7 +1,7 @@
 ;;; context-nl.el --- Support for the ConTeXt dutch interface. -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2003, 2004, 2006, 2010,
-;;   2015, 2020, 2021 Free Software Foundation, Inc.
+;;   2015, 2020-2022 Free Software Foundation, Inc.
 
 ;; Maintainer: Berend de Boer 
 ;; Keywords: tex
@@ -163,6 +163,9 @@ That is, besides the section(-block) commands.")
 
 (defun ConTeXt-nl-mode-initialization ()
   "ConTeXt dutch interface specific initialization."
+  ;; FIXME: This `mapc' seems spurious because
+  ;; `ConTeXt-language-variable-list' includes
+  ;; `ConTeXt-environment-list'.
   (mapc #'ConTeXt-add-environments (reverse ConTeXt-environment-list-nl))
 
   (TeX-add-symbols
diff --git a/context.el b/context.el
index 50fb1adfee..40eacda811 100644
--- a/context.el
+++ b/context.el
@@ -680,14 +680,14 @@ With optional ARG, modify current environment."
(t ConTeXt-default-environment)))
  (environment
   (completing-read (concat "Environment type (default " default "): ")
-   ConTeXt-environment-list nil nil nil
+   (ConTeXt-environment-list) nil nil nil
'ConTeXt-environment-history default)))
 ;; Use `environment' as default for the next time only if it is different
 ;; from the current default.
 (unless (equal environment default)
   (setq ConTeXt-default-environment environment))
 
-(let ((entry (assoc environment ConTeXt-environment-list)))
+(let ((entry (assoc environment (ConTeXt-environment-list
   (if (null entry)
   (ConTeXt-add-environments (list environment)))
 
@@ -717,7 +717,7 @@ With optional ARG, modify current environment."
 
 (defun ConTeXt-environment-menu (environment)
   "Insert ENVIRONMENT around point or region."
-  (let ((entry (assoc environment ConTeXt-environment-list)))
+  (let ((entry (assoc environment (ConTeXt-environment-list
 (cond ((not (and entry (nth 1 entry)))
(ConTeXt-insert-environment environment))
   ((numberp (nth 1 entry))
@@ -727,16 +727,19 @@ With optional ARG, modify current environment."
(setq args (concat args TeX-grop TeX-grcl))
(setq count (- count 1)))
  (ConTeXt-insert-environment environment args)))
-  ((stringp (nth 1 entry))
+  ((or (stringp (nth 1 entry)) (vectorp (nth 1 entry)))
(let ((prompts (cdr entry))
  (args ""))
- (while prompts
-   (setq args (concat args
-  TeX-grop
-  (read-from-minibuffer
-   (concat (car prompts) ": "))
-  TeX-grcl))
-   (setq prompts (cdr prompts)))
+ (dolist (elt prompts)
+   (let* ((optional (vectorp elt))
+  (elt (if optional (elt elt 0) elt))
+  (arg (TeX-read-string
+(TeX-argument-prompt optional elt nil
+ (se

[elpa] externals/auctex a7a7209a08 33/48: Extend the argument list of some functions

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit a7a7209a086d8db0ba9a7a3f129533d98b037019
Author: Arash Esbati 
Commit: Arash Esbati 

Extend the argument list of some functions

* latex.el (TeX-read-key-val, TeX-arg-key-val): Extend the
argument list which control the query and insertion of key=val's
in the style hooks.
(TeX-arg-completing-read-multiple): Extend argument list to alter
the value of `crm-separator' and the separator inside `mapconcat'.
---
 latex.el | 89 ++--
 1 file changed, 75 insertions(+), 14 deletions(-)

diff --git a/latex.el b/latex.el
index 9bb5e005c5..d139192d4d 100644
--- a/latex.el
+++ b/latex.el
@@ -3244,7 +3244,10 @@ prompt string.  `LaTeX-default-author' is the initial 
input."
   "")))
 (TeX-argument-insert author optional nil)))
 
-(defun TeX-read-key-val (optional key-val-alist &optional prompt)
+(defun TeX-read-key-val (optional key-val-alist &optional prompt complete
+  predicate require-match
+  initial-input hist def
+  inherit-input-method)
   "Prompt for keys and values in KEY-VAL-ALIST and return them.
 If OPTIONAL is non-nil, indicate in the prompt that we are
 reading an optional argument.  KEY-VAL-ALIST can be
@@ -3255,9 +3258,24 @@ reading an optional argument.  KEY-VAL-ALIST can be
 
 The car of each element should be a string representing a key and
 the optional cdr should be a list with strings to be used as
-values for the key.  Use PROMPT as the prompt string."
+values for the key.
+
+PROMPT replaces the standard one where \\=' (k=v): \\=' is
+appended to it.  If you want the full control over the prompt,
+set COMPLETE to non-nil and then provide a full PROMPT.
+
+PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF,
+INHERIT-INPUT-METHOD are passed to `multi-prompt-key-value',
+which see."
   (multi-prompt-key-value
-   (TeX-argument-prompt optional prompt "Options (k=v)")
+   (TeX-argument-prompt optional
+(cond ((and prompt (not complete))
+   (concat prompt " (k=v)"))
+  ((and prompt complete)
+   prompt)
+  (t nil))
+"Options (k=v)"
+complete)
(cond ((and (listp key-val-alist)
(symbolp (car key-val-alist))
(fboundp (car key-val-alist)))
@@ -3271,18 +3289,51 @@ values for the key.  Use PROMPT as the prompt string."
(listp (car key-val-alist)))
   key-val-alist)
  (t
-  (error "Cannot interpret key-val-alist %S" key-val-alist)
+  (error "Cannot interpret key-val-alist %S" key-val-alist)))
+   predicate require-match initial-input hist def inherit-input-method))
 
-(defun TeX-arg-key-val (optional key-val-alist &optional prompt)
+(defun TeX-arg-key-val (optional key-val-alist &optional prompt complete
+ rem-char leftbrace rightbrace
+ predicate require-match
+ initial-input hist def
+ inherit-input-method)
   "Prompt for keys and values in KEY-VAL-ALIST.
 Insert the given value as a TeX macro argument.  If OPTIONAL is
 non-nil, insert it as an optional argument.  KEY-VAL-ALIST is an
 alist.  The car of each element should be a string representing a
 key and the optional cdr should be a list with strings to be used
 as values for the key.  Refer to `TeX-read-key-val' for more
-about KEY-VAL-ALIST.  Use PROMPT as the prompt string."
-  (let ((options (TeX-read-key-val optional key-val-alist prompt)))
-(TeX-argument-insert options optional)))
+about KEY-VAL-ALIST.
+
+PROMPT replaces the standard one where \\=' (k=v): \\=' is
+appended to it.  If you want the full control over the prompt,
+set COMPLETE to non-nil and then provide a full PROMPT.
+
+REM-CHAR is a character removed from `crm-local-completion-map'
+and `minibuffer-local-completion-map' when performing completion.
+In most cases it will be ?\\s.
+
+The brackets used are controlled by the string values of
+LEFTBRACE and RIGHTBRACE.
+
+PREDICATE, REQUIRE-MATCH, INITIAL-INPUT, HIST, DEF,
+INHERIT-INPUT-METHOD are passed to `multi-prompt-key-value',
+which see."
+  (let ((TeX-arg-opening-brace (or leftbrace TeX-arg-opening-brace))
+(TeX-arg-closing-brace (or rightbrace TeX-arg-closing-brace))
+(crm-local-completion-map
+ (if rem-char (remove (assoc rem-char crm-local-completion-map)
+  crm-local-completion-map)
+   crm-local-completion-map))
+(minibuffer-local-completion-map
+ (if rem-char (remove (assoc rem-char minibuffer-local-completion-map)
+  minibuffer-local-completion-map)
+   minibuffer-local-completion-ma

[elpa] externals/auctex c8d638ac9d 40/48: Use `functionp' to recognize a function

2022-11-18 Thread Tassilo Horn
branch: externals/auctex
commit c8d638ac9db02291e221c0c5f18ce28be3084a50
Author: Arash Esbati 
Commit: Arash Esbati 

Use `functionp' to recognize a function

* tex.el (TeX-parse-argument): Identify a function with
`functionp' instead of `symbolp'.  This way it is also possible to
use a closure inside a style hook.
---
 tex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tex.el b/tex.el
index 7fe8095aba..c5fd9678e6 100644
--- a/tex.el
+++ b/tex.el
@@ -3554,7 +3554,7 @@ See `TeX-parse-macro' for details."
  (set-marker TeX-exit-mark (point)))
(insert TeX-arg-closing-brace)
(setq insert-flag t))
-  ((symbolp arg)
+  ((functionp arg)
(funcall arg optional))
   ((listp arg)
(let ((head (car arg))



  1   2   >