commit 0d0aad213f941efc0fa0ec032e37dc9c2b08c9fb (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Tue Aug 11 08:47:40 2020 +0200 ; * lisp/leim/quail/latin-ltx.el: Fix regexp in last commit. diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index 6e25fc7255..6a2508ba31 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -244,7 +244,7 @@ system, including many technical ones. Examples: ;; (which is \varphi) are reversed in `ucs-names', so we define ;; them manually. Also ignore "GREEK SMALL LETTER EPSILON" and ;; add the correct value for \epsilon manually. - (unless (string-match-p "\\" name) + (unless (string-match-p "\\<\\(?:PHI\\|GREEK SMALL LETTER EPSILON\\)\\>" name) (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase) (match-string 2 name))))) "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'") commit 9c702b5ad6cd4a115eec3a4875510070f26a2420 Author: Stefan Kangas Date: Tue Aug 11 00:42:31 2020 +0200 Fix \epsilon and \varepsilon in TeX input method * lisp/leim/quail/latin-ltx.el: Add correct \epsilon and \varepsilon characters to TeX input method. (Bug#26060) diff --git a/lisp/leim/quail/latin-ltx.el b/lisp/leim/quail/latin-ltx.el index 78ffca9e2f..6e25fc7255 100644 --- a/lisp/leim/quail/latin-ltx.el +++ b/lisp/leim/quail/latin-ltx.el @@ -242,12 +242,14 @@ system, including many technical ones. Examples: ((lambda (name char) ;; "GREEK SMALL LETTER PHI" (which is \phi) and "GREEK PHI SYMBOL" ;; (which is \varphi) are reversed in `ucs-names', so we define - ;; them manually. - (unless (string-match-p "\\" name) + ;; them manually. Also ignore "GREEK SMALL LETTER EPSILON" and + ;; add the correct value for \epsilon manually. + (unless (string-match-p "\\" name) (concat "\\" (funcall (if (match-end 1) #' capitalize #'downcase) (match-string 2 name))))) "\\`GREEK \\(?:SMALL\\|CAPITA\\(L\\)\\) LETTER \\([^- ]+\\)\\'") + ("\\epsilon" ?ϵ) ("\\phi" ?ϕ) ("\\Box" ?□) ("\\Bumpeq" ?≎) @@ -641,6 +643,7 @@ system, including many technical ones. Examples: (concat "\\var" (downcase (match-string 1 name))))) "\\`GREEK \\([^- ]+\\) SYMBOL\\'") + ("\\varepsilon" ?ε) ("\\varphi" ?φ) ("\\varprime" ?′) ("\\varpropto" ?∝) commit dcce2b57bb91d490787dffd437b61196f1029b41 Author: Lars Ingebrigtsen Date: Mon Aug 10 16:26:34 2020 +0200 Fix fontification of outdated TeX form * lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): End the expression before the terminating $ in constructions like $\it identifiername$ (bug#28277). This avoids italicising the final $ character. This fixes the final $ of the final test case here: $foo$ \textit{foo} {\it foo} $\mathit{identifiername}$ $\textit{identifiername}$ ${\it identifiername}$ $\it identifiername$ diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index e3d5759579..a905d14800 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el @@ -593,7 +593,7 @@ An alternative value is \" . \", if you use a font with a narrow period." ;; Miscellany. (slash "\\\\") (opt " *\\(\\[[^]]*\\] *\\)*") - (args "\\(\\(?:[^{}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)") + (args "\\(\\(?:[^${}&\\]+\\|\\\\.\\|{[^}]*}\\)+\\)") (arg "{\\(\\(?:[^{}\\]+\\|\\\\.\\|{[^}]*}\\)+\\)")) (list ;; commit 170faae31b13defc35a26ee6429dcb82066a6a66 Author: Stefan Kangas Date: Sat May 2 12:29:13 2020 +0200 Add new command apropos-function (Bug#41021) * lisp/apropos.el (apropos-function): New command. * etc/NEWS: Announce it. diff --git a/etc/NEWS b/etc/NEWS index db2374112a..ddb42fbb4b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -529,6 +529,9 @@ prefix on the Subject line in various languages. These new navigation commands are bound to 'n' and 'p' in 'apropos-mode'. +*** New command 'apropos-function'. +This works like 'C-u M-x apropos-command' but is more discoverable. + ** CC Mode *** Added support for Doxygen documentation style. diff --git a/lisp/apropos.el b/lisp/apropos.el index 2566d44dfc..6d8c7847b0 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -543,6 +543,20 @@ will be buffer-local when set." (and (local-variable-if-set-p symbol) (get symbol 'variable-documentation))))) +;;;###autoload +(defun apropos-function (pattern) + "Show functions that match PATTERN. + +PATTERN can be a word, a list of words (separated by spaces), +or a regexp (using some regexp special characters). If it is a word, +search for matches for that word as a substring. If it is a list of words, +search for matches for any two (or more) of those words. + +This is the same as running `apropos-command' with a \\[universal-argument] prefix, +or a non-nil `apropos-do-all' argument." + (interactive (list (apropos-read-pattern "function"))) + (apropos-command pattern t)) + ;; For auld lang syne: ;;;###autoload (defalias 'command-apropos 'apropos-command) commit 4fc066a6407e5cb91d17bd9eecebd5beeff590e6 Author: Stefan Kangas Date: Mon Aug 10 14:44:35 2020 +0200 ; Add my last change to NEWS. diff --git a/etc/NEWS b/etc/NEWS index 7a38b4df14..db2374112a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -98,6 +98,10 @@ dimension. Added a new Mozhi scheme. The inapplicable ITRANS scheme is now deprecated. Errors in the Inscript method were corrected. +--- +** Rudimentary support for the 'st' terminal emulator. +Emacs now supports 256 color display on the 'st' terminal emulator. + * Editing Changes in Emacs 28.1 commit 4a6dd13fa42c87175ac72e1980f31cac56582db3 Author: Charles A. Roelli Date: Mon Aug 10 15:16:11 2020 +0200 Change 'M-:' to not error out on incomplete expressions * lisp/simple.el (read--expression-try-read): New function to read a Lisp expression from the minibuffer (bug#30697). This will not (as before) signal an error on incomplete expressions, but allow users to continue editing it. (read--expression): Use it (and add a doc string). diff --git a/etc/NEWS b/etc/NEWS index e3d7ff0bef..7a38b4df14 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -101,6 +101,13 @@ deprecated. Errors in the Inscript method were corrected. * Editing Changes in Emacs 28.1 +--- +** 'eval-expression' now no longer signals an error on incomplete expressions. +Previously, typing 'M-: ( RET' would result in Emacs saying "End of +file during parsing" and dropping out of the minibuffer. The user +would have to type 'M-: M-p' to edit and redo the expression. Now +Emacs will echo the message and allow the user to continue editing. + +++ ** New command 'undo-redo'. It undoes previous undo commands, but doesn't record itself as an diff --git a/lisp/simple.el b/lisp/simple.el index 4a774bc9b4..4d59108a34 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1619,6 +1619,10 @@ display the result of expression evaluation." "Hook run by `eval-expression' when entering the minibuffer.") (defun read--expression (prompt &optional initial-contents) + "Read an Emacs Lisp expression from the minibuffer. + +PROMPT and optional argument INITIAL-CONTENTS do the same as in +function `read-from-minibuffer'." (let ((minibuffer-completing-symbol t)) (minibuffer-with-setup-hook (lambda () @@ -1629,11 +1633,52 @@ display the result of expression evaluation." (set-syntax-table emacs-lisp-mode-syntax-table) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) + (local-set-key "\r" 'read--expression-try-read) + (local-set-key "\n" 'read--expression-try-read) (run-hooks 'eval-expression-minibuffer-setup-hook)) (read-from-minibuffer prompt initial-contents read-expression-map t 'read-expression-history)))) +(defun read--expression-try-read () + "Try to read an Emacs Lisp expression in the minibuffer. + +Exit the minibuffer if successful, else report the error to the +user and move point to the location of the error. If point is +not already at the location of the error, push a mark before +moving point." + (interactive) + (unless (> (minibuffer-depth) 0) + (error "Minibuffer must be active")) + (if (let* ((contents (minibuffer-contents)) + (error-point nil)) + (with-temp-buffer + (condition-case err + (progn + (insert contents) + (goto-char (point-min)) + ;; `read' will signal errors like "End of file during + ;; parsing" and "Invalid read syntax". + (read (current-buffer)) + ;; Since `read' does not signal the "Trailing garbage + ;; following expression" error, we check for trailing + ;; garbage ourselves. + (or (progn + ;; This check is similar to what `string_to_object' + ;; does in minibuf.c. + (skip-chars-forward " \t\n") + (= (point) (point-max))) + (error "Trailing garbage following expression"))) + (error + (setq error-point (+ (length (minibuffer-prompt)) (point))) + (with-current-buffer (window-buffer (minibuffer-window)) + (unless (= (point) error-point) + (push-mark)) + (goto-char error-point) + (minibuffer-message (error-message-string err))) + nil)))) + (exit-minibuffer))) + (defun eval-expression-get-print-arguments (prefix-argument) "Get arguments for commands that print an expression result. Returns a list (INSERT-VALUE NO-TRUNCATE CHAR-PRINT-LIMIT) commit 70825a4d313fddd6f80a1840d775384e848daf9f Author: Lars Ingebrigtsen Date: Mon Aug 10 13:24:19 2020 +0200 Fix problem with /- incorrectly starting a comment in SQL mode * lisp/progmodes/sql.el (sql-mode): Move all the syntax setup stuff here (bug#35646). Add handling of -* and /- from Kristian Hole . diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 7c4feb38c3..e554b2b8b0 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -1508,22 +1508,6 @@ Based on `comint-mode-map'.") table) "Syntax table used in `sql-mode' and `sql-interactive-mode'.") -;;; Syntax Properties - -;; `sql--syntax-propertize-escaped-apostrophe', as follows, was -;; (analysed and) adapted from `pascal--syntax-propertize' in -;; pascal.el because basic syntax parsing cannot handle the SQL '' -;; construct within strings. - -(defconst sql--syntax-propertize-escaped-apostrophe - (syntax-propertize-rules - ("''" - (0 - (if (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) - (string-to-syntax ".") - (forward-char -1) - nil))))) - ;; Font lock support (defvar sql-mode-font-lock-object-name @@ -4226,10 +4210,18 @@ must tell Emacs. Here's how to do that in your init file: (setq-local abbrev-all-caps 1) ;; Contains the name of database objects (set (make-local-variable 'sql-contains-names) t) - ;; Activate punctuation syntax table property for - ;; escaped apostrophes within strings: (setq-local syntax-propertize-function - sql--syntax-propertize-escaped-apostrophe) + (syntax-propertize-rules + ;; Handle escaped apostrophes within strings. + ("''" + (0 + (if (save-excursion (nth 3 (syntax-ppss (match-beginning 0)))) + (string-to-syntax ".") + (forward-char -1) + nil))) + ;; Propertize rules to not have /- and -* start comments. + ("\\(/-\\)" (1 ".")) + ("\\(-\\*\\)" (1 ".")))) ;; Set syntax and font-face highlighting ;; Catch changes to sql-product and highlight accordingly (sql-set-product (or sql-product 'ansi)) ; Fixes bug#13591 commit c669afcd1cf3990cadbff7319c2e30b72996cdda Author: Stefan Kangas Date: Thu Oct 3 02:46:44 2019 +0200 Add term/st.el (Bug#33182) This is a copy of term/konsole.el with konsole -> st. * lisp/term/st.el: New file. diff --git a/lisp/term/st.el b/lisp/term/st.el new file mode 100644 index 0000000000..3a15576ecc --- /dev/null +++ b/lisp/term/st.el @@ -0,0 +1,12 @@ +;;; st.el --- terminal initialization for st -*- lexical-binding:t -*- +;; Copyright (C) 2020 Free Software Foundation, Inc. + +(require 'term/xterm) + +(defun terminal-init-st () + "Terminal initialization function for st." + (tty-run-terminal-initialization (selected-frame) "xterm")) + +(provide 'term/st) + +;; st.el ends here commit aaa7ce585e2a65f3263a655bf52d04d38530279c Author: Glenn Morris Date: Mon Aug 10 12:28:27 2020 +0100 ; Copyright fix Author has assignment on file diff --git a/lisp/net/eudcb-macos-contacts.el b/lisp/net/eudcb-macos-contacts.el index f258d5cb9f..e2d10e33d4 100644 --- a/lisp/net/eudcb-macos-contacts.el +++ b/lisp/net/eudcb-macos-contacts.el @@ -1,19 +1,23 @@ ;;; eudcb-macos-contacts.el --- EUDC - macOS Contacts backend -;; Copyright (C) 2020 condition-alpha.com +;; Copyright (C) 2020 Free Software Foundation, Inc. -;; This program is free software: you can redistribute it and/or modify +;; Author: Alexander Adolf + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, + +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. -;; + ;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: ;; This library provides an interface to the macOS Contacts app as commit f7421039fb15123dbbda047e23504dd1771183b5 Author: Matthew Bauer Date: Mon Aug 10 13:09:57 2020 +0200 Add zsh extended_history handling for comint.el input ring * lisp/comint.el (comint-input-ring-file-prefix): New variable (bug#36034). (comint-read-input-ring): Use it. * lisp/shell.el (shell-mode): Set it. diff --git a/lisp/comint.el b/lisp/comint.el index 4b3b583856..df947b93af 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -249,6 +249,10 @@ to set this in a mode hook, rather than customize the default value." file) :group 'comint) +(defvar comint-input-ring-file-prefix nil + "The prefix to skip when parsing the input ring file. +This is useful in Zsh when the extended_history option is on.") + (defcustom comint-scroll-to-bottom-on-input nil "Controls whether input to interpreter causes window to scroll. If nil, then do not scroll. If t or `all', scroll all windows showing buffer. @@ -987,8 +991,20 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'." (setq end (match-beginning 0))) (setq start (if (re-search-backward ring-separator nil t) - (match-end 0) - (point-min))) + (progn + (when (and comint-input-ring-file-prefix + (looking-at + comint-input-ring-file-prefix)) + ;; Skip zsh extended_history stamps + (goto-char (match-end 0))) + (match-end 0)) + (progn + (goto-char (point-min)) + (when (and comint-input-ring-file-prefix + (looking-at + comint-input-ring-file-prefix)) + (goto-char (match-end 0))) + (point)))) (setq history (buffer-substring start end)) (goto-char start) (when (and (not (string-match history-ignore history)) diff --git a/lisp/shell.el b/lisp/shell.el index dc528412a6..f5e18bbc72 100644 --- a/lisp/shell.el +++ b/lisp/shell.el @@ -619,7 +619,12 @@ buffer." ;; Bypass a bug in certain versions of bash. (when (string-equal shell "bash") (add-hook 'comint-preoutput-filter-functions - #'shell-filter-ctrl-a-ctrl-b nil t))) + #'shell-filter-ctrl-a-ctrl-b nil t)) + + ;; Skip extended history for zsh. + (when (string-equal shell "zsh") + (setq-local comint-input-ring-file-prefix + ": [[:digit:]]+:[[:digit:]]+;"))) (comint-read-input-ring t))) (defun shell-apply-ansi-color (beg end face)