[AUCTeX-devel] Fontification for + after macro names
Hi all, fontspec.sty has a macro: \defaultfontfeatures+[]{} which appends to any already-selected defaults. I think I can make font-latex.el support fontification of `+' with a small change: --8<---cut here---start->8--- diff --git a/font-latex.el b/font-latex.el index e1c8e555..60fc5515 100644 --- a/font-latex.el +++ b/font-latex.el @@ -1614,9 +1614,10 @@ Returns nil if none of KEYWORDS is found." (parse-sexp-ignore-comments t)) ; scan-sexps ignores comments (goto-char (match-end 0)) ;; Check for starred macro if first spec is an asterisk. - (when (eq (car spec-list) ?*) + (when (or (eq (car spec-list) ?*) + (eq (car spec-list) ?+)) (setq spec-list (cdr spec-list)) - (skip-chars-forward "*" (1+ (point + (skip-chars-forward "*+" (1+ (point ;; Add current point to match data and use keyword face for ;; region from start to point. (nconc match-data (list (point))) @@ -1643,7 +1644,7 @@ Returns nil if none of KEYWORDS is found." (forward-char) (if (zerop (skip-syntax-forward "_w")) (forward-char) ; Single-char macro. - (skip-chars-forward "*")) + (skip-chars-forward "*+")) (point (nconc font-latex-matched-faces (list face)) (setq end (max end (point))) --8<---cut here---end--->8--- The result looks like this: It is just a hack to make it work and the right way would be probably to define a variable instead of hard-coded "*+". Can others please try this or give a me hint if I'm missing something? TIA, Arash ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
[AUCTeX-commit] GNU AUCTeX branch, master, updated. 08930b529093e52cf1791605bb6cc2e6fc140812
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 08930b529093e52cf1791605bb6cc2e6fc140812 (commit) from c872521f4d726895add6d3076e2b9d1d6e7bdb03 (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 08930b529093e52cf1791605bb6cc2e6fc140812 Author: Ikumi Keita Date: Thu Apr 20 03:21:45 2017 +0900 Improve error handling for Japanese users * tex-buf.el (TeX-help-error): Use number based condition to detect whether the search over `TeX-error-description-list' comes to its last element. Comparison with a literal string breaks when tex-jp.el installs Japanese help messages into `TeX-error-description-list'. --- Summary of changes: tex-buf.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
[AUCTeX-devel] Modifying error handling
Hi all, I'm going to check in the following change. Since loading tex-jp.el replaces `TeX-error-description-list' with Japanese help messages, comparison with a fixed string "No help available" no longer works after that. Rather we should test whether `TeX-error-pointer' comes to the last element of `TeX-error-description-list'. diff --git a/tex-buf.el b/tex-buf.el --- a/tex-buf.el +++ b/tex-buf.el @@ -3306,7 +3306,8 @@ (let ((help (cdr (nth TeX-error-pointer TeX-error-description-list (save-excursion - (if (and (string= help "No help available") + (if (and (= (1+ TeX-error-pointer) + (length TeX-error-description-list)) (let* ((log-buffer (find-buffer-visiting log-file))) (if log-buffer (progn Though I have done a brief test with this change, feel free to revert the commit if you find any problems with this. Bye, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
[AUCTeX-commit] GNU AUCTeX branch, master, updated. f676608d578a98986365f658d2c179987f1ba4e3
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 f676608d578a98986365f658d2c179987f1ba4e3 (commit) from 08930b529093e52cf1791605bb6cc2e6fc140812 (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 f676608d578a98986365f658d2c179987f1ba4e3 Author: Mosè Giordano Date: Wed Apr 19 23:57:34 2017 +0200 Fix parsing of LaTeX2e date formats * tex-buf.el (TeX-LaTeX-sentinel): Support ISO date format, now used by LaTeX2e. Reported by Uwe Siart. * tests/tex/error-parsing.el (TeX-LaTeX2e-date): Add a test for LaTeX2e date formats. --- Summary of changes: tests/tex/error-parsing.el | 22 ++ tex-buf.el | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) hooks/post-receive -- GNU AUCTeX ___ auctex-commit mailing list auctex-com...@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-commit
Re: [AUCTeX-devel] Modifying error handling
Hi Keita, 2017-04-19 20:42 GMT+02:00 Ikumi Keita : > Hi all, > > I'm going to check in the following change. Since loading tex-jp.el > replaces `TeX-error-description-list' with Japanese help messages, > comparison with a fixed string "No help available" no longer works after > that. Rather we should test whether `TeX-error-pointer' comes to the > last element of `TeX-error-description-list'. > > diff --git a/tex-buf.el b/tex-buf.el > --- a/tex-buf.el > +++ b/tex-buf.el > @@ -3306,7 +3306,8 @@ > (let ((help (cdr (nth TeX-error-pointer > TeX-error-description-list > (save-excursion > - (if (and (string= help "No help available") > + (if (and (= (1+ TeX-error-pointer) > + (length TeX-error-description-list)) > (let* ((log-buffer (find-buffer-visiting log-file))) > (if log-buffer > (progn > > Though I have done a brief test with this change, feel free to revert > the commit if you find any problems with this. The fix looks sensible. A request: please add tests when possible. This ensures we won't break anything in the feature, this is particularly important in areas that usually receive less love from other developers (like support for Japanese), and so are more likely to be unintentionally broken. Thanks, Mosè ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel
Re: [AUCTeX-devel] Modifying error handling
Hi Mosè, > Mosè Giordano writes: > The fix looks sensible. A request: please add tests when possible. > This ensures we won't break anything in the feature, this is > particularly important in areas that usually receive less love from > other developers (like support for Japanese), and so are more likely > to be unintentionally broken. Thanks for your advice. Next time I won't forget to add tests. Bye, Ikumi Keita ___ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel