[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex-cont-latexmk ae9171666e 063/100: tidy
From: |
ELPA Syncer |
Subject: |
[elpa] externals/auctex-cont-latexmk ae9171666e 063/100: tidy |
Date: |
Thu, 6 Jun 2024 03:57:56 -0400 (EDT) |
branch: externals/auctex-cont-latexmk
commit ae9171666e2508485093236734e46b9e1fd6211a
Author: Paul Nelson <ultrono@gmail.com>
Commit: Paul Nelson <ultrono@gmail.com>
tidy
---
czm-tex-compile.el | 50 ++++++++++++++++++++++----------------------------
1 file changed, 22 insertions(+), 28 deletions(-)
diff --git a/czm-tex-compile.el b/czm-tex-compile.el
index 35c54ff941..6858c5f3a1 100644
--- a/czm-tex-compile.el
+++ b/czm-tex-compile.el
@@ -45,18 +45,12 @@
"Run latexmk continuously, report errors via flymake."
:group 'tex)
-(defcustom czm-tex-compile-command
- "latexmk -pvc -shell-escape -pdf -view=none -e '$pdflatex=q/pdflatex %O
-synctex=1 -interaction=nonstopmode %S/'"
- "Command to compile LaTeX documents."
- :type 'string
- :group 'czm-tex-compile)
-
(defcustom czm-tex-compile-report-multiple-labels t
"Non-nil means report multiple label errors via flymake."
:type 'boolean
:group 'czm-tex-compile)
-(defun czm-tex-compile-process-item (type file line message offset context
search-string
+(defun czm-tex-compile-process-item (type file line message offset _context
search-string
_line-end bad-box _error-point
ignore)
"Process an error or warning for the current TeX document.
The arguments are as in in `TeX-error-list'. Return either nil or a
@@ -117,10 +111,8 @@ the triple describe the error or warning."
(defun czm-tex-compile-process-log ()
"Process log file for current LaTeX document.
-Returns a list of triples (ERROR-P DESCRIPTION REGION), where
-ERROR-P is non-nil if the error is an error rather than a
-warning, DESCRIPTION is what you'd expect, and REGION is a cons
-cell (BEG . END) indicating where the error happens."
+Return a list of triples as in the docstring of
+`czm-tex-compile-process-item'."
(delq nil (mapcar (lambda (item)
(apply #'czm-tex-compile-process-item item))
(czm-tex-compile--error-list (TeX-master-file "log")))))
@@ -159,14 +151,24 @@ latexmk compilation is in a \"Watching\" state."
(time-less-p (nth 5 (file-attributes file))
(nth 5 (file-attributes log-file))))))
+(defvar czm-tex-compile-mode)
+
(defvar-local czm-tex-compile--report-fn nil
"Function provided by Flymake for reporting diagnostics.")
-(defvar-local czm-tex-compile--timer-enabled nil)
+(defun czm-tex-compile-flymake (report-fn &rest _args)
+ "Flymake backend for LaTeX based on latexmk.
+Save REPORT-FN in a local variable, called by
+e`czm-tex-compile--timer' to report diagnostics."
+ (when czm-tex-compile-mode
+ (setq czm-tex-compile--report-fn report-fn)))
+
+(defvar czm-tex-compile--timer nil
+ "Timer for reporting changes to the log file.")
(defun czm-tex-compile--timer-function ()
"Report to the flymake backend if the current buffer is fresh."
- (when czm-tex-compile--timer-enabled
+ (when czm-tex-compile-mode
(when (and czm-tex-compile--report-fn (czm-tex-compile--fresh-p))
(funcall
czm-tex-compile--report-fn
@@ -179,15 +181,6 @@ latexmk compilation is in a \"Watching\" state."
description)))
(czm-tex-compile-process-log))))))
-(defvar czm-tex-compile-mode)
-
-(defun czm-tex-compile-flymake (report-fn &rest _args)
- "Flymake backend for LaTeX based on latexmk.
-Save REPORT-FN in a local variable, called by
-e`czm-tex-compile--timer' to report diagnostics."
- (when czm-tex-compile-mode
- (setq czm-tex-compile--report-fn report-fn)))
-
(defvar-local czm-tex-compile--subscribed-buffers nil
"List of buffers subscribed to the current LaTeX compilation.")
@@ -210,13 +203,16 @@ e`czm-tex-compile--timer' to report diagnostics."
(delete-process process))
(kill-buffer comp-buf))))))
+(defcustom czm-tex-compile-command
+ "latexmk -pvc -shell-escape -pdf -view=none -e '$pdflatex=q/pdflatex %O
-synctex=1 -interaction=nonstopmode %S/'"
+ "Command to compile LaTeX documents."
+ :type 'string
+ :group 'czm-tex-compile)
+
(defun czm-tex-compile--compilation-command ()
"Return the command used to compile the current LaTeX document."
(format "%s %s" czm-tex-compile-command (TeX-master-file "tex")))
-(defvar czm-tex-compile--timer nil
- "Timer for reporting changes to the log file.")
-
;;;###autoload
(define-minor-mode czm-tex-compile-mode
"If enabled, run LaTeX compilation on the current buffer."
@@ -241,13 +237,11 @@ e`czm-tex-compile--timer' to report diagnostics."
(cancel-timer czm-tex-compile--timer)
(setq czm-tex-compile--timer nil))
(setq czm-tex-compile--timer
- (run-with-timer 2 1 #'czm-tex-compile--timer-function))
- (setq czm-tex-compile--timer-enabled t))
+ (run-with-timer 2 1 #'czm-tex-compile--timer-function)))
(t
(czm-tex-compile--unsubscribe)
(remove-hook 'kill-buffer-hook 'czm-tex-compile--unsubscribe t)
(remove-hook 'flymake-diagnostic-functions #'czm-tex-compile-flymake t)
- (setq czm-tex-compile--timer-enabled nil)
(when czm-tex-compile--report-fn
(setq czm-tex-compile--report-fn nil)))))
- [elpa] externals/auctex-cont-latexmk e20b97607e 026/100: got it in OK shape, still quite rough tho, (continued)
- [elpa] externals/auctex-cont-latexmk e20b97607e 026/100: got it in OK shape, still quite rough tho, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 1384905db7 050/100: rearrange, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 7c7fcc15a9 053/100: mild factoring, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk b082dacb78 054/100: some good clean-up, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 62c2eb652a 031/100: print entire warning message (not every warning is a LaTeX warning), ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 5473521164 036/100: tweak readme, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 6cbd9d1493 067/100: respect TeX-output-dir, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 8333451e17 028/100: re-implement main logic using TeX-parse-all-errors, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 1aee5cc114 049/100: add "ignored" user option, started rearranging, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk c6d624934e 061/100: some simplifications, clean-up, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk ae9171666e 063/100: tidy,
ELPA Syncer <=
- [elpa] externals/auctex-cont-latexmk 993c2e62fe 068/100: adapt TeX-format-filter to format log more robustly, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk a9d825f79c 069/100: attempt to make compilation command OS-compatible, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 826cf967f4 070/100: clarify commentary, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk d0fe19c0de 079/100: Make tex-continuous-mode independent of flymake, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk cdef4a9839 081/100: Remove t from flymake-diagnostic-functions, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk 832496d454 088/100: Support indirect buffers, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk c3ff2df047 030/100: restrict errors to those associated to some file, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk c2069da6b9 035/100: reduce "sit-for" time, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk d377100af3 056/100: cleaning up, hopefully not ruining everything, ELPA Syncer, 2024/06/06
- [elpa] externals/auctex-cont-latexmk fcb2ec2d87 062/100: tidy, ELPA Syncer, 2024/06/06