[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b5f00bf: Unquote lambdas in font-latex.el & tex-bar.el; add some
From: |
Tassilo Horn |
Subject: |
master 6b5f00bf: Unquote lambdas in font-latex.el & tex-bar.el; add some FIXMEs |
Date: |
Sat, 27 Aug 2022 03:48:55 -0400 (EDT) |
branch: master
commit 6b5f00bfaca715fe7fcbf30d5811cef22f4fd529
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Tassilo Horn <tsdh@gnu.org>
Unquote lambdas in font-latex.el & tex-bar.el; add some FIXMEs
* font-latex.el (font-latex-match-math-env)
(font-latex-match-math-envII,font-latex-match-dollar-math)
(font-latex-match-quotation): Add FIXMEs.
* tex-bar.el (TeX-bar-TeX-button-alist)
(TeX-bar-LaTeX-button-alist,menu-strings-buttons-alist): Unquote lambdas.
---
font-latex.el | 4 +++
tex-bar.el | 91 ++++++++++++++++++++++++++++++-----------------------------
2 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 4406dea6..52c0fca1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1804,6 +1804,7 @@ Used for patterns like:
;; If the closing tag is beyond the current end of
;; region, take care of it.
(when (< font-latex--updated-region-end p)
+ ;; FIXME: Why? Should this use `font-lock-flush'?
(font-lock-unfontify-region font-latex--updated-region-end p)
(setq font-latex--updated-region-end p))
(store-match-data (list beg beg beg p)))
@@ -1883,6 +1884,7 @@ The \\begin{equation} incl. arguments in the same line and
(+ limit font-latex-multiline-boundary) 'move)
(progn
(setq end (match-beginning 0))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end end)
@@ -1919,6 +1921,7 @@ The \\begin{equation} incl. arguments in the same line and
(progn
(forward-char num)
(let ((p (point)))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end p)
@@ -2082,6 +2085,7 @@ set to `french', and >>german<< (and 8-bit) are used if
set to `german'."
(goto-char after-beg)
(store-match-data (list after-beg after-beg beg after-beg)))
(let ((p (point)))
+ ;; FIXME: Duplicate of code in `font-latex-match-math-env'.
(if (< font-latex--updated-region-end limit)
(setq font-latex--updated-region-end limit))
(when (< font-latex--updated-region-end p)
diff --git a/tex-bar.el b/tex-bar.el
index 9df6c870..024a268d 100644
--- a/tex-bar.el
+++ b/tex-bar.el
@@ -133,43 +133,43 @@ the argument BUTTON-ALIST in function
`toolbarx-install-toolbar'."
:group 'TeX-tool-bar-button-definitions)
(defcustom TeX-bar-TeX-button-alist
- '((tex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
+ `((tex :image ,(lambda nil (if TeX-PDF-mode "pdftex" "tex"))
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "TeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "TeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "TeX")))
(pdftex :image "pdftex"
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "PDFTeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "PDFTeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "PDFTeX")))
(next-error :image "error"
:command TeX-next-error
:enable (TeX-error-report-has-errors-p)
:visible (TeX-error-report-has-errors-p))
- (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
+ (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
:command (TeX-command "View" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "View")))
+ :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)
- (TeX-bar-help-from-command-list "File")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "File")))
(bibtex :image "bibtex"
:command (TeX-command "BibTeX" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "BibTeX")))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "BibTeX")))
(clean :image "delete"
:command (TeX-command "Clean" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "Clean")))
+ :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)
- (TeX-bar-help-from-command-list "Spell"))))
+ :help ,(lambda (&rest _ignored)
+ (TeX-bar-help-from-command-list "Spell"))))
;; latex-symbols-experimental?
"Alist for button definitions in TeX bar.
Value should le a list where each element is of format (KEY .
@@ -269,48 +269,48 @@ the argument BUTTON-ALIST in function
`toolbarx-install-toolbar'."
:group 'TeX-tool-bar-button-definitions)
(defcustom TeX-bar-LaTeX-button-alist
- '((latex :image (lambda nil (if TeX-PDF-mode "pdftex" "tex"))
+ `((latex :image ,(lambda nil (if TeX-PDF-mode "pdftex" "tex"))
:command (progn
(TeX-save-document #'TeX-master-file)
(TeX-command "LaTeX" #'TeX-master-file -1))
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "LaTeX")))
+ :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)
- (TeX-bar-help-from-command-list "PDFLaTeX")))
+ :help ,(lambda (&rest ignored)
+ (TeX-bar-help-from-command-list "PDFLaTeX")))
(next-error :image "error"
:command TeX-next-error
:enable (TeX-error-report-has-errors-p)
:visible (TeX-error-report-has-errors-p))
- (view :image (lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
+ (view :image ,(lambda nil (if TeX-PDF-mode "viewpdf" "viewdvi"))
:command (TeX-command "View" #'TeX-master-file -1)
- :help (lambda (&rest ignored)
- (TeX-bar-help-from-command-list "View")))
+ :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)
- (TeX-bar-help-from-command-list "File")))
+ :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)
- (TeX-bar-help-from-command-list
- (if LaTeX-using-Biber "Biber" "BibTeX"))))
+ :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)
- (TeX-bar-help-from-command-list "Clean")))
+ :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)
- (TeX-bar-help-from-command-list "Spell")))
+ :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
@@ -464,22 +464,23 @@ Internal variable.")
(defconst LaTeX-symbols-toolbar-switch-contents
`(;; the on-off switch button
(latex-symbols-switch
- :image (lambda nil (if LaTeX-symbols-toolbar-visible-flag
- "ltx-symb-turn-off"
- "ltx-symb-turn-on"))
+ :image ,(lambda ()
+ (if LaTeX-symbols-toolbar-visible-flag
+ "ltx-symb-turn-off"
+ "ltx-symb-turn-on"))
:command (progn
(setq LaTeX-symbols-toolbar-visible-flag
(not LaTeX-symbols-toolbar-visible-flag))
(toolbarx-refresh))
;; help message depends on if symb-toolbar is on or off, and in
;; the name of the current class of symbols
- :help (lambda (&rest ignore)
- (concat "Turn "
- (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
- "the toolbar of LaTeX symbols (current class: "
- (nth (1- LaTeX-symbols-active-menuitem)
- (quote ,list-strings))
- ")")))
+ :help ,(lambda (&rest _ignore)
+ (concat "Turn "
+ (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
+ "the toolbar of LaTeX symbols (current class: "
+ (nth (1- LaTeX-symbols-active-menuitem)
+ (quote ,list-strings))
+ ")")))
;; the dropdown button, that also switch on the symbols
,(append '(:dropdown-group)
list-strings
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6b5f00bf: Unquote lambdas in font-latex.el & tex-bar.el; add some FIXMEs,
Tassilo Horn <=