Re: Use of lexical binding plus various other things
> Stefan Monnier writes: > BTW, I rebased my branch on top of your patch, and hence on top of > auctex.git's `master`. Thanks, I'd like to merge them into AUCTeX repository. If nobody objects, I'll do it soon. Regards, Ikumi Keita
[AUCTeX-commit] GNU AUCTeX branch, master, updated. 7606a49da2b1c22c9ebaeb734e77b4504c91b451
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via 7606a49da2b1c22c9ebaeb734e77b4504c91b451 (commit) via 6ca79102471a715cab87765658f42b5a720bea4a (commit) via 2852adff623c3ad60f72c2288c8b86036b436b9b (commit) via d7bdc79cafa1bca2a0da5caa9aa7911393175366 (commit) via 00ef5975113bbb31a2dd9837d276260cbd5878bd (commit) via 7a684085261992852b3b03c30e12d42e43154df5 (commit) via e6910bb7c5357a6fe6d3919602a46aea41f480f1 (commit) via 8de4670e3446976b53e95c4ca957f0cefdd99e03 (commit) via 1d188f59c3c413e4dec4bd34ce0dd320ba3a7fb8 (commit) via 7d896288610577f1a9a5b76c3a6aa0211d5d2249 (commit) via 7c2f403f5c39a314bc0b2d9e1e7c1507f55983d1 (commit) from c037cac4163c29776d78f795812d706f67609193 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 7606a49da2b1c22c9ebaeb734e77b4504c91b451 Author: Stefan Monnier Date: Mon Mar 22 22:56:59 2021 -0400 Use UTF-8 for all ELisp files UTF-8 is the default encoding used for ELisp files nowadays, so convert the few remaining exceptions. * tests/japanese/preview-latex.el: * tex-jp.el: Remove `coding:` cookie and re-encode into utf-8. commit 6ca79102471a715cab87765658f42b5a720bea4a Author: Stefan Monnier Date: Mon Mar 22 22:53:55 2021 -0400 Prefer lexical closures over hand-built lambda forms now that we have lexical-binding, we can use closures, which have the advantage over `(lambda ...) of allowing the byte-compiler to compile the code, and also makes it possible to Edebug it. * preview.el (preview-gs-close, preview-gs-flag-error) (preview-scale-from-face, preview-gs-flag-error) (preview-scale-from-face, preview-disabled-string) (preview-buffer-restore, preview-place-preview) (preview-reinstate-preview, preview-cache-preamble) (preview-generate-preview, preview-report-bug): * toolbar-x.el (toolbarx-emacs-mount-popup-menu): * tex.el (TeX-mode-specific-command-menu): Replace `(lambda...) with closures. commit 2852adff623c3ad60f72c2288c8b86036b436b9b Author: Stefan Monnier Date: Mon Mar 22 22:36:40 2021 -0400 Activate lexical-binding everywhere Also, add an underscore at the beginning of unused arguments to silence warnings. * bib-cite.el (bib-highlight-mouse): Remove unused vars `extent` and `local-extent-list`. * latex.el (LaTeX-label): Remove unused var `label`. (LaTeX-math-mode-map): Move before first use. * preview.el.in (preview-start-dvipng, preview-start-dvips): Remove unused var `file`. * tex-fold.el (TeX-fold-macro-nth-arg): Remove unused var `close-string`. (TeX-fold-hide-item): Remove unused var `face`. * tex-font.el (tex-font-lock-keywords-2): Remove unused var `type`. * tex-info.el (Texinfo-mark-section): Rework to avoid relying on dynamic scoping to access local vars. * toolbar-x.el (toolbarx-test-toolbar-type): Remove unused vars `all-but-def-opts` and `all-opts`; remove always-t var `good-jobs`. commit d7bdc79cafa1bca2a0da5caa9aa7911393175366 Author: Stefan Monnier Date: Tue Mar 23 11:28:12 2021 -0400 Expose the body of advice to the compiler While at it, use `advice-add` when available. We can drop `defadvice` completely when we bump the required version to Emacs-24.4, or if/when we add `nadvice` as a required package. * context.el (ConTeXt--invalidate-menu): New function. (ConTeXt-add-environments): Advise with it. * latex.el (LaTeX-add-bibliographies): Advise with `TeX-run-style-hooks`. (LaTeX--invalidate-menus): New function. (LaTeX-add-environments): Advise with it. * preview.el.in (preview--open-for-replace): New function. (replace-highlight): Advise with it. * tex.el (tex--call-minor-mode): New function. (hack-one-local-variable): Advise with it. commit 00ef5975113bbb31a2dd9837d276260cbd5878bd Author: Stefan Monnier Date: Mon Mar 22 22:20:25 2021 -0400 Miscellaneous minor changes Move to the next line arguments that are easy to misread. Fix some commenting style to obey `outline-minor-mode`. * auctex.el.in: Don't require `cl-lib` since it's bundled with Emacs-24.3. * README: Prefer HTTPS over HTTP/FTP for gnu.org sites. * bib-cite.el (bib-find-next): Simplify. * latex.el: Use a non-nil default value for `LaTeX-label-function` so RefTeX can override it with `add-function`. (LaTeX-label--default): New function, extracted from `LaTeX-label`. (LaTeX-label): Use it. (LaTeX
Re: Use of lexical binding plus various other things
> Ikumi Keita writes: > Stefan Monnier writes: >> BTW, I rebased my branch on top of your patch, and hence on top of >> auctex.git's `master`. > Thanks, I'd like to merge them into AUCTeX repository. If nobody > objects, I'll do it soon. Merged. Bye, Ikumi Keita
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 8f0638c5a3487ab88ccae616c4f8c708a842d84d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via 8f0638c5a3487ab88ccae616c4f8c708a842d84d (commit) from 7606a49da2b1c22c9ebaeb734e77b4504c91b451 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 8f0638c5a3487ab88ccae616c4f8c708a842d84d Author: Ikumi Keita Date: Thu Mar 25 11:16:06 2021 +0900 Fix merging * tex-buf.el (TeX-region-update): Use `begin', not `TeX--begin'. * tex.el (TeX--call-minor-mode): Rename from `tex--call-minor-mode' to make prefix uniform in AUCTeX. (): Add autoload declaration of `TeX-previous-error'. (TeX-output-dir): Use #' instead of ' to quote function name. diff --git a/tex-buf.el b/tex-buf.el index 601d5a0..84f1162 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -185,7 +185,7 @@ pinned region will get unpinned and vice versa." (TeX-region-create (TeX-region-file TeX-default-extension) (buffer-substring-no-properties begin end) (file-name-nondirectory (buffer-file-name)) - (TeX-current-offset TeX--begin + (TeX-current-offset begin (defun TeX-command-region (&optional override-confirm) "Run TeX on the current region. diff --git a/tex.el b/tex.el index 39cca4d..d50f974 100644 --- a/tex.el +++ b/tex.el @@ -711,6 +711,7 @@ sure \"%p\" is the first entry." (autoload 'TeX-home-buffer "tex-buf" nil t) (autoload 'TeX-kill-job "tex-buf" nil t) (autoload 'TeX-next-error "tex-buf" nil t) +(autoload 'TeX-previous-error "tex-buf" nil t) (autoload 'TeX-output-extension "tex-buf") (autoload 'TeX-pin-region "tex-buf" nil t) (autoload 'TeX-pop-to-buffer "tex-buf") @@ -753,11 +754,11 @@ emacs 24.1 and is then later run by emacs 24.5." (cons elt "AUCTeX" (if (fboundp 'advice-add) ;Emacsâ¥24.4 (or ELPA package nadvice) -(advice-add 'hack-one-local-variable :after #'tex--call-minor-mode) +(advice-add 'hack-one-local-variable :after #'TeX--call-minor-mode) (defadvice hack-one-local-variable (after TeX-hack-one-local-variable-after activate) -(tex--call-minor-mode (ad-get-arg 0) (ad-get-arg 1 -(defun tex--call-minor-mode (var val &rest _) +(TeX--call-minor-mode (ad-get-arg 0) (ad-get-arg 1 +(defun TeX--call-minor-mode (var val &rest _) "Call minor mode function if minor mode variable is found." ;; Instead of checking for each mode explicitely `minor-mode-list' ;; could be used. But this may make the byte compiler pop up. @@ -2531,7 +2532,7 @@ file in `TeX-master'. The path cannot contain a directory that starts with '.'. If this variable is nil, the output directory is assumed to be the same as the directory of `TeX-master'." :group 'TeX-file - :safe 'string-or-null-p + :safe #'string-or-null-p :type '(choice (const :tag "Directory of master file" nil) (string :tag "Custom" "build"))) (make-variable-buffer-local 'TeX-output-dir) --- Summary of changes: tex-buf.el | 2 +- tex.el | 9 + 2 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs
[AUCTeX-commit] GNU AUCTeX branch, master, updated. 65a711ba0c9bbdf1b04991a3b305440afd23ebd9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 (commit) from 8f0638c5a3487ab88ccae616c4f8c708a842d84d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 Author: Ikumi Keita Date: Fri Mar 19 18:16:56 2021 +0900 Discard obsolete variables According to NEWS.24, `font-lock-defaults-alist' was removed at emacs 24.1. `font-lock-mode-enable-list' doesn't exist in any NEWS.* nor emacs 24.3 source. (Xemacs specific variable?) According to loaddefs.el, `font-lock-auto-fontify' is xemacs variable corresponding to `global-font-lock-mode'. * tex-buf.el: (): Remove defvar for `font-lock-mode-enable-list', `font-lock-auto-fontify' and `font-lock-defaults-alist'. (TeX-region-create): Don't let-bind obsolete variables. Stop let-binding `font-lock-defaults' since it is buffer local variable. It doesn't make sense to let-bind it before changing the current buffer. Set NOWARN argument to t in `find-file-noselect' to suppress "(New file)" message in echo area. --- Summary of changes: tex-buf.el | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
[AUCTeX-commit] GNU AUCTeX branch, master, updated. 8f0638c5a3487ab88ccae616c4f8c708a842d84d
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via 8f0638c5a3487ab88ccae616c4f8c708a842d84d (commit) from 7606a49da2b1c22c9ebaeb734e77b4504c91b451 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 8f0638c5a3487ab88ccae616c4f8c708a842d84d Author: Ikumi Keita Date: Thu Mar 25 11:16:06 2021 +0900 Fix merging * tex-buf.el (TeX-region-update): Use `begin', not `TeX--begin'. * tex.el (TeX--call-minor-mode): Rename from `tex--call-minor-mode' to make prefix uniform in AUCTeX. (): Add autoload declaration of `TeX-previous-error'. (TeX-output-dir): Use #' instead of ' to quote function name. --- Summary of changes: tex-buf.el | 2 +- tex.el | 9 + 2 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
Re: Use of lexical binding plus various other things
>> Thanks, I'd like to merge them into AUCTeX repository. If nobody >> objects, I'll do it soon. > Merged. Great, thanks! Stefan
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 65a711ba0c9bbdf1b04991a3b305440afd23ebd9
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 (commit) from 8f0638c5a3487ab88ccae616c4f8c708a842d84d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 Author: Ikumi Keita Date: Fri Mar 19 18:16:56 2021 +0900 Discard obsolete variables According to NEWS.24, `font-lock-defaults-alist' was removed at emacs 24.1. `font-lock-mode-enable-list' doesn't exist in any NEWS.* nor emacs 24.3 source. (Xemacs specific variable?) According to loaddefs.el, `font-lock-auto-fontify' is xemacs variable corresponding to `global-font-lock-mode'. * tex-buf.el: (): Remove defvar for `font-lock-mode-enable-list', `font-lock-auto-fontify' and `font-lock-defaults-alist'. (TeX-region-create): Don't let-bind obsolete variables. Stop let-binding `font-lock-defaults' since it is buffer local variable. It doesn't make sense to let-bind it before changing the current buffer. Set NOWARN argument to t in `find-file-noselect' to suppress "(New file)" message in echo area. diff --git a/tex-buf.el b/tex-buf.el index 84f1162..24d287c 100644 --- a/tex-buf.el +++ b/tex-buf.el @@ -2103,10 +2103,6 @@ The hooks are run in the region buffer, you may use the variable "unexpanded{\\&}" file t) file)) -(defvar font-lock-mode-enable-list) -(defvar font-lock-auto-fontify) -(defvar font-lock-defaults-alist) - (defvar TeX-region-orig-buffer nil "The original buffer in which the TeX-region was created.") (make-variable-buffer-local 'TeX-region-orig-buffer) @@ -2138,12 +2134,7 @@ original file." (master-buffer (find-file-noselect master-name)) ;; Attempt to disable font lock. - (font-lock-defaults-alist nil) - (font-lock-defaults nil) - ;; (font-lock-maximum-size 0) ; Obsolete since Emacs 24.1 (font-lock-mode-hook nil) - (font-lock-auto-fontify nil) - (font-lock-mode-enable-list nil) ;; And insert them into the FILE buffer. (file-buffer (let (;; Don't query for master file (TeX-transient-master t) @@ -2153,7 +2144,7 @@ original file." (enable-local-variables nil) ;; Don't run any f-f hooks (find-file-hook nil)) -(find-file-noselect file))) +(find-file-noselect file t))) ;; But remember original content. original-content --- Summary of changes: tex-buf.el | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. a7b5f1adb4afd4073dca6afecb8407dab8e7a156
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via a7b5f1adb4afd4073dca6afecb8407dab8e7a156 (commit) from 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit a7b5f1adb4afd4073dca6afecb8407dab8e7a156 Author: Ikumi Keita Date: Thu Mar 25 12:35:54 2021 +0900 Fix documents * doc/auctex.texi (LaTeX-amsmath-label): Add multline env. and remove aligned env. since the former gets label while the latter doesn't get. (Error overview): Delete spurious "on". * doc/install.texi (Prerequisites): Raise minimum required version to 24.3. * doc/preview-faq.texi (Requirements): Add description about availability on Windows. Remove reference on table deleted before. Adapt subsection title. diff --git a/doc/auctex.texi b/doc/auctex.texi index 4342b56..b38a056 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -998,7 +998,7 @@ Prefix to use for `eqnarray' labels. @defopt LaTeX-amsmath-label Prefix to use for amsmath equation labels. Amsmath equations include -@samp{align}, @samp{alignat}, @samp{xalignat}, @samp{aligned}, +@samp{align}, @samp{alignat}, @samp{xalignat}, @samp{multline}, @samp{flalign} and @samp{gather}. @end defopt @@ -3791,7 +3791,7 @@ compiler. Show an overview of the errors and warnings occurred in the last TeX run. -In this window you can visit the error on which point is on by pressing +In this window you can visit the error on which point is by pressing @key{RET}, and visit the next or previous issue by pressing @key{n} or @key{p} respectively. A prefix argument to these keys specifies how many errors to move forward or backward. You can visit an error also by diff --git a/doc/install.texi b/doc/install.texi index a286cae..1238a26 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -96,7 +96,7 @@ the file @file{INSTALL.windows}. @end ifclear @itemize @bullet -@item GNU Emacs 24 or higher +@item GNU Emacs 24.3 or higher Using @previewlatex{} requires a version of Emacs compiled with image support. diff --git a/doc/preview-faq.texi b/doc/preview-faq.texi index 442ac9e..8c77e28 100644 --- a/doc/preview-faq.texi +++ b/doc/preview-faq.texi @@ -45,8 +45,7 @@ to @email{auctex-devel@@gnu.org}. @node Requirements, Installation Trouble, Introduction to FAQ, Frequently Asked Questions @section Requirements -@subsection Which version of (X)Emacs is needed? -See also the table at the end of the section. +@subsection Which version of Emacs is needed? @previewlatex{} nominally requires @w{GNU Emacs} with a version of at least 24.3. @@ -82,7 +81,10 @@ flavors of Unix: we have reports for HP and Solaris. There are several development versions of Emacs around for native MacOS Carbon, and @previewlatex{} is working with them, too. -With Windows, Cygwin should work. +With Windows, both native Emacs and Cygwin Emacs should work. However, it +is known that @url{https://miktex.org/,MiK@TeX{}} sometimes doesn't work +with @previewlatex{}. In that case, use +@url{https://tug.org/texlive/,@TeX{}live} instead. @node Installation Trouble, Customization, Requirements, Frequently Asked Questions @section Installation Trouble --- Summary of changes: doc/auctex.texi | 4 ++-- doc/install.texi | 2 +- doc/preview-faq.texi | 8 +--- 3 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-diffs mailing list auctex-di...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-diffs
[AUCTeX-commit] GNU AUCTeX branch, master, updated. a7b5f1adb4afd4073dca6afecb8407dab8e7a156
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU AUCTeX". The branch, master has been updated via a7b5f1adb4afd4073dca6afecb8407dab8e7a156 (commit) from 65a711ba0c9bbdf1b04991a3b305440afd23ebd9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - commit a7b5f1adb4afd4073dca6afecb8407dab8e7a156 Author: Ikumi Keita Date: Thu Mar 25 12:35:54 2021 +0900 Fix documents * doc/auctex.texi (LaTeX-amsmath-label): Add multline env. and remove aligned env. since the former gets label while the latter doesn't get. (Error overview): Delete spurious "on". * doc/install.texi (Prerequisites): Raise minimum required version to 24.3. * doc/preview-faq.texi (Requirements): Add description about availability on Windows. Remove reference on table deleted before. Adapt subsection title. --- Summary of changes: doc/auctex.texi | 4 ++-- doc/install.texi | 2 +- doc/preview-faq.texi | 8 +--- 3 files changed, 8 insertions(+), 6 deletions(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit