diff options
| author | Glenn Morris | 2017-12-20 21:14:19 -0500 |
|---|---|---|
| committer | Glenn Morris | 2017-12-20 21:14:19 -0500 |
| commit | 0482fa774cbb978c8b61f80ced844554b61655f0 (patch) | |
| tree | 144318becad6ecc50415f0eba360ef917f7dd6ea | |
| parent | 9f1c613b07e4a745671af5818366660e3765984d (diff) | |
| parent | 89cfdbf729bc731331358e0efc69547547aa3ca2 (diff) | |
| download | emacs-0482fa774cbb978c8b61f80ced844554b61655f0.tar.gz emacs-0482fa774cbb978c8b61f80ced844554b61655f0.zip | |
Merge from origin/emacs-26
89cfdbf Don't mess up syntax-ppss cache in electric-pair (Bug#29710)
c5061d8 * etc/emacs.appdata.xml: Update file format.
080f227 Use utf-8-hfs-unix on macOS (Bug#29712)
28e0261 * lisp/progmodes/cc-defs.el (c-version): Update to 5.33.1.
ac53084 Improve fix for Bug#29712
ffd4771 * doc/lispref/sequences.texi (Sequence Functions): Improve in...
f274cbd Avoid reordering of output in 'shr-insert-document'
7890864 Improve documentation of 'invisible-p'
a1327bb Remove one more check that Vframe_list is non-nil
63b6281 Fix off-by-one error in 'css--hex-color'
804b37c Save and restore text-pixel height and width of frames (Bug#2...
777fe94 Partially revert "Mention new strictness for &optional, &rest...
ad17db7 * lisp/vc/smerge-mode.el (smerge-refine): Respect font-lock-m...
5a7d009 * lisp/vc/smerge-mode.el (smerge-refine): Replace obsolete al...
e019c35 FOR_EACH_FRAME no longer assumes frame-list
d64b88d * src/font.c (Ffont_info): Doc fix. (Bug#29682)
92b2604 Modernise message.el face spec syntax
b1efbe6 Update message.el obsolete face aliases
2494c14 ; * lisp/comint.el (comint-terminfo-terminal): Add a :version...
12ad276 Improve documentation of TERM environment variable
8ed529f Add option to configure comint TERM
889f07c Better support utf-8-with-signature and utf-8-hfs in XML/HTML
a2697fa * lisp/menu-bar.el (menu-bar-mode): Doc fix.
ffb50ea ; * etc/NEWS: Fix last change.
95606af Fix Bug#29712 in tramp-tests.el
9bf66c6 Don't run FOR_EACH_FRAME when there's no frame left (Bug#29961)
c2a88ec * lisp/textmodes/tex-mode.el: Ensure uncompiled file is loada...
b178870 Remember password change for IMAP in Gnus (Bug#29692)
a21dac1 Add %DUMBFW to the default GnuTLS priority strings
780407c Small fixes prompted by make check-declare
541a601 Fix some custom groups
e220d6e Fix fontification of first declaration within a C++ lambda form.
aa66da2 * src/data.c (Fadd_variable_watcher): Doc fix.
f838210 Fix misfontification of C++ member initialization list after ...
232c646 Fix doc-string of Fbuffer_list
3f9aac6 Don't raise an extraneous frame (bug#29696)
e7b1111 Mention new strictness for &optional, &rest in arglists (Bug#...
4cb8696 Don't misfontify "foo ()" inside C++ initialization parenthes...
ce31e72 Fixes for defcustoms, prompted by cus-test-opts
aacd1e1 * lisp/net/newst-backend.el (newsticker--raw-url-list-default...
7e2f4d3 * lisp/htmlfontify.el (hfy-which-etags): Fix it.
52d2a69 Add missing :version tags revealed by cusver-check
f5d0360 Escape column-zero doc parens
45099bb Remove ObjC blocks (Bug#23753)
b0369d0 Import the latest IVD_Sequences.txt
cd53b63 Fix dired-do-compress when tar doesn't default to stdin (Bug#...
51911da Suppress warnings during elisp completion macroexpansion
a36a090 * lisp/progmodes/verilog-mode.el (verilog-mode): Fix typo (Bu...
6a6e8e6 Make tramp-interrupt-process more robust
5bcd468 Make quail-input-method work when inhibit-read-only is non-ni...
87baf12 Fix 'fontset-name-p'
d231587 Fix fontset documentation inconsistencies for bug#29630
a829cb8 Remove sentence from child frames section in Elisp manual
ad491c8 Avoid crashes in 'font-at' after 'set-fontset-font'
c73d2cd * lisp/files-x.el (connection-local-set-profile-variables): F...
cefca2b Add /etc/ssl/cert.pem to gnutls-trustfiles for macOS
122e726 Fix tool-tip display when display margins are non-zero by def...
e1cc203 Handle hash tables and vectors when reading/writing EIEIO obj...
cda219c Improve interactive debugging commands in xdisp.c
1056b3c Fix calculation of continuation_pixel_width in display engine
90e2080 Improve documentation of 'save-abbrevs'.
14f0230 Improve documentation of Dired
161b0e5 * lisp/bookmark.el (bookmark-alist): Doc fix. (Bug#29551)
7eea314 Minor Tramp fixes
c0a670a * lisp/help-mode.el (help-function-def): Allow help-make-xref...
0572016 Fix doc-string of 'display-buffer-in-side-window'
a1bbc49 Fix Bug#29579
cb3d979 ; NEWS: Update Org version number
445eefd Backport: Update Org to v9.1.4
5381c70 In windows.texi mention special splitting behavior of side an...
46d62b9 * lisp/gnus/gnus-group.el (gnus-group-mode-map): Bind [follow...
1ef1dbd Avoid compilation warning in xterm.c
5cf3c26 * README: Document all the top-level directories. (Bug#29558)
e9ea206 Don't enable erc modules on simply loading erc.el
4b06af0 Allow shr to use data: URLs without encoding
1fdac2d Don't add newlines in minibuffer history
de68f33 modhelp.py: Support Python 3 (Bug#24954)
afb04f7 Use forward slashes for python w32 config example (Bug#21656)
04e5b28 Fix bug in i18n/l10n optimization
8227087 Let autoload-compute-prefix be set file-locally (Bug#29471)
98ca7d5 Improve edit-kbd-macro prompting in case of remapped keys (Bu...
c02c1f6 Add tests on electric-indentation and Python multiline string...
946bb6d Disable electric indent for python strings (Bug#29305)
35f1ed1 ; ChangeLog.2: Fix bug reference.
ac31663 Fix buffer overflow in fontname conversion (Bug#29523)
bf9b972 Fix byte compilation of files with leading directories
ac144dc * lisp/files.el (make-backup-file-name-1): Fix scoping error.
1b351c8 Revert Tramp commit from 2017-11-20
77cf972 Improve documentation of buffer-list commands and features
66ec92a Fix backing up remote files in local directories on MS-Windows
7e61e74 * doc/emacs/mule.texi (Output Coding): Clarify sendmail coding.
1e25cd7 Revert "Fix backing up remote files in local directories on M...
f52d795 Fix a typo in ELisp manual
bf26fc3 * lisp/composite.el (find-composition): Fix a typo in the doc...
34a21c3 ; Auto-commit of loaddefs files.
8c8b673 Fix backing up remote files in local directories on MS-Windows
8eb6870 Fix vertical cursor motion in pixel-scroll.el
625e84f Fix typos in doc strings of message.el
9292276 Fix a typo in the Emacs manual
42509c0 Improve the documentation of 'table-insert-sequence'
93dc7ae Port better to QNX
ad99550 Make tramp-test42-auto-load more robust
af0ce33 ; * lisp/composite.el (find-composition): Fix a typo in last ...
bdbcdba Avoid assertions in find-composition
408862f ; * lisp/emacs-lisp/bytecomp.el: Tweak message formatting in ...
9964db4 Restore obsolete method of changing byte-compile-dest-file
3dd25ae Some minor Tramp corrections
d670a15 * doc/misc/url.texi (http/https): Fix typo
99d07e8 Remove some bogus definition-prefixes from loaddefs
| -rw-r--r-- | etc/emacs.appdata.xml | 18 | ||||
| -rw-r--r-- | lisp/elec-pair.el | 25 |
2 files changed, 32 insertions, 11 deletions
diff --git a/etc/emacs.appdata.xml b/etc/emacs.appdata.xml index c3b1afb6284..6d9df8bf0b5 100644 --- a/etc/emacs.appdata.xml +++ b/etc/emacs.appdata.xml | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- Copyright (C) 2014-2017 Free Software Foundation, Inc. --> | 2 | <!-- Copyright (C) 2014-2017 Free Software Foundation, Inc. --> |
| 3 | <application> | 3 | <component type="desktop-application"> |
| 4 | <id type="desktop">emacs.desktop</id> | 4 | <id>org.gnu.emacs</id> |
| 5 | <metadata_license>GFDL-1.3</metadata_license> | 5 | <metadata_license>GFDL-1.3+</metadata_license> |
| 6 | <!-- It is GFDL-1.3+, but appdata-validate complains... --> | 6 | <project_license>GPL-3.0+ and GFDL-1.3+</project_license> |
| 7 | <project_license>GPL-3.0+ and GFDL-1.3</project_license> | ||
| 8 | <name>GNU Emacs</name> | 7 | <name>GNU Emacs</name> |
| 9 | <summary>An extensible text editor</summary> | 8 | <summary>An extensible text editor</summary> |
| 10 | <description> | 9 | <description> |
| @@ -25,9 +24,12 @@ | |||
| 25 | </ul> | 24 | </ul> |
| 26 | </description> | 25 | </description> |
| 27 | <screenshots> | 26 | <screenshots> |
| 28 | <screenshot type="default" width="632" height="354">https://www.gnu.org/software/emacs/images/appdata.png</screenshot> | 27 | <screenshot type="default"> |
| 28 | <image type="source" width="632" height="354">https://www.gnu.org/software/emacs/images/appdata.png</image> | ||
| 29 | </screenshot> | ||
| 29 | </screenshots> | 30 | </screenshots> |
| 31 | <launchable type="desktop-id">emacs</launchable> | ||
| 30 | <url type="homepage">https://www.gnu.org/software/emacs</url> | 32 | <url type="homepage">https://www.gnu.org/software/emacs</url> |
| 31 | <updatecontact>emacs-devel_at_gnu.org</updatecontact> | 33 | <update_contact>emacs-devel_AT_gnu.org</update_contact> |
| 32 | <project_group>GNU</project_group> | 34 | <project_group>GNU</project_group> |
| 33 | </application> | 35 | </component> |
diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el index 7f523d1df45..a980f51d3c0 100644 --- a/lisp/elec-pair.el +++ b/lisp/elec-pair.el | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | ;;; Code: | 24 | ;;; Code: |
| 25 | 25 | ||
| 26 | (require 'electric) | 26 | (require 'electric) |
| 27 | (eval-when-compile (require 'cl-lib)) | ||
| 27 | 28 | ||
| 28 | ;;; Electric pairing. | 29 | ;;; Electric pairing. |
| 29 | 30 | ||
| @@ -222,6 +223,22 @@ inside a comment or string." | |||
| 222 | (electric-pair-mode nil)) | 223 | (electric-pair-mode nil)) |
| 223 | (self-insert-command 1))) | 224 | (self-insert-command 1))) |
| 224 | 225 | ||
| 226 | (cl-defmacro electric-pair--with-uncached-syntax ((table &optional start) &rest body) | ||
| 227 | "Like `with-syntax-table', but flush the syntax-ppss cache afterwards. | ||
| 228 | Use this instead of (with-syntax-table TABLE BODY) when BODY | ||
| 229 | contains code which may update the syntax-ppss cache. This | ||
| 230 | includes calling `parse-partial-sexp' and any sexp-based movement | ||
| 231 | functions when `parse-sexp-lookup-properties' is non-nil. The | ||
| 232 | cache is flushed from position START, defaulting to point." | ||
| 233 | (declare (debug ((form &optional form) body)) (indent 1)) | ||
| 234 | (let ((start-var (make-symbol "start"))) | ||
| 235 | `(let ((syntax-propertize-function nil) | ||
| 236 | (,start-var ,(or start '(point)))) | ||
| 237 | (unwind-protect | ||
| 238 | (with-syntax-table ,table | ||
| 239 | ,@body) | ||
| 240 | (syntax-ppss-flush-cache ,start-var))))) | ||
| 241 | |||
| 225 | (defun electric-pair--syntax-ppss (&optional pos where) | 242 | (defun electric-pair--syntax-ppss (&optional pos where) |
| 226 | "Like `syntax-ppss', but sometimes fallback to `parse-partial-sexp'. | 243 | "Like `syntax-ppss', but sometimes fallback to `parse-partial-sexp'. |
| 227 | 244 | ||
| @@ -240,7 +257,8 @@ when to fallback to `parse-partial-sexp'." | |||
| 240 | (skip-syntax-forward " >!") | 257 | (skip-syntax-forward " >!") |
| 241 | (point))))) | 258 | (point))))) |
| 242 | (if s-or-c-start | 259 | (if s-or-c-start |
| 243 | (with-syntax-table electric-pair-text-syntax-table | 260 | (electric-pair--with-uncached-syntax (electric-pair-text-syntax-table |
| 261 | s-or-c-start) | ||
| 244 | (parse-partial-sexp s-or-c-start pos)) | 262 | (parse-partial-sexp s-or-c-start pos)) |
| 245 | ;; HACK! cc-mode apparently has some `syntax-ppss' bugs | 263 | ;; HACK! cc-mode apparently has some `syntax-ppss' bugs |
| 246 | (if (memq major-mode '(c-mode c++ mode)) | 264 | (if (memq major-mode '(c-mode c++ mode)) |
| @@ -293,7 +311,8 @@ If point is not enclosed by any lists, return ((t) . (t))." | |||
| 293 | (cond ((< direction 0) | 311 | (cond ((< direction 0) |
| 294 | (condition-case nil | 312 | (condition-case nil |
| 295 | (eq (char-after pos) | 313 | (eq (char-after pos) |
| 296 | (with-syntax-table table | 314 | (electric-pair--with-uncached-syntax |
| 315 | (table) | ||
| 297 | (matching-paren | 316 | (matching-paren |
| 298 | (char-before | 317 | (char-before |
| 299 | (scan-sexps (point) 1))))) | 318 | (scan-sexps (point) 1))))) |
| @@ -323,7 +342,7 @@ If point is not enclosed by any lists, return ((t) . (t))." | |||
| 323 | (save-excursion | 342 | (save-excursion |
| 324 | (while (not outermost) | 343 | (while (not outermost) |
| 325 | (condition-case err | 344 | (condition-case err |
| 326 | (with-syntax-table table | 345 | (electric-pair--with-uncached-syntax (table) |
| 327 | (scan-sexps (point) (if (> direction 0) | 346 | (scan-sexps (point) (if (> direction 0) |
| 328 | (point-max) | 347 | (point-max) |
| 329 | (- (point-max)))) | 348 | (- (point-max)))) |