diff options
| author | Glenn Morris | 2017-12-20 21:15:43 -0500 |
|---|---|---|
| committer | Glenn Morris | 2017-12-20 21:15:43 -0500 |
| commit | b1cf262a79463f28164ea1c2ffee3c657ce02ea4 (patch) | |
| tree | 4a428c5e0c026c1bb30e5972e78b145335b4b747 | |
| parent | a415a97461cb10d2c6710871f90f57bd1ca34ec2 (diff) | |
| parent | b3f4a3a5aee93fa2f7ad2597383befbf7b242209 (diff) | |
| download | emacs-b1cf262a79463f28164ea1c2ffee3c657ce02ea4.tar.gz emacs-b1cf262a79463f28164ea1c2ffee3c657ce02ea4.zip | |
Merge from origin/emacs-26
b3f4a3a (origin/emacs-26) Special-case %DUMBFW for GnuTLS between 3.2...
c2ae057 Work around GnuTLS version issues with %DUMBFW (tiny change)
2f9d9ef ; Remove the mention of "plain C code" in the docstring as well
aca827b Merge branch 'widen-less' into emacs-26
87548f5 ; Rephrase NEWS entry a bit
da0d773 (emacs-26) ; * lisp/erc/erc.el: Update URL.
3a60515 * lisp/erc/erc.el (erc-shorten-server-name): Silence compiler...
471b6c1 ; Replace non-ascii quote characters in doc strings etc
7af7f5e Fix some more aliases to user options
79fb4b5 Fix some flymake aliases
b9fbc03 (origin/widen-less) Widen in indent-for-tab-command in the no...
446faf3 Replace the mention of c-indent-defun with js-indent-line
7e9eef0 Consolidate 'widen' calls
# Conflicts:
# etc/NEWS
# lisp/progmodes/flymake-proc.el
| -rw-r--r-- | admin/last-chance.el | 24 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 56 | ||||
| -rw-r--r-- | etc/NEWS.26 | 10 | ||||
| -rw-r--r-- | lisp/cus-edit.el | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 6 | ||||
| -rw-r--r-- | lisp/indent.el | 17 | ||||
| -rw-r--r-- | lisp/progmodes/flymake-proc.el | 141 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/prog-mode.el | 49 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 72 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 1 | ||||
| -rw-r--r-- | lisp/textmodes/mhtml-mode.el | 4 | ||||
| -rw-r--r-- | lisp/winner.el | 2 | ||||
| -rw-r--r-- | src/gnutls.c | 49 | ||||
| -rw-r--r-- | test/lisp/mouse-tests.el | 7 | ||||
| -rw-r--r-- | test/src/emacs-module-tests.el | 5 | ||||
| -rw-r--r-- | test/src/eval-tests.el | 4 | ||||
| -rw-r--r-- | test/src/fns-tests.el | 2 | ||||
| -rw-r--r-- | test/src/regex-tests.el | 4 |
21 files changed, 211 insertions, 271 deletions
diff --git a/admin/last-chance.el b/admin/last-chance.el index 76b8bcf6db1..cd3f78bd595 100644 --- a/admin/last-chance.el +++ b/admin/last-chance.el | |||
| @@ -25,13 +25,13 @@ | |||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; Late 2016. In a recent build, the date in a ChangeLog file | 27 | ;; Late 2016. In a recent build, the date in a ChangeLog file |
| 28 | ;; is not fontified. Turns out the face ‘change-log-date-face’ | 28 | ;; is not fontified. Turns out the face `change-log-date-face' |
| 29 | ;; was declared obsolete since 22.1 and removed 2016-06-23. | 29 | ;; was declared obsolete since 22.1 and removed 2016-06-23. |
| 30 | ;; (compile "git show c430f7e23fc2c22f251ace4254e37dea1452dfc3") | 30 | ;; (compile "git show c430f7e23fc2c22f251ace4254e37dea1452dfc3") |
| 31 | ;; | 31 | ;; |
| 32 | ;; This library provides a command ‘last-chance’, which is a small | 32 | ;; This library provides a command `last-chance', which is a small |
| 33 | ;; combination of "git grep" and some regexp filtering. For example, | 33 | ;; combination of "git grep" and some regexp filtering. For example, |
| 34 | ;; if point is on the symbol ‘change-log-date-face’ in the form: | 34 | ;; if point is on the symbol `change-log-date-face' in the form: |
| 35 | ;; | 35 | ;; |
| 36 | ;; (define-obsolete-face-alias 'change-log-date-face ...) | 36 | ;; (define-obsolete-face-alias 'change-log-date-face ...) |
| 37 | ;; | 37 | ;; |
| @@ -39,7 +39,7 @@ | |||
| 39 | ;; | 39 | ;; |
| 40 | ;; M-x last-chance RET | 40 | ;; M-x last-chance RET |
| 41 | ;; | 41 | ;; |
| 42 | ;; will show you any references to ‘change-log-date-face’ in the | 42 | ;; will show you any references to `change-log-date-face' in the |
| 43 | ;; *.el files in a new buffer (in Grep mode). Hopefully you see | 43 | ;; *.el files in a new buffer (in Grep mode). Hopefully you see |
| 44 | ;; only the obsolete declaration and can proceed w/ its removal. | 44 | ;; only the obsolete declaration and can proceed w/ its removal. |
| 45 | ;; If not, please DTRT and refrain from the removal until those | 45 | ;; If not, please DTRT and refrain from the removal until those |
| @@ -59,17 +59,17 @@ This should include -n, -H, -F.") | |||
| 59 | (defvar last-chance-uninteresting-regexps | 59 | (defvar last-chance-uninteresting-regexps |
| 60 | '("ChangeLog[.0-9]*:" | 60 | '("ChangeLog[.0-9]*:" |
| 61 | "NEWS[-.0-9]*:" | 61 | "NEWS[-.0-9]*:" |
| 62 | ;; Add more ‘flush-lines’ args here. | 62 | ;; Add more `flush-lines' args here. |
| 63 | ) | 63 | ) |
| 64 | "List of regexps that match uninteresting \"git grep\" hits.") | 64 | "List of regexps that match uninteresting \"git grep\" hits.") |
| 65 | 65 | ||
| 66 | (defvar-local last-chance-symbol nil | 66 | (defvar-local last-chance-symbol nil |
| 67 | "Symbol set by ‘last-chance’ for ‘last-chance-cleanup’ to DTRT.") | 67 | "Symbol set by `last-chance' for `last-chance-cleanup' to DTRT.") |
| 68 | 68 | ||
| 69 | (defun last-chance-cleanup (buffer status) | 69 | (defun last-chance-cleanup (buffer status) |
| 70 | "Filter lines in BUFFER; append STATUS and count of removed lines. | 70 | "Filter lines in BUFFER; append STATUS and count of removed lines. |
| 71 | If BUFFER does not seem to be one created by ‘last-chance’, do nothing. | 71 | If BUFFER does not seem to be one created by `last-chance', do nothing. |
| 72 | This function is intended to be added to ‘compilation-finish-functions’." | 72 | This function is intended to be added to `compilation-finish-functions'." |
| 73 | (let ((name (buffer-local-value 'last-chance-symbol buffer)) | 73 | (let ((name (buffer-local-value 'last-chance-symbol buffer)) |
| 74 | bef aft) | 74 | bef aft) |
| 75 | (when name | 75 | (when name |
| @@ -90,10 +90,10 @@ This function is intended to be added to ‘compilation-finish-functions’." | |||
| 90 | 90 | ||
| 91 | (defun last-chance (symbol) | 91 | (defun last-chance (symbol) |
| 92 | "Grep the repo for SYMBOL, filtering the hits. | 92 | "Grep the repo for SYMBOL, filtering the hits. |
| 93 | This uses ‘last-chance-grep-command’ to do the grep and the | 93 | This uses `last-chance-grep-command' to do the grep and the |
| 94 | regexps in ‘last-chance-uninteresting-regexps’ to filter the hits. | 94 | regexps in `last-chance-uninteresting-regexps' to filter the hits. |
| 95 | Grepping is recursive starting under the dir that ‘vc-root-dir’ | 95 | Grepping is recursive starting under the dir that `vc-root-dir' |
| 96 | finds (or the default directory if ‘vc-root-dir’ finds nothing). | 96 | finds (or the default directory if `vc-root-dir' finds nothing). |
| 97 | Output goes to the *grep* buffer. | 97 | Output goes to the *grep* buffer. |
| 98 | 98 | ||
| 99 | Interactively, Emacs queries for a symbol, | 99 | Interactively, Emacs queries for a symbol, |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 9592702ef1c..561ad804344 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -2397,57 +2397,31 @@ text at point (@pxref{Completion in Buffers}). | |||
| 2397 | syntax belongs to a different major mode. Examples include | 2397 | syntax belongs to a different major mode. Examples include |
| 2398 | @dfn{literate programming} source files that combine documentation and | 2398 | @dfn{literate programming} source files that combine documentation and |
| 2399 | snippets of source code, Yacc/Bison programs that include snippets of | 2399 | snippets of source code, Yacc/Bison programs that include snippets of |
| 2400 | plain C code, etc. To correctly indent the embedded chunks, the major | 2400 | Python or JS code, etc. To correctly indent the embedded chunks, the primary |
| 2401 | mode needs to delegate the indentation to another mode's indentation | 2401 | mode needs to delegate the indentation to another mode's indentation |
| 2402 | engine (e.g., call @code{c-indent-defun} for C code or | 2402 | engine (e.g., call @code{js-indent-line} for JS code or |
| 2403 | @code{python-indent-line} for Python), while providing it with some | 2403 | @code{python-indent-line} for Python), while providing it with some |
| 2404 | context to guide the indentation. The following facilities support | 2404 | context to guide the indentation. Major modes, for their part, should |
| 2405 | such multi-mode indentation. | 2405 | avoid calling @code{widen} in their indentation code and obey |
| 2406 | @code{prog-first-column}. | ||
| 2406 | 2407 | ||
| 2407 | @defvar prog-indentation-context | 2408 | @defvar prog-indentation-context |
| 2408 | This variable, when non-@code{nil}, holds the indentation context for | 2409 | This variable, when non-@code{nil}, holds the indentation context for |
| 2409 | the sub-mode's indentation engine provided by the superior major mode. | 2410 | the sub-mode's indentation engine provided by the superior major mode. |
| 2410 | The value should be a list of the form @code{(@var{first-column} | 2411 | The value should be a list of the form @code{(@var{first-column} . @var{rest}}. |
| 2411 | @w{(@var{start} . @var{end})} @code{prev-chunk})}. The members of the | 2412 | The members of the list have the following meaning: |
| 2412 | list have the following meaning: | ||
| 2413 | 2413 | ||
| 2414 | @table @var | 2414 | @table @var |
| 2415 | @item first-column | 2415 | @item first-column |
| 2416 | The column to be used for top-level constructs. This replaces the | 2416 | The column to be used for top-level constructs. This replaces the |
| 2417 | default value of the top-level column used by the sub-mode, usually | 2417 | default value of the top-level column used by the sub-mode, usually |
| 2418 | zero. | 2418 | zero. |
| 2419 | @item start | 2419 | @item rest |
| 2420 | @itemx end | 2420 | This value is currently unused. |
| 2421 | The region of the code chunk to be indented by the sub-mode. The | ||
| 2422 | value of @var{end} can be @code{nil}, which stands for the value of | ||
| 2423 | @code{point-max}. | ||
| 2424 | @item prev-chunk | ||
| 2425 | If this is non-@code{nil}, it should provide the sub-mode's | ||
| 2426 | indentation engine with a virtual context of the code chunk. Valid | ||
| 2427 | values include: | ||
| 2428 | |||
| 2429 | @itemize @minus | ||
| 2430 | @item | ||
| 2431 | A string whose contents is the text the sub-mode's indentation engine | ||
| 2432 | should consider to precede the code chunk. The sub-mode's indentation | ||
| 2433 | engine can add text properties to that string, to be reused in | ||
| 2434 | repeated calls with the same string, thus using it as a cache. An | ||
| 2435 | example where this is useful is code chunks that need to be indented | ||
| 2436 | as function bodies, but lack the function's preamble---the string | ||
| 2437 | could then include that missing preamble. | ||
| 2438 | @item | ||
| 2439 | A function. It is expected to be called with the start position of | ||
| 2440 | the current chunk, and should return a cons cell | ||
| 2441 | @w{@code{(@var{prev-start} . @var{prev-end})}} that specifies the | ||
| 2442 | region of the previous code chunk, or @code{nil} if there is no previous | ||
| 2443 | chunk. This is useful in literate-programming sources, where code is | ||
| 2444 | split into chunks, and correct indentation needs to access previous | ||
| 2445 | chunks. | ||
| 2446 | @end itemize | ||
| 2447 | @end table | 2421 | @end table |
| 2448 | @end defvar | 2422 | @end defvar |
| 2449 | 2423 | ||
| 2450 | The following convenience functions should be used by major mode's | 2424 | The following convenience function should be used by major mode's |
| 2451 | indentation engine in support of invocations as sub-modes of another | 2425 | indentation engine in support of invocations as sub-modes of another |
| 2452 | major mode. | 2426 | major mode. |
| 2453 | 2427 | ||
| @@ -2458,16 +2432,6 @@ function's value is the column number to use for top-level constructs. | |||
| 2458 | When no superior mode is in effect, this function returns zero. | 2432 | When no superior mode is in effect, this function returns zero. |
| 2459 | @end defun | 2433 | @end defun |
| 2460 | 2434 | ||
| 2461 | @defun prog-widen | ||
| 2462 | Call this function instead of @code{widen} to remove any restrictions | ||
| 2463 | imposed by the mode's indentation engine and restore the restrictions | ||
| 2464 | recorded in @code{prog-indentation-context}. This prevents the | ||
| 2465 | indentation engine of a sub-mode from inadvertently operating on text | ||
| 2466 | outside of the chunk it was supposed to indent, and preserves the | ||
| 2467 | restriction imposed by the superior mode. When no superior mode is in | ||
| 2468 | effect, this function just calls @code{widen}. | ||
| 2469 | @end defun | ||
| 2470 | |||
| 2471 | 2435 | ||
| 2472 | @node Region Indent | 2436 | @node Region Indent |
| 2473 | @subsection Indenting an Entire Region | 2437 | @subsection Indenting an Entire Region |
diff --git a/etc/NEWS.26 b/etc/NEWS.26 index 784c608041b..d751adde9b5 100644 --- a/etc/NEWS.26 +++ b/etc/NEWS.26 | |||
| @@ -1119,11 +1119,11 @@ This allows better indentation support in modes that support multiple | |||
| 1119 | programming languages in the same buffer, like literate programming | 1119 | programming languages in the same buffer, like literate programming |
| 1120 | environments or ANTLR programs with embedded Python code. | 1120 | environments or ANTLR programs with embedded Python code. |
| 1121 | 1121 | ||
| 1122 | A major mode can provide indentation context for a sub-mode through | 1122 | A major mode can provide indentation context for a sub-mode. To |
| 1123 | the 'prog-indentation-context' variable. To support this, modes that | 1123 | support this, modes should use 'prog-first-column' instead of a |
| 1124 | provide indentation should use 'prog-widen' instead of 'widen' and | 1124 | literal zero and avoid calling 'widen' in their indentation functions. |
| 1125 | 'prog-first-column' instead of a literal zero. See the node | 1125 | See the node "(elisp) Mode-Specific Indent" in the ELisp manual for |
| 1126 | "(elisp) Mode-Specific Indent" in the ELisp manual for more details. | 1126 | more details. |
| 1127 | 1127 | ||
| 1128 | ** ERC | 1128 | ** ERC |
| 1129 | 1129 | ||
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index e0a00d4337f..f9f4063e962 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4825,6 +4825,8 @@ If several parents are listed, go to the first of them." | |||
| 4825 | (parent (downcase (widget-get button :tag)))) | 4825 | (parent (downcase (widget-get button :tag)))) |
| 4826 | (customize-group parent))))) | 4826 | (customize-group parent))))) |
| 4827 | 4827 | ||
| 4828 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") | ||
| 4829 | |||
| 4828 | (defcustom Custom-mode-hook nil | 4830 | (defcustom Custom-mode-hook nil |
| 4829 | "Hook called when entering Custom mode." | 4831 | "Hook called when entering Custom mode." |
| 4830 | :type 'hook | 4832 | :type 'hook |
| @@ -4853,7 +4855,6 @@ If several parents are listed, go to the first of them." | |||
| 4853 | (setq-local widget-link-suffix "")) | 4855 | (setq-local widget-link-suffix "")) |
| 4854 | (setq show-trailing-whitespace nil)) | 4856 | (setq show-trailing-whitespace nil)) |
| 4855 | 4857 | ||
| 4856 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") | ||
| 4857 | (define-derived-mode Custom-mode nil "Custom" | 4858 | (define-derived-mode Custom-mode nil "Custom" |
| 4858 | "Major mode for editing customization buffers. | 4859 | "Major mode for editing customization buffers. |
| 4859 | 4860 | ||
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 25f738cb8ec..e08e0d92863 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1253,7 +1253,7 @@ function directly; use `byte-compile-warn' or | |||
| 1253 | (defun byte-compile-report-error (error-info &optional fill) | 1253 | (defun byte-compile-report-error (error-info &optional fill) |
| 1254 | "Report Lisp error in compilation. | 1254 | "Report Lisp error in compilation. |
| 1255 | ERROR-INFO is the error data, in the form of either (ERROR-SYMBOL . DATA) | 1255 | ERROR-INFO is the error data, in the form of either (ERROR-SYMBOL . DATA) |
| 1256 | or STRING. If FILL is non-nil, set ‘warning-fill-prefix’ to four spaces | 1256 | or STRING. If FILL is non-nil, set `warning-fill-prefix' to four spaces |
| 1257 | when printing the error message." | 1257 | when printing the error message." |
| 1258 | (setq byte-compiler-error-flag t) | 1258 | (setq byte-compiler-error-flag t) |
| 1259 | (byte-compile-log-warning | 1259 | (byte-compile-log-warning |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index bda8dc1e714..493d69b8e08 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | ;; For more information, see the following URLs: | 37 | ;; For more information, see the following URLs: |
| 38 | ;; * https://sv.gnu.org/projects/erc/ | 38 | ;; * https://sv.gnu.org/projects/erc/ |
| 39 | ;; * http://www.emacswiki.org/cgi-bin/wiki/ERC | 39 | ;; * https://www.emacswiki.org/emacs/ERC |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | 42 | ||
| @@ -77,12 +77,12 @@ | |||
| 77 | (require 'erc-compat) | 77 | (require 'erc-compat) |
| 78 | 78 | ||
| 79 | (defvar erc-official-location | 79 | (defvar erc-official-location |
| 80 | "https://emacswiki.org/cgi-bin/wiki/ERC (mailing list: erc-discuss@gnu.org)" | 80 | "https://www.emacswiki.org/emacs/ERC (mailing list: erc-discuss@gnu.org)" |
| 81 | "Location of the ERC client on the Internet.") | 81 | "Location of the ERC client on the Internet.") |
| 82 | 82 | ||
| 83 | (defgroup erc nil | 83 | (defgroup erc nil |
| 84 | "Emacs Internet Relay Chat client." | 84 | "Emacs Internet Relay Chat client." |
| 85 | :link '(url-link "http://www.emacswiki.org/cgi-bin/wiki/ERC") | 85 | :link '(url-link "https://www.emacswiki.org/emacs/ERC") |
| 86 | :link '(custom-manual "(erc) Top") | 86 | :link '(custom-manual "(erc) Top") |
| 87 | :prefix "erc-" | 87 | :prefix "erc-" |
| 88 | :group 'applications) | 88 | :group 'applications) |
| @@ -124,8 +124,6 @@ | |||
| 124 | "Running scripts at startup and with /LOAD" | 124 | "Running scripts at startup and with /LOAD" |
| 125 | :group 'erc) | 125 | :group 'erc) |
| 126 | 126 | ||
| 127 | (require 'erc-backend) | ||
| 128 | |||
| 129 | ;; compatibility with older ERC releases | 127 | ;; compatibility with older ERC releases |
| 130 | 128 | ||
| 131 | (define-obsolete-variable-alias 'erc-announced-server-name | 129 | (define-obsolete-variable-alias 'erc-announced-server-name |
| @@ -137,6 +135,8 @@ | |||
| 137 | (define-obsolete-function-alias 'erc-send-command | 135 | (define-obsolete-function-alias 'erc-send-command |
| 138 | 'erc-server-send "ERC 5.1") | 136 | 'erc-server-send "ERC 5.1") |
| 139 | 137 | ||
| 138 | (require 'erc-backend) | ||
| 139 | |||
| 140 | ;; tunable connection and authentication parameters | 140 | ;; tunable connection and authentication parameters |
| 141 | 141 | ||
| 142 | (defcustom erc-server nil | 142 | (defcustom erc-server nil |
| @@ -6260,11 +6260,11 @@ This should be a string with substitution variables recognized by | |||
| 6260 | :group 'erc-mode-line-and-header | 6260 | :group 'erc-mode-line-and-header |
| 6261 | :type 'string) | 6261 | :type 'string) |
| 6262 | 6262 | ||
| 6263 | (defun erc-shorten-server-name (server-name) | 6263 | (defun erc-shorten-server-name (server) |
| 6264 | "Shorten SERVER-NAME according to `erc-common-server-suffixes'." | 6264 | "Shorten SERVER name according to `erc-common-server-suffixes'." |
| 6265 | (if (stringp server-name) | 6265 | (if (stringp server) |
| 6266 | (with-temp-buffer | 6266 | (with-temp-buffer |
| 6267 | (insert server-name) | 6267 | (insert server) |
| 6268 | (let ((alist erc-common-server-suffixes)) | 6268 | (let ((alist erc-common-server-suffixes)) |
| 6269 | (while alist | 6269 | (while alist |
| 6270 | (goto-char (point-min)) | 6270 | (goto-char (point-min)) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 6053d33223a..c4bbf3c898b 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -6246,14 +6246,14 @@ they are." | |||
| 6246 | (declare-function beginning-of-visual-line "simple" (&optional n)) | 6246 | (declare-function beginning-of-visual-line "simple" (&optional n)) |
| 6247 | 6247 | ||
| 6248 | (defun message-beginning-of-header (handle-folded) | 6248 | (defun message-beginning-of-header (handle-folded) |
| 6249 | "Move point to beginning of header’s value. | 6249 | "Move point to beginning of header's value. |
| 6250 | 6250 | ||
| 6251 | When point is at the first header line, moves it after the colon | 6251 | When point is at the first header line, moves it after the colon |
| 6252 | and spaces separating header name and header value. | 6252 | and spaces separating header name and header value. |
| 6253 | 6253 | ||
| 6254 | When point is in a continuation line of a folded header (i.e. the | 6254 | When point is in a continuation line of a folded header (i.e. the |
| 6255 | line starts with a space), the behavior depends on HANDLE-FOLDED | 6255 | line starts with a space), the behavior depends on HANDLE-FOLDED |
| 6256 | argument. If it’s nil, function moves the point to the start of | 6256 | argument. If it's nil, function moves the point to the start of |
| 6257 | the header continuation; otherwise, function locates the | 6257 | the header continuation; otherwise, function locates the |
| 6258 | beginning of the header and moves point past the colon as is the | 6258 | beginning of the header and moves point past the colon as is the |
| 6259 | case of single-line headers. | 6259 | case of single-line headers. |
| @@ -6261,7 +6261,7 @@ case of single-line headers. | |||
| 6261 | No check whether point is inside of a header or body of the | 6261 | No check whether point is inside of a header or body of the |
| 6262 | message is performed. | 6262 | message is performed. |
| 6263 | 6263 | ||
| 6264 | Returns point or nil if beginning of header’s value could not be | 6264 | Returns point or nil if beginning of header's value could not be |
| 6265 | found. In the latter case, the point is still moved to the | 6265 | found. In the latter case, the point is still moved to the |
| 6266 | beginning of line (possibly after attempting to move it to the | 6266 | beginning of line (possibly after attempting to move it to the |
| 6267 | beginning of a folded header)." | 6267 | beginning of a folded header)." |
diff --git a/lisp/indent.el b/lisp/indent.el index d5ba0bd8491..400280f615a 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -69,6 +69,8 @@ variable is `indent-relative' or `indent-relative-maybe', handle | |||
| 69 | it specially (since those functions are used for tabbing); in | 69 | it specially (since those functions are used for tabbing); in |
| 70 | that case, indent by aligning to the previous non-blank line." | 70 | that case, indent by aligning to the previous non-blank line." |
| 71 | (interactive) | 71 | (interactive) |
| 72 | (save-restriction | ||
| 73 | (widen) | ||
| 72 | (syntax-propertize (line-end-position)) | 74 | (syntax-propertize (line-end-position)) |
| 73 | (if (memq indent-line-function | 75 | (if (memq indent-line-function |
| 74 | '(indent-relative indent-relative-maybe)) | 76 | '(indent-relative indent-relative-maybe)) |
| @@ -84,7 +86,7 @@ that case, indent by aligning to the previous non-blank line." | |||
| 84 | (indent-line-to column) | 86 | (indent-line-to column) |
| 85 | (save-excursion (indent-line-to column)))) | 87 | (save-excursion (indent-line-to column)))) |
| 86 | ;; The normal case. | 88 | ;; The normal case. |
| 87 | (funcall indent-line-function))) | 89 | (funcall indent-line-function)))) |
| 88 | 90 | ||
| 89 | (defun indent--default-inside-comment () | 91 | (defun indent--default-inside-comment () |
| 90 | (unless (or (> (current-column) (current-indentation)) | 92 | (unless (or (> (current-column) (current-indentation)) |
| @@ -140,11 +142,11 @@ prefix argument is ignored." | |||
| 140 | (old-indent (current-indentation))) | 142 | (old-indent (current-indentation))) |
| 141 | 143 | ||
| 142 | ;; Indent the line. | 144 | ;; Indent the line. |
| 143 | (or (not (eq (funcall indent-line-function) 'noindent)) | 145 | (or (not (eq (indent--funcall-widened indent-line-function) 'noindent)) |
| 144 | (indent--default-inside-comment) | 146 | (indent--default-inside-comment) |
| 145 | (when (or (<= (current-column) (current-indentation)) | 147 | (when (or (<= (current-column) (current-indentation)) |
| 146 | (not (eq tab-always-indent 'complete))) | 148 | (not (eq tab-always-indent 'complete))) |
| 147 | (funcall (default-value 'indent-line-function)))) | 149 | (indent--funcall-widened (default-value 'indent-line-function)))) |
| 148 | 150 | ||
| 149 | (cond | 151 | (cond |
| 150 | ;; If the text was already indented right, try completion. | 152 | ;; If the text was already indented right, try completion. |
| @@ -166,6 +168,11 @@ prefix argument is ignored." | |||
| 166 | (< (point) end-marker)) | 168 | (< (point) end-marker)) |
| 167 | (indent-rigidly (point) end-marker indentation-change)))))))))) | 169 | (indent-rigidly (point) end-marker indentation-change)))))))))) |
| 168 | 170 | ||
| 171 | (defun indent--funcall-widened (func) | ||
| 172 | (save-restriction | ||
| 173 | (widen) | ||
| 174 | (funcall func))) | ||
| 175 | |||
| 169 | (defun insert-tab (&optional arg) | 176 | (defun insert-tab (&optional arg) |
| 170 | (let ((count (prefix-numeric-value arg))) | 177 | (let ((count (prefix-numeric-value arg))) |
| 171 | (if (and abbrev-mode | 178 | (if (and abbrev-mode |
| @@ -538,7 +545,9 @@ column to indent to; if it is nil, use one of the three methods above." | |||
| 538 | (forward-line 1))))) | 545 | (forward-line 1))))) |
| 539 | ;; Use indent-region-function is available. | 546 | ;; Use indent-region-function is available. |
| 540 | (indent-region-function | 547 | (indent-region-function |
| 541 | (funcall indent-region-function start end)) | 548 | (save-restriction |
| 549 | (widen) | ||
| 550 | (funcall indent-region-function start end))) | ||
| 542 | ;; Else, use a default implementation that calls indent-line-function on | 551 | ;; Else, use a default implementation that calls indent-line-function on |
| 543 | ;; each line. | 552 | ;; each line. |
| 544 | (t (indent-region-line-by-line start end))) | 553 | (t (indent-region-line-by-line start end))) |
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index e207de5da6c..b11ae09bed2 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el | |||
| @@ -45,11 +45,17 @@ | |||
| 45 | 45 | ||
| 46 | (require 'flymake) | 46 | (require 'flymake) |
| 47 | 47 | ||
| 48 | (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check | ||
| 49 | 'flymake-proc-compilation-prevents-syntax-check "26.1") | ||
| 50 | |||
| 48 | (defcustom flymake-proc-compilation-prevents-syntax-check t | 51 | (defcustom flymake-proc-compilation-prevents-syntax-check t |
| 49 | "If non-nil, don't start syntax check if compilation is running." | 52 | "If non-nil, don't start syntax check if compilation is running." |
| 50 | :group 'flymake | 53 | :group 'flymake |
| 51 | :type 'boolean) | 54 | :type 'boolean) |
| 52 | 55 | ||
| 56 | (define-obsolete-variable-alias 'flymake-xml-program | ||
| 57 | 'flymake-proc-xml-program "26.1") | ||
| 58 | |||
| 53 | (defcustom flymake-proc-xml-program | 59 | (defcustom flymake-proc-xml-program |
| 54 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") | 60 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") |
| 55 | "Program to use for XML validation." | 61 | "Program to use for XML validation." |
| @@ -57,11 +63,17 @@ | |||
| 57 | :group 'flymake | 63 | :group 'flymake |
| 58 | :version "24.4") | 64 | :version "24.4") |
| 59 | 65 | ||
| 66 | (define-obsolete-variable-alias 'flymake-master-file-dirs | ||
| 67 | 'flymake-proc-master-file-dirs "26.1") | ||
| 68 | |||
| 60 | (defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest") | 69 | (defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest") |
| 61 | "Dirs where to look for master files." | 70 | "Dirs where to look for master files." |
| 62 | :group 'flymake | 71 | :group 'flymake |
| 63 | :type '(repeat (string))) | 72 | :type '(repeat (string))) |
| 64 | 73 | ||
| 74 | (define-obsolete-variable-alias 'flymake-master-file-count-limit | ||
| 75 | 'flymake-proc-master-file-count-limit "26.1") | ||
| 76 | |||
| 65 | (defcustom flymake-proc-master-file-count-limit 32 | 77 | (defcustom flymake-proc-master-file-count-limit 32 |
| 66 | "Max number of master files to check." | 78 | "Max number of master files to check." |
| 67 | :group 'flymake | 79 | :group 'flymake |
| @@ -74,6 +86,9 @@ Overrides `flymake-proc-allowed-file-name-masks'." | |||
| 74 | :type '(repeat (regexp)) | 86 | :type '(repeat (regexp)) |
| 75 | :version "27.1") | 87 | :version "27.1") |
| 76 | 88 | ||
| 89 | (define-obsolete-variable-alias 'flymake-allowed-file-name-masks | ||
| 90 | 'flymake-proc-allowed-file-name-masks "26.1") | ||
| 91 | |||
| 77 | (defcustom flymake-proc-allowed-file-name-masks | 92 | (defcustom flymake-proc-allowed-file-name-masks |
| 78 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" | 93 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" |
| 79 | flymake-proc-simple-make-init | 94 | flymake-proc-simple-make-init |
| @@ -1133,76 +1148,62 @@ Use CREATE-TEMP-F for creating temp copy." | |||
| 1133 | 1148 | ||
| 1134 | ;;;; | 1149 | ;;;; |
| 1135 | 1150 | ||
| 1136 | (progn | 1151 | (define-obsolete-variable-alias 'flymake-check-file-limit |
| 1137 | (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check | 1152 | 'flymake-proc-check-file-limit "26.1") |
| 1138 | 'flymake-proc-compilation-prevents-syntax-check "26.1") | 1153 | (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el |
| 1139 | (define-obsolete-variable-alias 'flymake-xml-program | 1154 | 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1") |
| 1140 | 'flymake-proc-xml-program "26.1") | 1155 | (define-obsolete-variable-alias 'flymake-err-line-patterns |
| 1141 | (define-obsolete-variable-alias 'flymake-master-file-dirs | 1156 | 'flymake-proc-err-line-patterns "26.1") |
| 1142 | 'flymake-proc-master-file-dirs "26.1") | 1157 | (define-obsolete-function-alias 'flymake-parse-line |
| 1143 | (define-obsolete-variable-alias 'flymake-master-file-count-limit | 1158 | 'flymake-proc-parse-line "26.1") |
| 1144 | 'flymake-proc-master-file-count-limit "26.1" | 1159 | (define-obsolete-function-alias 'flymake-get-include-dirs |
| 1145 | "Max number of master files to check.") | 1160 | 'flymake-proc-get-include-dirs "26.1") |
| 1146 | (define-obsolete-variable-alias 'flymake-allowed-file-name-masks | 1161 | (define-obsolete-function-alias 'flymake-stop-all-syntax-checks |
| 1147 | 'flymake-proc-allowed-file-name-masks "26.1") | 1162 | 'flymake-proc-stop-all-syntax-checks "26.1") |
| 1148 | (define-obsolete-variable-alias 'flymake-check-file-limit | 1163 | (define-obsolete-function-alias 'flymake-compile |
| 1149 | 'flymake-proc-check-file-limit "26.1") | 1164 | 'flymake-proc-compile "26.1") |
| 1150 | (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el | 1165 | (define-obsolete-function-alias 'flymake-create-temp-inplace |
| 1151 | 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1") | 1166 | 'flymake-proc-create-temp-inplace "26.1") |
| 1152 | (define-obsolete-variable-alias 'flymake-err-line-patterns | 1167 | (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure |
| 1153 | 'flymake-proc-err-line-patterns "26.1") | 1168 | 'flymake-proc-create-temp-with-folder-structure "26.1") |
| 1154 | (define-obsolete-function-alias 'flymake-parse-line | 1169 | (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy |
| 1155 | 'flymake-proc-parse-line "26.1") | 1170 | 'flymake-proc-init-create-temp-buffer-copy "26.1") |
| 1156 | (define-obsolete-function-alias 'flymake-get-include-dirs | 1171 | (define-obsolete-function-alias 'flymake-simple-cleanup |
| 1157 | 'flymake-proc-get-include-dirs "26.1") | 1172 | 'flymake-proc-simple-cleanup "26.1") |
| 1158 | (define-obsolete-function-alias 'flymake-stop-all-syntax-checks | 1173 | (define-obsolete-function-alias 'flymake-get-real-file-name |
| 1159 | 'flymake-proc-stop-all-syntax-checks "26.1") | 1174 | 'flymake-proc-get-real-file-name "26.1") |
| 1160 | (define-obsolete-function-alias 'flymake-compile | 1175 | (define-obsolete-function-alias 'flymake-master-cleanup |
| 1161 | 'flymake-proc-compile "26.1") | 1176 | 'flymake-proc-master-cleanup "26.1") |
| 1162 | (define-obsolete-function-alias 'flymake-create-temp-inplace | 1177 | (define-obsolete-function-alias 'flymake-get-make-cmdline |
| 1163 | 'flymake-proc-create-temp-inplace "26.1") | 1178 | 'flymake-proc-get-make-cmdline "26.1") |
| 1164 | (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure | 1179 | (define-obsolete-function-alias 'flymake-get-ant-cmdline |
| 1165 | 'flymake-proc-create-temp-with-folder-structure "26.1") | 1180 | 'flymake-proc-get-ant-cmdline "26.1") |
| 1166 | (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy | 1181 | (define-obsolete-function-alias 'flymake-simple-make-init-impl |
| 1167 | 'flymake-proc-init-create-temp-buffer-copy "26.1") | 1182 | 'flymake-proc-simple-make-init-impl "26.1") |
| 1168 | (define-obsolete-function-alias 'flymake-simple-cleanup | 1183 | (define-obsolete-function-alias 'flymake-simple-make-init |
| 1169 | 'flymake-proc-simple-cleanup "26.1") | 1184 | 'flymake-proc-simple-make-init "26.1") |
| 1170 | (define-obsolete-function-alias 'flymake-get-real-file-name | 1185 | (define-obsolete-function-alias 'flymake-master-make-init |
| 1171 | 'flymake-proc-get-real-file-name "26.1") | 1186 | 'flymake-proc-master-make-init "26.1") |
| 1172 | (define-obsolete-function-alias 'flymake-master-cleanup | 1187 | (define-obsolete-function-alias 'flymake-find-make-buildfile |
| 1173 | 'flymake-proc-master-cleanup "26.1") | 1188 | 'flymake-proc--find-make-buildfile "26.1") |
| 1174 | (define-obsolete-function-alias 'flymake-get-make-cmdline | 1189 | (define-obsolete-function-alias 'flymake-master-make-header-init |
| 1175 | 'flymake-proc-get-make-cmdline "26.1") | 1190 | 'flymake-proc-master-make-header-init "26.1") |
| 1176 | (define-obsolete-function-alias 'flymake-get-ant-cmdline | 1191 | (define-obsolete-function-alias 'flymake-simple-make-java-init |
| 1177 | 'flymake-proc-get-ant-cmdline "26.1") | 1192 | 'flymake-proc-simple-make-java-init "26.1") |
| 1178 | (define-obsolete-function-alias 'flymake-simple-make-init-impl | 1193 | (define-obsolete-function-alias 'flymake-simple-ant-java-init |
| 1179 | 'flymake-proc-simple-make-init-impl "26.1") | 1194 | 'flymake-proc-simple-ant-java-init "26.1") |
| 1180 | (define-obsolete-function-alias 'flymake-simple-make-init | 1195 | (define-obsolete-function-alias 'flymake-simple-java-cleanup |
| 1181 | 'flymake-proc-simple-make-init "26.1") | 1196 | 'flymake-proc-simple-java-cleanup "26.1") |
| 1182 | (define-obsolete-function-alias 'flymake-master-make-init | 1197 | (define-obsolete-function-alias 'flymake-perl-init |
| 1183 | 'flymake-proc-master-make-init "26.1") | 1198 | 'flymake-proc-perl-init "26.1") |
| 1184 | (define-obsolete-function-alias 'flymake-find-make-buildfile | 1199 | (define-obsolete-function-alias 'flymake-php-init |
| 1185 | 'flymake-proc--find-make-buildfile "26.1") | 1200 | 'flymake-proc-php-init "26.1") |
| 1186 | (define-obsolete-function-alias 'flymake-master-make-header-init | 1201 | (define-obsolete-function-alias 'flymake-simple-tex-init |
| 1187 | 'flymake-proc-master-make-header-init "26.1") | 1202 | 'flymake-proc-simple-tex-init "26.1") |
| 1188 | (define-obsolete-function-alias 'flymake-simple-make-java-init | 1203 | (define-obsolete-function-alias 'flymake-master-tex-init |
| 1189 | 'flymake-proc-simple-make-java-init "26.1") | 1204 | 'flymake-proc-master-tex-init "26.1") |
| 1190 | (define-obsolete-function-alias 'flymake-simple-ant-java-init | 1205 | (define-obsolete-function-alias 'flymake-xml-init |
| 1191 | 'flymake-proc-simple-ant-java-init "26.1") | 1206 | 'flymake-proc-xml-init "26.1") |
| 1192 | (define-obsolete-function-alias 'flymake-simple-java-cleanup | ||
| 1193 | 'flymake-proc-simple-java-cleanup "26.1") | ||
| 1194 | (define-obsolete-function-alias 'flymake-perl-init | ||
| 1195 | 'flymake-proc-perl-init "26.1") | ||
| 1196 | (define-obsolete-function-alias 'flymake-php-init | ||
| 1197 | 'flymake-proc-php-init "26.1") | ||
| 1198 | (define-obsolete-function-alias 'flymake-simple-tex-init | ||
| 1199 | 'flymake-proc-simple-tex-init "26.1") | ||
| 1200 | (define-obsolete-function-alias 'flymake-master-tex-init | ||
| 1201 | 'flymake-proc-master-tex-init "26.1") | ||
| 1202 | (define-obsolete-function-alias 'flymake-xml-init | ||
| 1203 | 'flymake-proc-xml-init "26.1")) | ||
| 1204 | |||
| 1205 | |||
| 1206 | 1207 | ||
| 1207 | (provide 'flymake-proc) | 1208 | (provide 'flymake-proc) |
| 1208 | ;;; flymake-proc.el ends here | 1209 | ;;; flymake-proc.el ends here |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index f23af82d354..608074281f9 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -124,15 +124,15 @@ If nil, never start checking buffer automatically like this." | |||
| 124 | (make-obsolete-variable 'flymake-gui-warnings-enabled | 124 | (make-obsolete-variable 'flymake-gui-warnings-enabled |
| 125 | "it no longer has any effect." "26.1") | 125 | "it no longer has any effect." "26.1") |
| 126 | 126 | ||
| 127 | (define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file | ||
| 128 | 'flymake-start-on-flymake-mode "26.1") | ||
| 129 | |||
| 127 | (defcustom flymake-start-on-flymake-mode t | 130 | (defcustom flymake-start-on-flymake-mode t |
| 128 | "Start syntax check when `flymake-mode' is enabled. | 131 | "Start syntax check when `flymake-mode' is enabled. |
| 129 | Specifically, start it when the buffer is actually displayed." | 132 | Specifically, start it when the buffer is actually displayed." |
| 130 | :version "26.1" | 133 | :version "26.1" |
| 131 | :type 'boolean) | 134 | :type 'boolean) |
| 132 | 135 | ||
| 133 | (define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file | ||
| 134 | 'flymake-start-on-flymake-mode "26.1") | ||
| 135 | |||
| 136 | (defcustom flymake-log-level -1 | 136 | (defcustom flymake-log-level -1 |
| 137 | "Obsolete and ignored variable." | 137 | "Obsolete and ignored variable." |
| 138 | :type 'integer) | 138 | :type 'integer) |
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index f727e458b2b..f46e6da73da 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el | |||
| @@ -53,8 +53,8 @@ | |||
| 53 | "When non-nil, provides context for indenting embedded code chunks. | 53 | "When non-nil, provides context for indenting embedded code chunks. |
| 54 | 54 | ||
| 55 | There are languages where part of the code is actually written in | 55 | There are languages where part of the code is actually written in |
| 56 | a sub language, e.g., a Yacc/Bison or ANTLR grammar also consists | 56 | a sub language, e.g., a Yacc/Bison or ANTLR grammar can also include |
| 57 | of plain C code. This variable enables the major mode of the | 57 | JS or Python code. This variable enables the primary mode of the |
| 58 | main language to use the indentation engine of the sub-mode for | 58 | main language to use the indentation engine of the sub-mode for |
| 59 | lines in code chunks written in the sub-mode's language. | 59 | lines in code chunks written in the sub-mode's language. |
| 60 | 60 | ||
| @@ -64,37 +64,13 @@ mode, it should bind this variable to non-nil around the call. | |||
| 64 | 64 | ||
| 65 | The non-nil value should be a list of the form: | 65 | The non-nil value should be a list of the form: |
| 66 | 66 | ||
| 67 | (FIRST-COLUMN (START . END) PREVIOUS-CHUNKS) | 67 | (FIRST-COLUMN . REST) |
| 68 | 68 | ||
| 69 | FIRST-COLUMN is the column the indentation engine of the sub-mode | 69 | FIRST-COLUMN is the column the indentation engine of the sub-mode |
| 70 | should use for top-level language constructs inside the code | 70 | should use for top-level language constructs inside the code |
| 71 | chunk (instead of 0). | 71 | chunk (instead of 0). |
| 72 | 72 | ||
| 73 | START and END specify the region of the code chunk. END can be | 73 | REST is currently unused.") |
| 74 | nil, which stands for the value of `point-max'. The function | ||
| 75 | `prog-widen' uses this to restore restrictions imposed by the | ||
| 76 | sub-mode's indentation engine. | ||
| 77 | |||
| 78 | PREVIOUS-CHUNKS, if non-nil, provides the indentation engine of | ||
| 79 | the sub-mode with the virtual context of the code chunk. Valid | ||
| 80 | values are: | ||
| 81 | |||
| 82 | - A string containing text which the indentation engine can | ||
| 83 | consider as standing in front of the code chunk. To cache the | ||
| 84 | string's calculated syntactic information for repeated calls | ||
| 85 | with the same string, the sub-mode can add text-properties to | ||
| 86 | the string. | ||
| 87 | |||
| 88 | A typical use case is for grammars with code chunks which are | ||
| 89 | to be indented like function bodies -- the string would contain | ||
| 90 | the corresponding function preamble. | ||
| 91 | |||
| 92 | - A function, to be called with the start position of the current | ||
| 93 | chunk. It should return either the region of the previous chunk | ||
| 94 | as (PREV-START . PREV-END), or nil if there is no previous chunk. | ||
| 95 | |||
| 96 | A typical use case are literate programming sources -- the | ||
| 97 | function would successively return the previous code chunks.") | ||
| 98 | 74 | ||
| 99 | (defun prog-indent-sexp (&optional defun) | 75 | (defun prog-indent-sexp (&optional defun) |
| 100 | "Indent the expression after point. | 76 | "Indent the expression after point. |
| @@ -113,23 +89,6 @@ instead." | |||
| 113 | "Return the indentation column normally used for top-level constructs." | 89 | "Return the indentation column normally used for top-level constructs." |
| 114 | (or (car prog-indentation-context) 0)) | 90 | (or (car prog-indentation-context) 0)) |
| 115 | 91 | ||
| 116 | (defun prog-widen () | ||
| 117 | "Remove restrictions (narrowing) from current code chunk or buffer. | ||
| 118 | This function should be used instead of `widen' in any function used | ||
| 119 | by the indentation engine to make it respect the value of | ||
| 120 | `prog-indentation-context'. | ||
| 121 | |||
| 122 | This function (like `widen') is useful inside a | ||
| 123 | `save-restriction' to make the indentation correctly work when | ||
| 124 | narrowing is in effect." | ||
| 125 | (let ((chunk (cadr prog-indentation-context))) | ||
| 126 | (if chunk | ||
| 127 | ;; No call to `widen' is necessary here, as narrow-to-region | ||
| 128 | ;; changes (not just narrows) the existing restrictions | ||
| 129 | (narrow-to-region (car chunk) (or (cdr chunk) (point-max))) | ||
| 130 | (widen)))) | ||
| 131 | |||
| 132 | |||
| 133 | (defvar-local prettify-symbols-alist nil | 92 | (defvar-local prettify-symbols-alist nil |
| 134 | "Alist of symbol prettifications. | 93 | "Alist of symbol prettifications. |
| 135 | Each element looks like (SYMBOL . CHARACTER), where the symbol | 94 | Each element looks like (SYMBOL . CHARACTER), where the symbol |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 035d93f7b99..a72a55d2d9a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -287,10 +287,6 @@ | |||
| 287 | ;;; 24.x Compat | 287 | ;;; 24.x Compat |
| 288 | 288 | ||
| 289 | 289 | ||
| 290 | (unless (fboundp 'prog-widen) | ||
| 291 | (defun prog-widen () | ||
| 292 | (widen))) | ||
| 293 | |||
| 294 | (unless (fboundp 'prog-first-column) | 290 | (unless (fboundp 'prog-first-column) |
| 295 | (defun prog-first-column () | 291 | (defun prog-first-column () |
| 296 | 0)) | 292 | 0)) |
| @@ -725,12 +721,18 @@ It makes underscores and dots word constituent chars.") | |||
| 725 | 721 | ||
| 726 | ;;; Indentation | 722 | ;;; Indentation |
| 727 | 723 | ||
| 724 | (define-obsolete-variable-alias | ||
| 725 | 'python-indent 'python-indent-offset "24.3") | ||
| 726 | |||
| 728 | (defcustom python-indent-offset 4 | 727 | (defcustom python-indent-offset 4 |
| 729 | "Default indentation offset for Python." | 728 | "Default indentation offset for Python." |
| 730 | :group 'python | 729 | :group 'python |
| 731 | :type 'integer | 730 | :type 'integer |
| 732 | :safe 'integerp) | 731 | :safe 'integerp) |
| 733 | 732 | ||
| 733 | (define-obsolete-variable-alias | ||
| 734 | 'python-guess-indent 'python-indent-guess-indent-offset "24.3") | ||
| 735 | |||
| 734 | (defcustom python-indent-guess-indent-offset t | 736 | (defcustom python-indent-guess-indent-offset t |
| 735 | "Non-nil tells Python mode to guess `python-indent-offset' value." | 737 | "Non-nil tells Python mode to guess `python-indent-offset' value." |
| 736 | :type 'boolean | 738 | :type 'boolean |
| @@ -750,12 +752,6 @@ It makes underscores and dots word constituent chars.") | |||
| 750 | :type '(repeat symbol) | 752 | :type '(repeat symbol) |
| 751 | :group 'python) | 753 | :group 'python) |
| 752 | 754 | ||
| 753 | (define-obsolete-variable-alias | ||
| 754 | 'python-indent 'python-indent-offset "24.3") | ||
| 755 | |||
| 756 | (define-obsolete-variable-alias | ||
| 757 | 'python-guess-indent 'python-indent-guess-indent-offset "24.3") | ||
| 758 | |||
| 759 | (defvar python-indent-current-level 0 | 755 | (defvar python-indent-current-level 0 |
| 760 | "Deprecated var available for compatibility.") | 756 | "Deprecated var available for compatibility.") |
| 761 | 757 | ||
| @@ -785,7 +781,7 @@ work on `python-indent-calculate-indentation' instead." | |||
| 785 | (interactive) | 781 | (interactive) |
| 786 | (save-excursion | 782 | (save-excursion |
| 787 | (save-restriction | 783 | (save-restriction |
| 788 | (prog-widen) | 784 | (widen) |
| 789 | (goto-char (point-min)) | 785 | (goto-char (point-min)) |
| 790 | (let ((block-end)) | 786 | (let ((block-end)) |
| 791 | (while (and (not block-end) | 787 | (while (and (not block-end) |
| @@ -883,8 +879,6 @@ keyword | |||
| 883 | :at-dedenter-block-start | 879 | :at-dedenter-block-start |
| 884 | - Point is on a line starting a dedenter block. | 880 | - Point is on a line starting a dedenter block. |
| 885 | - START is the position where the dedenter block starts." | 881 | - START is the position where the dedenter block starts." |
| 886 | (save-restriction | ||
| 887 | (prog-widen) | ||
| 888 | (let ((ppss (save-excursion | 882 | (let ((ppss (save-excursion |
| 889 | (beginning-of-line) | 883 | (beginning-of-line) |
| 890 | (syntax-ppss)))) | 884 | (syntax-ppss)))) |
| @@ -1022,7 +1016,7 @@ keyword | |||
| 1022 | (looking-at (python-rx block-ender))) | 1016 | (looking-at (python-rx block-ender))) |
| 1023 | :after-block-end) | 1017 | :after-block-end) |
| 1024 | (t :after-line)) | 1018 | (t :after-line)) |
| 1025 | (point))))))))) | 1019 | (point)))))))) |
| 1026 | 1020 | ||
| 1027 | (defun python-indent--calculate-indentation () | 1021 | (defun python-indent--calculate-indentation () |
| 1028 | "Internal implementation of `python-indent-calculate-indentation'. | 1022 | "Internal implementation of `python-indent-calculate-indentation'. |
| @@ -1030,8 +1024,6 @@ May return an integer for the maximum possible indentation at | |||
| 1030 | current context or a list of integers. The latter case is only | 1024 | current context or a list of integers. The latter case is only |
| 1031 | happening for :at-dedenter-block-start context since the | 1025 | happening for :at-dedenter-block-start context since the |
| 1032 | possibilities can be narrowed to specific indentation points." | 1026 | possibilities can be narrowed to specific indentation points." |
| 1033 | (save-restriction | ||
| 1034 | (prog-widen) | ||
| 1035 | (save-excursion | 1027 | (save-excursion |
| 1036 | (pcase (python-indent-context) | 1028 | (pcase (python-indent-context) |
| 1037 | (`(:no-indent . ,_) (prog-first-column)) ; usually 0 | 1029 | (`(:no-indent . ,_) (prog-first-column)) ; usually 0 |
| @@ -1081,7 +1073,7 @@ possibilities can be narrowed to specific indentation points." | |||
| 1081 | (`(,(or :inside-paren-newline-start-from-block) . ,start) | 1073 | (`(,(or :inside-paren-newline-start-from-block) . ,start) |
| 1082 | ;; Add two indentation levels to make the suite stand out. | 1074 | ;; Add two indentation levels to make the suite stand out. |
| 1083 | (goto-char start) | 1075 | (goto-char start) |
| 1084 | (+ (current-indentation) (* python-indent-offset 2))))))) | 1076 | (+ (current-indentation) (* python-indent-offset 2)))))) |
| 1085 | 1077 | ||
| 1086 | (defun python-indent--calculate-levels (indentation) | 1078 | (defun python-indent--calculate-levels (indentation) |
| 1087 | "Calculate levels list given INDENTATION. | 1079 | "Calculate levels list given INDENTATION. |
| @@ -2042,6 +2034,9 @@ executed through tramp connections." | |||
| 2042 | :type '(repeat string) | 2034 | :type '(repeat string) |
| 2043 | :group 'python) | 2035 | :group 'python) |
| 2044 | 2036 | ||
| 2037 | (define-obsolete-variable-alias | ||
| 2038 | 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") | ||
| 2039 | |||
| 2045 | (defcustom python-shell-virtualenv-root nil | 2040 | (defcustom python-shell-virtualenv-root nil |
| 2046 | "Path to virtualenv root. | 2041 | "Path to virtualenv root. |
| 2047 | This variable, when set to a string, makes the environment to be | 2042 | This variable, when set to a string, makes the environment to be |
| @@ -2050,9 +2045,6 @@ virtualenv." | |||
| 2050 | :type '(choice (const nil) string) | 2045 | :type '(choice (const nil) string) |
| 2051 | :group 'python) | 2046 | :group 'python) |
| 2052 | 2047 | ||
| 2053 | (define-obsolete-variable-alias | ||
| 2054 | 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") | ||
| 2055 | |||
| 2056 | (defcustom python-shell-setup-codes nil | 2048 | (defcustom python-shell-setup-codes nil |
| 2057 | "List of code run by `python-shell-send-setup-codes'." | 2049 | "List of code run by `python-shell-send-setup-codes'." |
| 2058 | :type '(repeat symbol) | 2050 | :type '(repeat symbol) |
| @@ -3289,14 +3281,6 @@ def __PYTHON_EL_get_completions(text): | |||
| 3289 | :type 'string | 3281 | :type 'string |
| 3290 | :group 'python) | 3282 | :group 'python) |
| 3291 | 3283 | ||
| 3292 | (defcustom python-shell-completion-string-code | ||
| 3293 | "';'.join(__PYTHON_EL_get_completions('''%s'''))" | ||
| 3294 | "Python code used to get a string of completions separated by semicolons. | ||
| 3295 | The string passed to the function is the current python name or | ||
| 3296 | the full statement in the case of imports." | ||
| 3297 | :type 'string | ||
| 3298 | :group 'python) | ||
| 3299 | |||
| 3300 | (define-obsolete-variable-alias | 3284 | (define-obsolete-variable-alias |
| 3301 | 'python-shell-completion-module-string-code | 3285 | 'python-shell-completion-module-string-code |
| 3302 | 'python-shell-completion-string-code | 3286 | 'python-shell-completion-string-code |
| @@ -3309,6 +3293,14 @@ the full statement in the case of imports." | |||
| 3309 | "25.1" | 3293 | "25.1" |
| 3310 | "Completion string code must work for (i)pdb.") | 3294 | "Completion string code must work for (i)pdb.") |
| 3311 | 3295 | ||
| 3296 | (defcustom python-shell-completion-string-code | ||
| 3297 | "';'.join(__PYTHON_EL_get_completions('''%s'''))" | ||
| 3298 | "Python code used to get a string of completions separated by semicolons. | ||
| 3299 | The string passed to the function is the current python name or | ||
| 3300 | the full statement in the case of imports." | ||
| 3301 | :type 'string | ||
| 3302 | :group 'python) | ||
| 3303 | |||
| 3312 | (defcustom python-shell-completion-native-disabled-interpreters | 3304 | (defcustom python-shell-completion-native-disabled-interpreters |
| 3313 | ;; PyPy's readline cannot handle some escape sequences yet. Native | 3305 | ;; PyPy's readline cannot handle some escape sequences yet. Native |
| 3314 | ;; completion was found to be non-functional for IPython (see | 3306 | ;; completion was found to be non-functional for IPython (see |
| @@ -4040,6 +4032,9 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." | |||
| 4040 | 4032 | ||
| 4041 | ;;; Skeletons | 4033 | ;;; Skeletons |
| 4042 | 4034 | ||
| 4035 | (define-obsolete-variable-alias | ||
| 4036 | 'python-use-skeletons 'python-skeleton-autoinsert "24.3") | ||
| 4037 | |||
| 4043 | (defcustom python-skeleton-autoinsert nil | 4038 | (defcustom python-skeleton-autoinsert nil |
| 4044 | "Non-nil means template skeletons will be automagically inserted. | 4039 | "Non-nil means template skeletons will be automagically inserted. |
| 4045 | This happens when pressing \"if<SPACE>\", for example, to prompt for | 4040 | This happens when pressing \"if<SPACE>\", for example, to prompt for |
| @@ -4048,9 +4043,6 @@ the if condition." | |||
| 4048 | :group 'python | 4043 | :group 'python |
| 4049 | :safe 'booleanp) | 4044 | :safe 'booleanp) |
| 4050 | 4045 | ||
| 4051 | (define-obsolete-variable-alias | ||
| 4052 | 'python-use-skeletons 'python-skeleton-autoinsert "24.3") | ||
| 4053 | |||
| 4054 | (defvar python-skeleton-available '() | 4046 | (defvar python-skeleton-available '() |
| 4055 | "Internal list of available skeletons.") | 4047 | "Internal list of available skeletons.") |
| 4056 | 4048 | ||
| @@ -4593,7 +4585,7 @@ Optional argument INCLUDE-TYPE indicates to include the type of the defun. | |||
| 4593 | This function can be used as the value of `add-log-current-defun-function' | 4585 | This function can be used as the value of `add-log-current-defun-function' |
| 4594 | since it returns nil if point is not inside a defun." | 4586 | since it returns nil if point is not inside a defun." |
| 4595 | (save-restriction | 4587 | (save-restriction |
| 4596 | (prog-widen) | 4588 | (widen) |
| 4597 | (save-excursion | 4589 | (save-excursion |
| 4598 | (end-of-line 1) | 4590 | (end-of-line 1) |
| 4599 | (let ((names) | 4591 | (let ((names) |
| @@ -4791,12 +4783,10 @@ likely an invalid python file." | |||
| 4791 | "Message the first line of the block the current statement closes." | 4783 | "Message the first line of the block the current statement closes." |
| 4792 | (let ((point (python-info-dedenter-opening-block-position))) | 4784 | (let ((point (python-info-dedenter-opening-block-position))) |
| 4793 | (when point | 4785 | (when point |
| 4794 | (save-restriction | ||
| 4795 | (prog-widen) | ||
| 4796 | (message "Closes %s" (save-excursion | 4786 | (message "Closes %s" (save-excursion |
| 4797 | (goto-char point) | 4787 | (goto-char point) |
| 4798 | (buffer-substring | 4788 | (buffer-substring |
| 4799 | (point) (line-end-position)))))))) | 4789 | (point) (line-end-position))))))) |
| 4800 | 4790 | ||
| 4801 | (defun python-info-dedenter-statement-p () | 4791 | (defun python-info-dedenter-statement-p () |
| 4802 | "Return point if current statement is a dedenter. | 4792 | "Return point if current statement is a dedenter. |
| @@ -4812,8 +4802,6 @@ statement." | |||
| 4812 | "Return non-nil if current line ends with backslash. | 4802 | "Return non-nil if current line ends with backslash. |
| 4813 | With optional argument LINE-NUMBER, check that line instead." | 4803 | With optional argument LINE-NUMBER, check that line instead." |
| 4814 | (save-excursion | 4804 | (save-excursion |
| 4815 | (save-restriction | ||
| 4816 | (prog-widen) | ||
| 4817 | (when line-number | 4805 | (when line-number |
| 4818 | (python-util-goto-line line-number)) | 4806 | (python-util-goto-line line-number)) |
| 4819 | (while (and (not (eobp)) | 4807 | (while (and (not (eobp)) |
| @@ -4822,14 +4810,12 @@ With optional argument LINE-NUMBER, check that line instead." | |||
| 4822 | (not (equal (char-before (point)) ?\\))) | 4810 | (not (equal (char-before (point)) ?\\))) |
| 4823 | (forward-line 1)) | 4811 | (forward-line 1)) |
| 4824 | (when (equal (char-before) ?\\) | 4812 | (when (equal (char-before) ?\\) |
| 4825 | (point-marker))))) | 4813 | (point-marker)))) |
| 4826 | 4814 | ||
| 4827 | (defun python-info-beginning-of-backslash (&optional line-number) | 4815 | (defun python-info-beginning-of-backslash (&optional line-number) |
| 4828 | "Return the point where the backslashed line starts. | 4816 | "Return the point where the backslashed line starts. |
| 4829 | Optional argument LINE-NUMBER forces the line number to check against." | 4817 | Optional argument LINE-NUMBER forces the line number to check against." |
| 4830 | (save-excursion | 4818 | (save-excursion |
| 4831 | (save-restriction | ||
| 4832 | (prog-widen) | ||
| 4833 | (when line-number | 4819 | (when line-number |
| 4834 | (python-util-goto-line line-number)) | 4820 | (python-util-goto-line line-number)) |
| 4835 | (when (python-info-line-ends-backslash-p) | 4821 | (when (python-info-line-ends-backslash-p) |
| @@ -4838,15 +4824,13 @@ Optional argument LINE-NUMBER forces the line number to check against." | |||
| 4838 | (python-syntax-context 'paren)) | 4824 | (python-syntax-context 'paren)) |
| 4839 | (forward-line -1)) | 4825 | (forward-line -1)) |
| 4840 | (back-to-indentation) | 4826 | (back-to-indentation) |
| 4841 | (point-marker))))) | 4827 | (point-marker)))) |
| 4842 | 4828 | ||
| 4843 | (defun python-info-continuation-line-p () | 4829 | (defun python-info-continuation-line-p () |
| 4844 | "Check if current line is continuation of another. | 4830 | "Check if current line is continuation of another. |
| 4845 | When current line is continuation of another return the point | 4831 | When current line is continuation of another return the point |
| 4846 | where the continued line ends." | 4832 | where the continued line ends." |
| 4847 | (save-excursion | 4833 | (save-excursion |
| 4848 | (save-restriction | ||
| 4849 | (prog-widen) | ||
| 4850 | (let* ((context-type (progn | 4834 | (let* ((context-type (progn |
| 4851 | (back-to-indentation) | 4835 | (back-to-indentation) |
| 4852 | (python-syntax-context-type))) | 4836 | (python-syntax-context-type))) |
| @@ -4872,7 +4856,7 @@ where the continued line ends." | |||
| 4872 | (python-util-forward-comment -1) | 4856 | (python-util-forward-comment -1) |
| 4873 | (when (and (equal (1- line-start) (line-number-at-pos)) | 4857 | (when (and (equal (1- line-start) (line-number-at-pos)) |
| 4874 | (python-info-line-ends-backslash-p)) | 4858 | (python-info-line-ends-backslash-p)) |
| 4875 | (point-marker)))))))) | 4859 | (point-marker))))))) |
| 4876 | 4860 | ||
| 4877 | (defun python-info-block-continuation-line-p () | 4861 | (defun python-info-block-continuation-line-p () |
| 4878 | "Return non-nil if current line is a continuation of a block." | 4862 | "Return non-nil if current line is a continuation of a block." |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 1c7df7e35a2..cc5cbbc6bed 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1364,7 +1364,6 @@ delimiter." | |||
| 1364 | "\\)\\>"))) | 1364 | "\\)\\>"))) |
| 1365 | (eq (ruby-deep-indent-paren-p t) 'space) | 1365 | (eq (ruby-deep-indent-paren-p t) 'space) |
| 1366 | (not (bobp))) | 1366 | (not (bobp))) |
| 1367 | (widen) | ||
| 1368 | (goto-char (or begin parse-start)) | 1367 | (goto-char (or begin parse-start)) |
| 1369 | (skip-syntax-forward " ") | 1368 | (skip-syntax-forward " ") |
| 1370 | (current-column)) | 1369 | (current-column)) |
diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 3e37edefb71..883eadd1709 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el | |||
| @@ -341,9 +341,7 @@ This is used by `mhtml--pre-command'.") | |||
| 341 | ((eq mhtml-tag-relative-indent 'ignore) | 341 | ((eq mhtml-tag-relative-indent 'ignore) |
| 342 | (setq base-indent 0))) | 342 | (setq base-indent 0))) |
| 343 | (narrow-to-region region-start (point-max)) | 343 | (narrow-to-region region-start (point-max)) |
| 344 | (let ((prog-indentation-context (list base-indent | 344 | (let ((prog-indentation-context (list base-indent))) |
| 345 | (cons (point-min) nil) | ||
| 346 | nil))) | ||
| 347 | (mhtml--with-locals submode | 345 | (mhtml--with-locals submode |
| 348 | ;; indent-line-function was rebound by | 346 | ;; indent-line-function was rebound by |
| 349 | ;; mhtml--with-locals. | 347 | ;; mhtml--with-locals. |
diff --git a/lisp/winner.el b/lisp/winner.el index 6bc27484a79..041e9253607 100644 --- a/lisp/winner.el +++ b/lisp/winner.el | |||
| @@ -353,7 +353,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 353 | "Toggle Winner mode on or off. | 353 | "Toggle Winner mode on or off. |
| 354 | With a prefix argument ARG, enable Winner mode if ARG is | 354 | With a prefix argument ARG, enable Winner mode if ARG is |
| 355 | positive, and disable it otherwise. If called from Lisp, enable | 355 | positive, and disable it otherwise. If called from Lisp, enable |
| 356 | the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’. | 356 | the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. |
| 357 | 357 | ||
| 358 | Winner mode is a global minor mode that records the changes in | 358 | Winner mode is a global minor mode that records the changes in |
| 359 | the window configuration (i.e. how the frames are partitioned | 359 | the window configuration (i.e. how the frames are partitioned |
diff --git a/src/gnutls.c b/src/gnutls.c index 8db201ae834..c21421fe557 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -46,6 +46,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 46 | # define HAVE_GNUTLS_MAC_GET_NONCE_SIZE | 46 | # define HAVE_GNUTLS_MAC_GET_NONCE_SIZE |
| 47 | #endif | 47 | #endif |
| 48 | 48 | ||
| 49 | #if GNUTLS_VERSION_NUMBER >= 0x030501 | ||
| 50 | # define HAVE_GNUTLS_EXT_GET_NAME | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #if GNUTLS_VERSION_NUMBER >= 0x030205 | ||
| 54 | # define HAVE_GNUTLS_EXT__DUMBFW | ||
| 55 | #endif | ||
| 56 | |||
| 49 | #ifdef HAVE_GNUTLS | 57 | #ifdef HAVE_GNUTLS |
| 50 | 58 | ||
| 51 | # ifdef WINDOWSNT | 59 | # ifdef WINDOWSNT |
| @@ -237,6 +245,9 @@ DEF_DLL_FN (int, gnutls_hash_get_len, (gnutls_digest_algorithm_t)); | |||
| 237 | DEF_DLL_FN (int, gnutls_hash, (gnutls_hash_hd_t, const void *, size_t)); | 245 | DEF_DLL_FN (int, gnutls_hash, (gnutls_hash_hd_t, const void *, size_t)); |
| 238 | DEF_DLL_FN (void, gnutls_hash_deinit, (gnutls_hash_hd_t, void *)); | 246 | DEF_DLL_FN (void, gnutls_hash_deinit, (gnutls_hash_hd_t, void *)); |
| 239 | DEF_DLL_FN (void, gnutls_hash_output, (gnutls_hash_hd_t, void *)); | 247 | DEF_DLL_FN (void, gnutls_hash_output, (gnutls_hash_hd_t, void *)); |
| 248 | # ifdef HAVE_GNUTLS_EXT_GET_NAME | ||
| 249 | DEF_DLL_FN (const char *, gnutls_ext_get_name, (unsigned int)); | ||
| 250 | # endif | ||
| 240 | # endif /* HAVE_GNUTLS3 */ | 251 | # endif /* HAVE_GNUTLS3 */ |
| 241 | 252 | ||
| 242 | 253 | ||
| @@ -356,6 +367,9 @@ init_gnutls_functions (void) | |||
| 356 | LOAD_DLL_FN (library, gnutls_hash); | 367 | LOAD_DLL_FN (library, gnutls_hash); |
| 357 | LOAD_DLL_FN (library, gnutls_hash_deinit); | 368 | LOAD_DLL_FN (library, gnutls_hash_deinit); |
| 358 | LOAD_DLL_FN (library, gnutls_hash_output); | 369 | LOAD_DLL_FN (library, gnutls_hash_output); |
| 370 | # ifdef HAVE_GNUTLS_EXT_GET_NAME | ||
| 371 | LOAD_DLL_FN (library, gnutls_ext_get_name); | ||
| 372 | # endif | ||
| 359 | # endif /* HAVE_GNUTLS3 */ | 373 | # endif /* HAVE_GNUTLS3 */ |
| 360 | 374 | ||
| 361 | max_log_level = global_gnutls_log_level; | 375 | max_log_level = global_gnutls_log_level; |
| @@ -469,8 +483,12 @@ init_gnutls_functions (void) | |||
| 469 | # define gnutls_hash fn_gnutls_hash | 483 | # define gnutls_hash fn_gnutls_hash |
| 470 | # define gnutls_hash_deinit fn_gnutls_hash_deinit | 484 | # define gnutls_hash_deinit fn_gnutls_hash_deinit |
| 471 | # define gnutls_hash_output fn_gnutls_hash_output | 485 | # define gnutls_hash_output fn_gnutls_hash_output |
| 486 | # ifdef HAVE_GNUTLS_EXT_GET_NAME | ||
| 487 | # define gnutls_ext_get_name fn_gnutls_ext_get_name | ||
| 488 | # endif | ||
| 472 | # endif /* HAVE_GNUTLS3 */ | 489 | # endif /* HAVE_GNUTLS3 */ |
| 473 | 490 | ||
| 491 | |||
| 474 | /* This wrapper is called from fns.c, which doesn't know about the | 492 | /* This wrapper is called from fns.c, which doesn't know about the |
| 475 | LOAD_DLL_FN stuff above. */ | 493 | LOAD_DLL_FN stuff above. */ |
| 476 | int | 494 | int |
| @@ -2425,6 +2443,18 @@ Any GnuTLS extension with ID up to 100 | |||
| 2425 | 2443 | ||
| 2426 | #ifdef HAVE_GNUTLS | 2444 | #ifdef HAVE_GNUTLS |
| 2427 | 2445 | ||
| 2446 | # ifdef WINDOWSNT | ||
| 2447 | Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); | ||
| 2448 | if (CONSP (found)) | ||
| 2449 | return XCDR (found); | ||
| 2450 | |||
| 2451 | /* Load the GnuTLS DLL and find exported functions. The external | ||
| 2452 | library cache is updated after the capabilities have been | ||
| 2453 | determined. */ | ||
| 2454 | if (!init_gnutls_functions ()) | ||
| 2455 | return Qnil; | ||
| 2456 | # endif /* WINDOWSNT */ | ||
| 2457 | |||
| 2428 | capabilities = Fcons (intern("gnutls"), capabilities); | 2458 | capabilities = Fcons (intern("gnutls"), capabilities); |
| 2429 | 2459 | ||
| 2430 | # ifdef HAVE_GNUTLS3 | 2460 | # ifdef HAVE_GNUTLS3 |
| @@ -2437,8 +2467,8 @@ Any GnuTLS extension with ID up to 100 | |||
| 2437 | # endif | 2467 | # endif |
| 2438 | 2468 | ||
| 2439 | capabilities = Fcons (intern("macs"), capabilities); | 2469 | capabilities = Fcons (intern("macs"), capabilities); |
| 2440 | # endif /* HAVE_GNUTLS3 */ | ||
| 2441 | 2470 | ||
| 2471 | # ifdef HAVE_GNUTLS_EXT_GET_NAME | ||
| 2442 | for (unsigned int ext=0; ext < 100; ext++) | 2472 | for (unsigned int ext=0; ext < 100; ext++) |
| 2443 | { | 2473 | { |
| 2444 | const char* name = gnutls_ext_get_name(ext); | 2474 | const char* name = gnutls_ext_get_name(ext); |
| @@ -2447,18 +2477,15 @@ Any GnuTLS extension with ID up to 100 | |||
| 2447 | capabilities = Fcons (intern(name), capabilities); | 2477 | capabilities = Fcons (intern(name), capabilities); |
| 2448 | } | 2478 | } |
| 2449 | } | 2479 | } |
| 2480 | # endif | ||
| 2481 | # endif /* HAVE_GNUTLS3 */ | ||
| 2482 | |||
| 2483 | # ifdef HAVE_GNUTLS_EXT__DUMBFW | ||
| 2484 | capabilities = Fcons (intern("ClientHello Padding"), capabilities); | ||
| 2485 | # endif | ||
| 2450 | 2486 | ||
| 2451 | # ifdef WINDOWSNT | 2487 | # ifdef WINDOWSNT |
| 2452 | Lisp_Object found = Fassq (Qgnutls, Vlibrary_cache); | 2488 | Vlibrary_cache = Fcons (Fcons (Qgnutls, capabilities), Vlibrary_cache); |
| 2453 | if (CONSP (found)) | ||
| 2454 | return XCDR (found); | ||
| 2455 | else | ||
| 2456 | { | ||
| 2457 | Lisp_Object status; | ||
| 2458 | status = init_gnutls_functions () ? capabilities : Qnil; | ||
| 2459 | Vlibrary_cache = Fcons (Fcons (Qgnutls, status), Vlibrary_cache); | ||
| 2460 | return status; | ||
| 2461 | } | ||
| 2462 | # endif /* WINDOWSNT */ | 2489 | # endif /* WINDOWSNT */ |
| 2463 | #endif /* HAVE_GNUTLS */ | 2490 | #endif /* HAVE_GNUTLS */ |
| 2464 | 2491 | ||
diff --git a/test/lisp/mouse-tests.el b/test/lisp/mouse-tests.el index f8c91004ecc..170df4a9b98 100644 --- a/test/lisp/mouse-tests.el +++ b/test/lisp/mouse-tests.el | |||
| @@ -26,8 +26,7 @@ | |||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | (ert-deftest bug23288-use-return-value () | 28 | (ert-deftest bug23288-use-return-value () |
| 29 | "If ‘mouse-on-link-p’ returns a string, its first character is | 29 | "If `mouse-on-link-p' returns a string, its first character is used." |
| 30 | used." | ||
| 31 | (cl-letf ((last-input-event '(down-mouse-1 nil 1)) | 30 | (cl-letf ((last-input-event '(down-mouse-1 nil 1)) |
| 32 | (unread-command-events '((mouse-1 nil 1))) | 31 | (unread-command-events '((mouse-1 nil 1))) |
| 33 | (mouse-1-click-follows-link t) | 32 | (mouse-1-click-follows-link t) |
| @@ -37,8 +36,8 @@ used." | |||
| 37 | (should (equal unread-command-events '(?a))))) | 36 | (should (equal unread-command-events '(?a))))) |
| 38 | 37 | ||
| 39 | (ert-deftest bug23288-translate-to-mouse-2 () | 38 | (ert-deftest bug23288-translate-to-mouse-2 () |
| 40 | "If ‘mouse-on-link-p’ doesn’t return a string or vector, | 39 | "If `mouse-on-link-p' doesn't return a string or vector, |
| 41 | translate ‘mouse-1’ events into ‘mouse-2’ events." | 40 | translate `mouse-1' events into `mouse-2' events." |
| 42 | (cl-letf ((last-input-event '(down-mouse-1 nil 1)) | 41 | (cl-letf ((last-input-event '(down-mouse-1 nil 1)) |
| 43 | (unread-command-events '((mouse-1 nil 1))) | 42 | (unread-command-events '((mouse-1 nil 1))) |
| 44 | (mouse-1-click-follows-link t) | 43 | (mouse-1-click-follows-link t) |
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 4b41fc21c20..767d87a7e35 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el | |||
| @@ -231,10 +231,9 @@ must evaluate to a regular expression string." | |||
| 231 | (point) (point-max)))))))) | 231 | (point) (point-max)))))))) |
| 232 | 232 | ||
| 233 | (ert-deftest module--test-assertions--load-non-live-object () | 233 | (ert-deftest module--test-assertions--load-non-live-object () |
| 234 | "Check that -module-assertions verify that non-live objects | 234 | "Check that -module-assertions verify that non-live objects aren't accessed." |
| 235 | aren’t accessed." | ||
| 236 | (skip-unless (file-executable-p mod-test-emacs)) | 235 | (skip-unless (file-executable-p mod-test-emacs)) |
| 237 | ;; This doesn’t yet cause undefined behavior. | 236 | ;; This doesn't yet cause undefined behavior. |
| 238 | (should (eq (mod-test-invalid-store) 123)) | 237 | (should (eq (mod-test-invalid-store) 123)) |
| 239 | (module--test-assertion (rx "Emacs value not found in " | 238 | (module--test-assertion (rx "Emacs value not found in " |
| 240 | (+ digit) " values of " | 239 | (+ digit) " values of " |
diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 7ff60dd01c4..15b2fdf9c4b 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el | |||
| @@ -28,14 +28,14 @@ | |||
| 28 | (require 'ert) | 28 | (require 'ert) |
| 29 | 29 | ||
| 30 | (ert-deftest eval-tests--bug24673 () | 30 | (ert-deftest eval-tests--bug24673 () |
| 31 | "Checks that Bug#24673 has been fixed." | 31 | "Check that Bug#24673 has been fixed." |
| 32 | ;; This should not crash. | 32 | ;; This should not crash. |
| 33 | (should-error (funcall '(closure)) :type 'invalid-function)) | 33 | (should-error (funcall '(closure)) :type 'invalid-function)) |
| 34 | 34 | ||
| 35 | (defvar byte-compile-debug) | 35 | (defvar byte-compile-debug) |
| 36 | 36 | ||
| 37 | (ert-deftest eval-tests--bugs-24912-and-24913 () | 37 | (ert-deftest eval-tests--bugs-24912-and-24913 () |
| 38 | "Checks that Emacs doesn’t accept weird argument lists. | 38 | "Check that Emacs doesn't accept weird argument lists. |
| 39 | Bug#24912 and Bug#24913." | 39 | Bug#24912 and Bug#24913." |
| 40 | (dolist (args '((&optional) (&rest) (&optional &rest) (&rest &optional) | 40 | (dolist (args '((&optional) (&rest) (&optional &rest) (&rest &optional) |
| 41 | (&optional &rest a) (&optional a &rest) | 41 | (&optional &rest a) (&optional a &rest) |
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index 705d02fdff6..4d8228b9411 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el | |||
| @@ -548,7 +548,7 @@ | |||
| 548 | (should-error (nconc (cyc2 1 2) 'tail) :type 'circular-list)) | 548 | (should-error (nconc (cyc2 1 2) 'tail) :type 'circular-list)) |
| 549 | 549 | ||
| 550 | (ert-deftest plist-get/odd-number-of-elements () | 550 | (ert-deftest plist-get/odd-number-of-elements () |
| 551 | "Test that ‘plist-get’ doesn’t signal an error on degenerate plists." | 551 | "Test that `plist-get' doesn't signal an error on degenerate plists." |
| 552 | (should-not (plist-get '(:foo 1 :bar) :bar))) | 552 | (should-not (plist-get '(:foo 1 :bar) :bar))) |
| 553 | 553 | ||
| 554 | (ert-deftest lax-plist-get/odd-number-of-elements () | 554 | (ert-deftest lax-plist-get/odd-number-of-elements () |
diff --git a/test/src/regex-tests.el b/test/src/regex-tests.el index b1f1ea71cef..220d42c8d2e 100644 --- a/test/src/regex-tests.el +++ b/test/src/regex-tests.el | |||
| @@ -27,13 +27,13 @@ | |||
| 27 | "Path to regex-resources directory next to the \"regex-tests.el\" file.") | 27 | "Path to regex-resources directory next to the \"regex-tests.el\" file.") |
| 28 | 28 | ||
| 29 | (ert-deftest regex-word-cc-fallback-test () | 29 | (ert-deftest regex-word-cc-fallback-test () |
| 30 | "Test that ‘[[:cc:]]*x’ matches ‘x’ (bug#24020). | 30 | "Test that \"[[:cc:]]*x\" matches \"x\" (bug#24020). |
| 31 | 31 | ||
| 32 | Test that a regex of the form \"[[:cc:]]*x\" where CC is | 32 | Test that a regex of the form \"[[:cc:]]*x\" where CC is |
| 33 | a character class which matches a multibyte character X, matches | 33 | a character class which matches a multibyte character X, matches |
| 34 | string \"x\". | 34 | string \"x\". |
| 35 | 35 | ||
| 36 | For example, ‘[[:word:]]*\u2620’ regex (note: \u2620 is a word | 36 | For example, \"[[:word:]]*\u2620\" regex (note: \u2620 is a word |
| 37 | character) must match a string \"\u2420\"." | 37 | character) must match a string \"\u2420\"." |
| 38 | (dolist (class '("[[:word:]]" "\\sw")) | 38 | (dolist (class '("[[:word:]]" "\\sw")) |
| 39 | (dolist (repeat '("*" "+")) | 39 | (dolist (repeat '("*" "+")) |