Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26

This commit is contained in:
K. Handa 2017-10-08 11:56:06 +09:00
commit a9b72976de
45 changed files with 28736 additions and 526 deletions

28146
ChangeLog.3

File diff suppressed because it is too large Load diff

View file

@ -1115,7 +1115,7 @@ ChangeLog:
./$(emacslog) -o $(CHANGELOG) -n $(CHANGELOG_HISTORY_INDEX_MAX)
# Check that we are in a good state for changing history.
PREFERRED_BRANCH = master
PREFERRED_BRANCH = emacs-26
preferred-branch-is-current:
git branch | grep -q '^\* $(PREFERRED_BRANCH)$$'
unchanged-history-files:

View file

@ -806,7 +806,10 @@ Changes to files in this list are not listed.")
"srecode-tests.el" "make-test-deps.emacs-lisp"
"nxml-uchnm.el"
"decoder-tests.el"
"obsolete/scribe.el")
"obsolete/scribe.el"
"cp51932.el"
"eucjp-ms.el"
"lisp.mk")
"File names which are valid, but no longer exist (or cannot be found)
in the repository.")
@ -912,7 +915,7 @@ in the repository.")
("emulation/ws-mode.el" . "ws-mode.el")
("vc/vc-arch.el" . "vc-arch.el")
("lisp/gnus/messcompat.el" . "messcompat.el")
("lisp/gnus/html2text.el" . "html2text.el")
("html2text.el" . "html2text.el")
;; From lisp to etc/forms.
("forms-d2.el" . "forms-d2.el")
("forms-pass.el" . "forms-pass.el")

View file

@ -4,7 +4,7 @@
@set VERSION 0.3
@set UPDATED April 2004
@settitle GNU Flymake @value{VERSION}
@include ../emacs/docstyle.texi
@include docstyle.texi
@syncodeindex pg cp
@comment %**end of header
@ -182,7 +182,7 @@ to the first diagnostic when invoked in the end of the buffer.
@cindex Syntax check statuses
After syntax check is finished, its status is displayed in the mode line.
The following statuses are defined.
The following statuses are defined:
@multitable @columnfractions 0.25 0.75
@item @code{Wait}
@ -356,7 +356,7 @@ selected. If no match is found, @code{flymake-mode} is switched off.
@code{init-function} is required to initialize the syntax check,
usually by creating a temporary copy of the buffer contents. The
function must return @code{(list cmd-name arg-list)}. If
@code{init-function} returns null, syntax check is aborted, by
@code{init-function} returns null, syntax check is aborted, but
@code{flymake-mode} is not switched off.
@item cleanup-function
@ -375,7 +375,7 @@ used as @code{getfname-function}.
@end table
To add support for a new syntax check tool, write corresponding
@code{init-function}, and, optionally @code{cleanup-function} and
@code{init-function} and, optionally, @code{cleanup-function} and
@code{getfname-function}. If the format of error messages reported by
the new tool is not yet supported by Flymake, add a new entry to
the @code{flymake-proc-err-line-patterns} list.
@ -493,7 +493,7 @@ check-syntax:
@code{flymake-proc-legacy-backend} saves a copy of the buffer in a
temporary file in the buffer's directory (or in the system temp
directory, for java files), creates a syntax check command and
directory, for Java files), creates a syntax check command and
launches a process with this command. The output is parsed using a
list of error message patterns, and error information (file name, line
number, type and text) is saved. After the process has finished,
@ -631,7 +631,7 @@ include directories for C++. The latter files are syntax checked
using some build tool, like Make or Ant.
All Make configuration data is usually stored in a file called
@code{Makefile}. To allow for future extensions, flymake uses a notion of
@code{Makefile}. To allow for future extensions, Flymake uses a notion of
buildfile to reference the 'project configuration' file.
Special function, @code{flymake-proc-find-buildfile} is provided for locating buildfiles.

View file

@ -4,7 +4,7 @@
@settitle The Org Manual
@include docstyle.texi
@set VERSION 9.1.1
@set VERSION 9.1.2
@set DATE 2017-09-17
@c Version and Contact Info
@ -1257,13 +1257,8 @@ Org uses just two commands, bound to @key{TAB} and
@end example
@vindex org-cycle-emulate-tab
@vindex org-cycle-global-at-bob
The cursor must be on a headline for this to work@footnote{see, however,
the option @code{org-cycle-emulate-tab}.}. When the cursor is at the
beginning of the buffer and the first line is not a headline, then
@key{TAB} actually runs global cycling (see below)@footnote{see the
option @code{org-cycle-global-at-bob}.}. Also when called with a prefix
argument (@kbd{C-u @key{TAB}}), global cycling is invoked.
the option @code{org-cycle-emulate-tab}.}.
@cindex global visibility states
@cindex global cycling
@ -1283,6 +1278,11 @@ When @kbd{S-@key{TAB}} is called with a numeric prefix argument N, the
CONTENTS view up to headlines of level N will be shown. Note that inside
tables, @kbd{S-@key{TAB}} jumps to the previous field.
@vindex org-cycle-global-at-bob
You can run global cycling using @key{TAB} only if point is at the very
beginning of the buffer, but not on a headline, and
@code{org-cycle-global-at-bob} is set to a non-@code{nil} value.
@cindex set startup visibility, command
@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
Switch back to the startup visibility of the buffer (@pxref{Initial visibility}).
@ -1659,11 +1659,9 @@ line. In particular, if an ordered list reaches number @samp{10.}, then the
list. An item ends before the next line that is less or equally indented
than its bullet/number.
@vindex org-list-empty-line-terminates-plain-lists
A list ends whenever every item has ended, which means before any line less
or equally indented than items at top level. It also ends before two blank
lines@footnote{See also @code{org-list-empty-line-terminates-plain-lists}.}.
In that case, all items are closed. Here is an example:
lines. In that case, all items are closed. Here is an example:
@example
@group
@ -14991,6 +14989,7 @@ directory on the local machine.
'(("org"
:base-directory "~/org/"
:publishing-directory "~/public_html"
:publishing-function org-html-publish-to-html
:section-numbers nil
:with-toc nil
:html-head "<link rel=\"stylesheet\"

View file

@ -1115,7 +1115,7 @@ See the 'vc-faces' customization group.
*** 'vc-dir-mode' now binds 'vc-log-outgoing' to 'O'; and has various
branch-related commands on a keymap bound to 'B'.
---
+++
*** 'vc-region-history' is now bound to 'C-x v h', replacing the older
'vc-insert-headers' binding.
@ -1364,6 +1364,15 @@ non-nil, but the code returned the list in the increasing order of
priority instead. Now the code does what the documentation says it
should do.
+++
** 'format' now avoids allocating a new string in more cases.
'format' was previously documented to return a newly-allocated string,
but this documentation was not correct, as (eq x (format x)) returned
t when x was the empty string. 'format' is no longer documented to
return a newly-allocated string, and the implementation now takes
advantage of the doc change to avoid making copies of strings in
common cases like (format "foo") and (format "%s" "foo").
---
** The function 'eldoc-message' now accepts a single argument.
Programs that called it with multiple arguments before should pass
@ -1559,13 +1568,6 @@ Emacs integers with %e, %f, or %g conversions. For example, on these
hosts (eql N (string-to-number (format "%.0f" N))) now returns t for
all Emacs integers N.
+++
** 'format' is no longer documented to return a newly-allocated string.
This documentation was not correct, as (eq x (format x)) returned t
when x was the empty string. 'format' now takes advantage of the doc
change to avoid making copies of strings in common cases like (format
"foo") and (format "%s" "foo").
---
** Calls that accept floating-point integers (for use on hosts with
limited integer range) now signal an error if arguments are not

View file

@ -1,5 +1,5 @@
% Reference Card for Org Mode
\def\orgversionnumber{9.1.1}
\def\orgversionnumber{9.1.2}
\def\versionyear{2017} % latest update
\input emacsver.tex

View file

@ -204,7 +204,16 @@ OPTIONS-AND-METHODS currently understands:
DEFAULT-BODY, if present, is used as the body of a default method.
\(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY)"
(declare (indent 2) (doc-string 3))
(declare (indent 2) (doc-string 3)
(debug
(&define name cl-lambda-list lambda-doc
[&rest [&or
("declare" &rest sexp)
(":argument-precedence-order" &rest sexp)
(&define ":method" [&rest atom]
cl-generic-method-args lambda-doc
def-body)]]
def-body)))
(let* ((doc (if (stringp (car-safe options-and-methods))
(pop options-and-methods)))
(declarations nil)
@ -422,7 +431,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
; Like in CLOS spec, we support
; any non-list values.
cl-generic-method-args ; arguments
[ &optional stringp ] ; documentation string
lambda-doc ; documentation string
def-body))) ; part to be debugged
(let ((qualifiers nil))
(while (not (listp args))

View file

@ -190,7 +190,7 @@ The name is made by appending a number to PREFIX, default \"T\"."
(&rest ("cl-declare" &rest sexp)))
(def-edebug-spec cl-declarations-or-string
(&or stringp cl-declarations))
(&or lambda-doc cl-declarations))
(def-edebug-spec cl-lambda-list
(([&rest arg]
@ -447,8 +447,8 @@ more details.
(def-edebug-spec cl-lambda-expr
(&define ("lambda" cl-lambda-list
;;cl-declarations-or-string
;;[&optional ("interactive" interactive)]
cl-declarations-or-string
[&optional ("interactive" interactive)]
def-body)))
;; Redefine function-form to also match cl-function

View file

@ -1986,15 +1986,14 @@ expressions; a `progn' form will be returned enclosing these forms."
(def-edebug-spec defvar (symbolp &optional form stringp))
(def-edebug-spec defun
(&define name lambda-list
[&optional stringp]
(&define name lambda-list lambda-doc
[&optional ("declare" &rest sexp)]
[&optional ("interactive" interactive)]
def-body))
(def-edebug-spec defmacro
;; FIXME: Improve `declare' so we can Edebug gv-expander and
;; gv-setter declarations.
(&define name lambda-list [&optional stringp]
(&define name lambda-list lambda-doc
[&optional ("declare" &rest sexp)] def-body))
(def-edebug-spec arglist lambda-list) ;; deprecated - use lambda-list.
@ -2005,6 +2004,10 @@ expressions; a `progn' form will be returned enclosing these forms."
&optional ["&rest" arg]
)))
(def-edebug-spec lambda-doc
(&optional [&or stringp
(&define ":documentation" def-form)]))
(def-edebug-spec interactive
(&optional &or stringp def-form))
@ -3204,15 +3207,6 @@ generated symbols for methods. If a function or method to
instrument cannot be found, signal an error."
(let ((func-marker (get func 'edebug)))
(cond
((and (markerp func-marker) (marker-buffer func-marker))
;; It is uninstrumented, so instrument it.
(with-current-buffer (marker-buffer func-marker)
(goto-char func-marker)
(edebug-eval-top-level-form)
(list func)))
((consp func-marker)
(message "%s is already instrumented." func)
(list func))
((cl-generic-p func)
(let ((method-defs (cl--generic-method-files func))
symbols)
@ -3227,6 +3221,15 @@ instrument cannot be found, signal an error."
(edebug-eval-top-level-form)
(push (edebug-form-data-symbol) symbols))))
symbols))
((and (markerp func-marker) (marker-buffer func-marker))
;; It is uninstrumented, so instrument it.
(with-current-buffer (marker-buffer func-marker)
(goto-char func-marker)
(edebug-eval-top-level-form)
(list func)))
((consp func-marker)
(message "%s is already instrumented." func)
(list func))
(t
(let ((loc (find-function-noselect func t)))
(unless (cdr loc)

View file

@ -142,8 +142,7 @@ the CPS state machinery.
`(let ((,dynamic-var ,static-var))
(unwind-protect ; Update the static shadow after evaluation is done
,form
(setf ,static-var ,dynamic-var))
,form)))
(setf ,static-var ,dynamic-var)))))
(defmacro cps--with-dynamic-binding (dynamic-var static-var &rest body)
"Evaluate BODY such that generated atomic evaluations run with
@ -681,7 +680,8 @@ sub-iterator function returns via `iter-end-of-sequence'."
When called as a function, NAME returns an iterator value that
encapsulates the state of a computation that produces a sequence
of values. Callers can retrieve each value using `iter-next'."
(declare (indent defun))
(declare (indent defun)
(debug (&define name lambda-list lambda-doc def-body)))
(cl-assert lexical-binding)
(let* ((parsed-body (macroexp-parse-body body))
(declarations (car parsed-body))
@ -693,7 +693,8 @@ of values. Callers can retrieve each value using `iter-next'."
(defmacro iter-lambda (arglist &rest body)
"Return a lambda generator.
`iter-lambda' is to `iter-defun' as `lambda' is to `defun'."
(declare (indent defun))
(declare (indent defun)
(debug (&define lambda-list lambda-doc def-body)))
(cl-assert lexical-binding)
`(lambda ,arglist
,(cps-generate-evaluator body)))

View file

@ -226,7 +226,7 @@ I.e. accepts the usual &optional and &rest keywords, but every
formal argument can be any pattern accepted by `pcase' (a mere
variable name being but a special case of it)."
(declare (doc-string 2) (indent defun)
(debug ((&rest pcase-PAT) body)))
(debug (&define (&rest pcase-PAT) lambda-doc def-body)))
(let* ((bindings ())
(parsed-body (macroexp-parse-body body))
(args (mapcar (lambda (pat)

199
lisp/emacs-lisp/rmc.el Normal file
View file

@ -0,0 +1,199 @@
;;; rmc.el --- read from a multiple choice question -*- lexical-binding: t -*-
;; Copyright (C) 2017 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; 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.
;; 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 <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Code:
;;;###autoload
(defun read-multiple-choice (prompt choices)
"Ask user a multiple choice question.
PROMPT should be a string that will be displayed as the prompt.
CHOICES is an alist where the first element in each entry is a
character to be entered, the second element is a short name for
the entry to be displayed while prompting (if there's room, it
might be shortened), and the third, optional entry is a longer
explanation that will be displayed in a help buffer if the user
requests more help.
This function translates user input into responses by consulting
the bindings in `query-replace-map'; see the documentation of
that variable for more information. In this case, the useful
bindings are `recenter', `scroll-up', and `scroll-down'. If the
user enters `recenter', `scroll-up', or `scroll-down' responses,
perform the requested window recentering or scrolling and ask
again.
When `use-dialog-box' is t (the default), this function can pop
up a dialog window to collect the user input. That functionality
requires `display-popup-menus-p' to return t. Otherwise, a text
dialog will be used.
The return value is the matching entry from the CHOICES list.
Usage example:
\(read-multiple-choice \"Continue connecting?\"
\\='((?a \"always\")
(?s \"session only\")
(?n \"no\")))"
(let* ((altered-names nil)
(full-prompt
(format
"%s (%s): "
prompt
(mapconcat
(lambda (elem)
(let* ((name (cadr elem))
(pos (seq-position name (car elem)))
(altered-name
(cond
;; Not in the name string.
((not pos)
(format "[%c] %s" (car elem) name))
;; The prompt character is in the name, so highlight
;; it on graphical terminals...
((display-supports-face-attributes-p
'(:underline t) (window-frame))
(setq name (copy-sequence name))
(put-text-property pos (1+ pos)
'face 'read-multiple-choice-face
name)
name)
;; And put it in [bracket] on non-graphical terminals.
(t
(concat
(substring name 0 pos)
"["
(upcase (substring name pos (1+ pos)))
"]"
(substring name (1+ pos)))))))
(push (cons (car elem) altered-name)
altered-names)
altered-name))
(append choices '((?? "?")))
", ")))
tchar buf wrong-char answer)
(save-window-excursion
(save-excursion
(while (not tchar)
(message "%s%s"
(if wrong-char
"Invalid choice. "
"")
full-prompt)
(setq tchar
(if (and (display-popup-menus-p)
last-input-event ; not during startup
(listp last-nonmenu-event)
use-dialog-box)
(x-popup-dialog
t
(cons prompt
(mapcar
(lambda (elem)
(cons (capitalize (cadr elem))
(car elem)))
choices)))
(condition-case nil
(let ((cursor-in-echo-area t))
(read-char))
(error nil))))
(setq answer (lookup-key query-replace-map (vector tchar) t))
(setq tchar
(cond
((eq answer 'recenter)
(recenter) t)
((eq answer 'scroll-up)
(ignore-errors (scroll-up-command)) t)
((eq answer 'scroll-down)
(ignore-errors (scroll-down-command)) t)
((eq answer 'scroll-other-window)
(ignore-errors (scroll-other-window)) t)
((eq answer 'scroll-other-window-down)
(ignore-errors (scroll-other-window-down)) t)
(t tchar)))
(when (eq tchar t)
(setq wrong-char nil
tchar nil))
;; The user has entered an invalid choice, so display the
;; help messages.
(when (and (not (eq tchar nil))
(not (assq tchar choices)))
(setq wrong-char (not (memq tchar '(?? ?\C-h)))
tchar nil)
(when wrong-char
(ding))
(with-help-window (setq buf (get-buffer-create
"*Multiple Choice Help*"))
(with-current-buffer buf
(erase-buffer)
(pop-to-buffer buf)
(insert prompt "\n\n")
(let* ((columns (/ (window-width) 25))
(fill-column 21)
(times 0)
(start (point)))
(dolist (elem choices)
(goto-char start)
(unless (zerop times)
(if (zerop (mod times columns))
;; Go to the next "line".
(goto-char (setq start (point-max)))
;; Add padding.
(while (not (eobp))
(end-of-line)
(insert (make-string (max (- (* (mod times columns)
(+ fill-column 4))
(current-column))
0)
?\s))
(forward-line 1))))
(setq times (1+ times))
(let ((text
(with-temp-buffer
(insert (format
"%c: %s\n"
(car elem)
(cdr (assq (car elem) altered-names))))
(fill-region (point-min) (point-max))
(when (nth 2 elem)
(let ((start (point)))
(insert (nth 2 elem))
(unless (bolp)
(insert "\n"))
(fill-region start (point-max))))
(buffer-string))))
(goto-char start)
(dolist (line (split-string text "\n"))
(end-of-line)
(if (bolp)
(insert line "\n")
(insert line))
(forward-line 1)))))))))))
(when (buffer-live-p buf)
(kill-buffer buf))
(assq tchar choices)))
(provide 'rmc)
;;; rmc.el ends here

View file

@ -245,176 +245,6 @@ TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
(substring string 0 (- (length string) (length suffix)))
string))
(defun read-multiple-choice (prompt choices)
"Ask user a multiple choice question.
PROMPT should be a string that will be displayed as the prompt.
CHOICES is an alist where the first element in each entry is a
character to be entered, the second element is a short name for
the entry to be displayed while prompting (if there's room, it
might be shortened), and the third, optional entry is a longer
explanation that will be displayed in a help buffer if the user
requests more help.
This function translates user input into responses by consulting
the bindings in `query-replace-map'; see the documentation of
that variable for more information. In this case, the useful
bindings are `recenter', `scroll-up', and `scroll-down'. If the
user enters `recenter', `scroll-up', or `scroll-down' responses,
perform the requested window recentering or scrolling and ask
again.
When `use-dialog-box' is t (the default), this function can pop
up a dialog window to collect the user input. That functionality
requires `display-popup-menus-p' to return t. Otherwise, a text
dialog will be used.
The return value is the matching entry from the CHOICES list.
Usage example:
\(read-multiple-choice \"Continue connecting?\"
\\='((?a \"always\")
(?s \"session only\")
(?n \"no\")))"
(let* ((altered-names nil)
(full-prompt
(format
"%s (%s): "
prompt
(mapconcat
(lambda (elem)
(let* ((name (cadr elem))
(pos (seq-position name (car elem)))
(altered-name
(cond
;; Not in the name string.
((not pos)
(format "[%c] %s" (car elem) name))
;; The prompt character is in the name, so highlight
;; it on graphical terminals...
((display-supports-face-attributes-p
'(:underline t) (window-frame))
(setq name (copy-sequence name))
(put-text-property pos (1+ pos)
'face 'read-multiple-choice-face
name)
name)
;; And put it in [bracket] on non-graphical terminals.
(t
(concat
(substring name 0 pos)
"["
(upcase (substring name pos (1+ pos)))
"]"
(substring name (1+ pos)))))))
(push (cons (car elem) altered-name)
altered-names)
altered-name))
(append choices '((?? "?")))
", ")))
tchar buf wrong-char answer)
(save-window-excursion
(save-excursion
(while (not tchar)
(message "%s%s"
(if wrong-char
"Invalid choice. "
"")
full-prompt)
(setq tchar
(if (and (display-popup-menus-p)
last-input-event ; not during startup
(listp last-nonmenu-event)
use-dialog-box)
(x-popup-dialog
t
(cons prompt
(mapcar
(lambda (elem)
(cons (capitalize (cadr elem))
(car elem)))
choices)))
(condition-case nil
(let ((cursor-in-echo-area t))
(read-char))
(error nil))))
(setq answer (lookup-key query-replace-map (vector tchar) t))
(setq tchar
(cond
((eq answer 'recenter)
(recenter) t)
((eq answer 'scroll-up)
(ignore-errors (scroll-up-command)) t)
((eq answer 'scroll-down)
(ignore-errors (scroll-down-command)) t)
((eq answer 'scroll-other-window)
(ignore-errors (scroll-other-window)) t)
((eq answer 'scroll-other-window-down)
(ignore-errors (scroll-other-window-down)) t)
(t tchar)))
(when (eq tchar t)
(setq wrong-char nil
tchar nil))
;; The user has entered an invalid choice, so display the
;; help messages.
(when (and (not (eq tchar nil))
(not (assq tchar choices)))
(setq wrong-char (not (memq tchar '(?? ?\C-h)))
tchar nil)
(when wrong-char
(ding))
(with-help-window (setq buf (get-buffer-create
"*Multiple Choice Help*"))
(with-current-buffer buf
(erase-buffer)
(pop-to-buffer buf)
(insert prompt "\n\n")
(let* ((columns (/ (window-width) 25))
(fill-column 21)
(times 0)
(start (point)))
(dolist (elem choices)
(goto-char start)
(unless (zerop times)
(if (zerop (mod times columns))
;; Go to the next "line".
(goto-char (setq start (point-max)))
;; Add padding.
(while (not (eobp))
(end-of-line)
(insert (make-string (max (- (* (mod times columns)
(+ fill-column 4))
(current-column))
0)
?\s))
(forward-line 1))))
(setq times (1+ times))
(let ((text
(with-temp-buffer
(insert (format
"%c: %s\n"
(car elem)
(cdr (assq (car elem) altered-names))))
(fill-region (point-min) (point-max))
(when (nth 2 elem)
(let ((start (point)))
(insert (nth 2 elem))
(unless (bolp)
(insert "\n"))
(fill-region start (point-max))))
(buffer-string))))
(goto-char start)
(dolist (line (split-string text "\n"))
(end-of-line)
(if (bolp)
(insert line "\n")
(insert line))
(forward-line 1)))))))))))
(when (buffer-live-p buf)
(kill-buffer buf))
(assq tchar choices)))
(provide 'subr-x)
;;; subr-x.el ends here

View file

@ -329,6 +329,8 @@ Check the current row, the previous one and the next row."
(string-width (if (stringp nt) nt (car nt)))))
tabulated-list--near-rows)))
(defvar tabulated-list-entry-lnum-width nil)
(defun tabulated-list-print (&optional remember-pos update)
"Populate the current Tabulated List mode buffer.
This sorts the `tabulated-list-entries' list if sorting is
@ -371,6 +373,7 @@ changing `tabulated-list-sort-key'."
(unless tabulated-list-use-header-line
(tabulated-list-print-fake-header)))
;; Finally, print the resulting list.
(setq tabulated-list-entry-lnum-width (tabulated-list-line-number-width))
(while entries
(let* ((elt (car entries))
(tabulated-list--near-rows
@ -383,7 +386,7 @@ changing `tabulated-list-sort-key'."
(equal entry-id id)
(setq entry-id nil
saved-pt (point)))
;; If the buffer this empty, simply print each elt.
;; If the buffer is empty, simply print each elt.
(if (or (not update) (eobp))
(apply tabulated-list-printer elt)
(while (let ((local-id (tabulated-list-get-id)))
@ -424,12 +427,10 @@ of column descriptors."
(let ((beg (point))
(x (max tabulated-list-padding 0))
(ncols (length tabulated-list-format))
(lnum-width (tabulated-list-line-number-width))
(inhibit-read-only t))
(if display-line-numbers
(setq x (+ x lnum-width)))
(setq x (+ x tabulated-list-entry-lnum-width))
(if (> tabulated-list-padding 0)
(insert (make-string (- x lnum-width) ?\s)))
(insert (make-string (- x tabulated-list-entry-lnum-width) ?\s)))
(let ((tabulated-list--near-rows ; Bind it if not bound yet (Bug#25506).
(or (bound-and-true-p tabulated-list--near-rows)
(list (or (tabulated-list-get-entry (point-at-bol 0))

View file

@ -2434,7 +2434,11 @@ See also `toggle-frame-maximized'."
(set-frame-parameter nil 'fullscreen fullscreen-restore)
(set-frame-parameter nil 'fullscreen nil)))
(modify-frame-parameters
nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))))
nil `((fullscreen . fullboth) (fullscreen-restore . ,fullscreen))))
;; Manipulating a frame without waiting for the fullscreen
;; animation to complete can cause a crash, or other unexpected
;; behaviour, on macOS (bug#28496).
(when (featurep 'cocoa) (sit-for 1))))
;;;; Key bindings

View file

@ -49,7 +49,8 @@
(require 'mm-util)
(require 'rfc2047)
(require 'puny)
(require 'subr-x) ; read-multiple-choice
(require 'rmc) ; read-multiple-choice
(eval-when-compile (require 'subr-x)) ; when-let*
(autoload 'mailclient-send-it "mailclient")

View file

@ -25,7 +25,7 @@
;;; Code:
(require 'cl-lib)
(require 'subr-x) ; read-multiple-choice
(require 'rmc) ; read-multiple-choice
(defvar nsm-permanent-host-settings nil)
(defvar nsm-temporary-host-settings nil)

View file

@ -470,6 +470,18 @@ size, and full-buffer size."
(shr-insert sub)
(shr-descend sub))))
(defun shr-indirect-call (tag-name dom &rest args)
(let ((function (intern (concat "shr-tag-" (symbol-name tag-name)) obarray))
;; Allow other packages to override (or provide) rendering
;; of elements.
(external (cdr (assq tag-name shr-external-rendering-functions))))
(cond (external
(apply external dom args))
((fboundp function)
(apply function dom args))
(t
(apply 'shr-generic dom args)))))
(defun shr-descend (dom)
(let ((function
(intern (concat "shr-tag-" (symbol-name (dom-tag dom))) obarray))
@ -490,6 +502,11 @@ size, and full-buffer size."
(setq style nil)))
;; If we have a display:none, then just ignore this part of the DOM.
(unless (equal (cdr (assq 'display shr-stylesheet)) "none")
;; We don't use shr-indirect-call here, since shr-descend is
;; the central bit of shr.el, and should be as fast as
;; possible. Having one more level of indirection with its
;; negative effect on performance is deemed unjustified in
;; this case.
(cond (external
(funcall external dom))
((fboundp function)
@ -1404,7 +1421,7 @@ ones, in case fg and bg are nil."
(when url
(cond
(image
(shr-tag-img dom url)
(shr-indirect-call 'img dom url)
(setq dom nil))
(multimedia
(shr-insert " [multimedia] ")
@ -1469,7 +1486,7 @@ The preference is a float determined from `shr-prefer-media-type'."
(unless url
(setq url (car (shr--extract-best-source dom))))
(if (> (length image) 0)
(shr-tag-img nil image)
(shr-indirect-call 'img nil image)
(shr-insert " [video] "))
(shr-urlify start (shr-expand-url url))))
@ -1964,9 +1981,9 @@ flags that control whether to collect or render objects."
do (setq tag (dom-tag child)) and
unless (memq tag '(comment style))
if (eq tag 'img)
do (shr-tag-img child)
do (shr-indirect-call 'img child)
else if (eq tag 'object)
do (shr-tag-object child)
do (shr-indirect-call 'object child)
else
do (setq recurse t) and
if (eq tag 'tr)
@ -1980,7 +1997,7 @@ flags that control whether to collect or render objects."
do (setq flags nil)
else if (car flags)
do (setq recurse nil)
(shr-tag-table child)
(shr-indirect-call 'table child)
end end end end end end end end end end
when recurse
append (shr-collect-extra-strings-in-table child flags)))

View file

@ -416,6 +416,19 @@ Every entry is a list (NAME ADDRESS).")
(defconst tramp-hal-interface-device "org.freedesktop.Hal.Device"
"The device interface of the HAL daemon.")
;; "gvfs-<command>" utilities have been deprecated in GVFS 1.31.1. We
;; must use "gio <command>" tool instead.
(defconst tramp-gvfs-gio-mapping
'(("gvfs-copy" . "copy")
("gvfs-info" . "info")
("gvfs-ls" . "list")
("gvfs-mkdir" . "mkdir")
("gvfs-monitor-file" . "monitor")
("gvfs-move" . "move")
("gvfs-rm" . "remove")
("gvfs-trash" . "trash"))
"List of cons cells, mapping \"gvfs-<command>\" to \"gio <command>\".")
(defconst tramp-gvfs-file-attributes
'("name"
"type"
@ -1078,9 +1091,12 @@ If FILE-SYSTEM is non-nil, return file system attributes."
((memq 'change flags)
'(created changed changes-done-hint moved deleted))
((memq 'attribute-change flags) '(attribute-changed))))
(p (start-process
"gvfs-monitor-file" (generate-new-buffer " *gvfs-monitor-file*")
"gvfs-monitor-file" (tramp-gvfs-url-file-name file-name))))
(p (apply
'start-process
"gvfs-monitor" (generate-new-buffer " *gvfs-monitor*")
(if (tramp-gvfs-gio-tool-p v)
`("gio" "monitor" ,(tramp-gvfs-url-file-name file-name)))
`("gvfs-monitor-file" (tramp-gvfs-url-file-name file-name)))))
(if (not (processp p))
(tramp-error
v 'file-notify-error "Monitoring not supported for `%s'" file-name)
@ -1785,10 +1801,16 @@ connection if a previous connection has died for some reason."
(tramp-gvfs-get-remote-uid vec 'string)
(tramp-gvfs-get-remote-gid vec 'string))))
(defun tramp-gvfs-gio-tool-p (vec)
"Check, whether the gio tool is available."
(with-tramp-connection-property vec "gio-tool"
(zerop (tramp-call-process vec "gio" nil nil nil "version"))))
(defun tramp-gvfs-send-command (vec command &rest args)
"Send the COMMAND with its ARGS to connection VEC.
COMMAND is usually a command from the gvfs-* utilities.
`call-process' is applied, and it returns t if the return code is zero."
COMMAND is a command from the gvfs-* utilities. It is replaced
by the corresponding gio tool call if available. `call-process'
is applied, and it returns t if the return code is zero."
(let* ((locale (tramp-get-local-locale vec))
(process-environment
(append
@ -1796,6 +1818,11 @@ COMMAND is usually a command from the gvfs-* utilities.
,(format "LANGUAGE=%s" locale)
,(format "LC_ALL=%s" locale))
process-environment)))
(when (tramp-gvfs-gio-tool-p vec)
;; Use gio tool.
(setq args (cons (cdr (assoc command tramp-gvfs-gio-mapping)) args)
command "gio"))
(with-current-buffer (tramp-get-connection-buffer vec)
(tramp-gvfs-maybe-open-connection vec)
(erase-buffer)

View file

@ -1,4 +1,4 @@
;; ob-ledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
;; ob-hledger.el --- Babel Functions for hledger -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2017 Free Software Foundation, Inc.

View file

@ -53,11 +53,15 @@ should not be inherited from a source block.")
(let* ((info (org-babel-get-src-block-info 'light))
(source-name (nth 4 info)))
(when source-name
(setq source-name (intern source-name)
org-babel-library-of-babel
(cons (cons source-name info)
(assq-delete-all source-name org-babel-library-of-babel))
lob-ingest-count (1+ lob-ingest-count)))))
(setf (nth 1 info)
(if (org-babel-noweb-p (nth 2 info) :eval)
(org-babel-expand-noweb-references info)
(nth 1 info)))
(let ((source (intern source-name)))
(setq org-babel-library-of-babel
(cons (cons source info)
(assq-delete-all source org-babel-library-of-babel))))
(cl-incf lob-ingest-count))))
(message "%d src block%s added to Library of Babel"
lob-ingest-count (if (> lob-ingest-count 1) "s" ""))
lob-ingest-count))

View file

@ -2984,6 +2984,7 @@ The details of what will be saved are regulated by the variable
;; Local variables:
;; generated-autoload-file: "org-loaddefs.el"
;; coding: utf-8
;; End:
;;; org-clock.el ends here

View file

@ -464,7 +464,8 @@ for the duration of the command.")
(kill-local-variable 'org-previous-header-line-format)
(remove-hook 'post-command-hook 'org-columns-hscroll-title 'local))
(set-marker org-columns-begin-marker nil)
(set-marker org-columns-top-level-marker nil)
(when (markerp org-columns-top-level-marker)
(set-marker org-columns-top-level-marker nil))
(org-with-silent-modifications
(mapc #'delete-overlay org-columns-overlays)
(setq org-columns-overlays nil)

View file

@ -1646,12 +1646,14 @@ In particular, this does handle wide and invisible characters."
(if (not (org-at-table-p))
(user-error "Not at a table"))
(let ((col (current-column))
(dline (org-table-current-dline)))
(dline (and (not (org-match-line org-table-hline-regexp))
(org-table-current-dline))))
(kill-region (point-at-bol) (min (1+ (point-at-eol)) (point-max)))
(if (not (org-at-table-p)) (beginning-of-line 0))
(org-move-to-column col)
(when (or (not org-table-fix-formulas-confirm)
(funcall org-table-fix-formulas-confirm "Fix formulas? "))
(when (and dline
(or (not org-table-fix-formulas-confirm)
(funcall org-table-fix-formulas-confirm "Fix formulas? ")))
(org-table-fix-formulas "@" (list (cons (number-to-string dline) "INVALID"))
dline -1 dline))))

View file

@ -5,13 +5,13 @@
(defun org-release ()
"The release version of Org.
Inserted by installing Org mode or when a release is made."
(let ((org-release "9.1.1"))
(let ((org-release "9.1.2"))
org-release))
;;;###autoload
(defun org-git-version ()
"The Git version of org-mode.
Inserted by installing Org or when a release is made."
(let ((org-git-version "release_9.1.1-37-gb1e8b5"))
(let ((org-git-version "release_9.1.2-40-g6ca906"))
org-git-version))
(provide 'org-version)

View file

@ -16071,7 +16071,9 @@ automatically performed, such drawers will be silently ignored."
(when (memq (org-element-type element) '(keyword node-property))
(let ((value (org-element-property :value element))
(start 0))
(while (string-match "%[0-9]*\\(\\S-+\\)" value start)
(while (string-match "%[0-9]*\\([[:alnum:]_-]+\\)\\(([^)]+)\\)?\
\\(?:{[^}]+}\\)?"
value start)
(setq start (match-end 0))
(let ((p (match-string-no-properties 1 value)))
(unless (member-ignore-case p org-special-properties)
@ -19481,7 +19483,6 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(org-defkey org-mode-map [(shift return)] 'org-table-copy-down)
(org-defkey org-mode-map [(meta shift return)] 'org-insert-todo-heading)
(org-defkey org-mode-map [(meta return)] 'org-meta-return)
(org-defkey org-mode-map (kbd "M-RET") #'org-meta-return)
;; Cursor keys with modifiers
@ -24204,16 +24205,25 @@ convenience:
- On an affiliated keyword, jump to the first one.
- On a table or a property drawer, move to its beginning.
- On a verse or source block, stop before blank lines."
- On comment, example, export, src and verse blocks, stop
before blank lines."
(interactive)
(unless (bobp)
(let* ((deactivate-mark nil)
(element (org-element-at-point))
(type (org-element-type element))
(contents-begin (org-element-property :contents-begin element))
(contents-end (org-element-property :contents-end element))
(post-affiliated (org-element-property :post-affiliated element))
(begin (org-element-property :begin element)))
(begin (org-element-property :begin element))
(special? ;blocks handled specially
(memq type '(comment-block example-block export-block src-block
verse-block)))
(contents-begin
(if special?
;; These types have no proper contents. Fake line
;; below the block opening line as contents beginning.
(save-excursion (goto-char begin) (line-beginning-position 2))
(org-element-property :contents-begin element))))
(cond
((not element) (goto-char (point-min)))
((= (point) begin)
@ -24224,11 +24234,8 @@ convenience:
(goto-char (org-element-property
:post-affiliated (org-element-property :parent element))))
((memq type '(property-drawer table)) (goto-char begin))
((memq type '(src-block verse-block))
(when (eq type 'src-block)
(setq contents-begin
(save-excursion (goto-char begin) (forward-line) (point))))
(if (= (point) contents-begin) (goto-char post-affiliated)
(special?
(if (<= (point) contents-begin) (goto-char post-affiliated)
;; Inside a verse block, see blank lines as paragraph
;; separators.
(let ((origin (point)))
@ -24237,7 +24244,6 @@ convenience:
(skip-chars-forward " \r\t\n" origin)
(if (= (point) origin) (goto-char contents-begin)
(beginning-of-line))))))
((not contents-begin) (goto-char (or post-affiliated begin)))
((eq type 'paragraph)
(goto-char contents-begin)
;; When at first paragraph in an item or a footnote definition,

View file

@ -174,7 +174,6 @@
(:html-klipsify-src nil nil org-html-klipsify-src)
(:html-klipse-css nil nil org-html-klipse-css)
(:html-klipse-js nil nil org-html-klipse-js)
(:html-klipse-keep-old-src nil nil org-html-keep-old-src)
(:html-klipse-selection-script nil nil org-html-klipse-selection-script)
(:infojs-opt "INFOJS_OPT" nil nil)
;; Redefine regular options.
@ -1572,12 +1571,6 @@ https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag"
:package-version '(Org . "9.1")
:type 'string)
(defcustom org-html-keep-old-src nil
"When non-nil, use <pre class=\"\"> instead of <pre><code class=\"\">."
:group 'org-export-html
:package-version '(Org . "9.1")
:type 'boolean)
;;;; Todos
@ -3402,12 +3395,16 @@ contextual information."
listing-number
(org-trim (org-export-data caption info))))))
;; Contents.
(let ((open (if org-html-keep-old-src "<pre" "<pre><code"))
(close (if org-html-keep-old-src "</pre>" "</code></pre>")))
(format "%s class=\"src src-%s\"%s%s>%s%s"
open lang label (if (and klipsify (string= lang "html"))
" data-editor-type=\"html\"" "")
code close)))))))
(if klipsify
(format "<pre><code class=\"src src-%s\"%s%s>%s</code></pre>"
lang
label
(if (string= lang "html")
" data-editor-type=\"html\""
"")
code)
(format "<pre class=\"src src-%s\"%s>%s</pre>"
lang label code)))))))
;;;; Statistics Cookie

View file

@ -435,8 +435,8 @@ This splices all the components into the list."
(let* ((base-dir (file-name-as-directory
(org-publish-property :base-directory project)))
(extension (or (org-publish-property :base-extension project) "org"))
(match (and (not (eq extension 'any))
(concat "^[^\\.].*\\.\\(" extension "\\)$")))
(match (if (eq extension 'any) ""
(format "^[^\\.].*\\.\\(%s\\)$" extension)))
(base-files
(cl-remove-if #'file-directory-p
(if (org-publish-property :recursive project)

View file

@ -1026,7 +1026,8 @@ casts and declarations are fontified. Used on level 2 and higher."
(goto-char pos)))))
nil)
(defun c-font-lock-declarators (limit list types not-top)
(defun c-font-lock-declarators (limit list types not-top
&optional template-class)
;; Assuming the point is at the start of a declarator in a declaration,
;; fontify the identifier it declares. (If TYPES is set, it does this via
;; the macro `c-fontify-types-and-refs'.)
@ -1040,6 +1041,11 @@ casts and declarations are fontified. Used on level 2 and higher."
;; non-nil, we are not at the top-level ("top-level" includes being directly
;; inside a class or namespace, etc.).
;;
;; TEMPLATE-CLASS is non-nil when the declaration is in template delimiters
;; and was introduced by, e.g. "typename" or "class", such that if there is
;; a default (introduced by "="), it will be fontified as a type.
;; E.g. "<class X = Y>".
;;
;; Nil is always returned. The function leaves point at the delimiter after
;; the last declarator it processes.
;;
@ -1112,6 +1118,13 @@ casts and declarations are fontified. Used on level 2 and higher."
(goto-char next-pos)
(setq pos nil) ; So as to terminate the enclosing `while' form.
(if (and template-class
(eq got-init ?=) ; C++ "<class X = Y>"?
(c-forward-token-2 1 nil limit) ; Over "="
(let ((c-promote-possible-types t))
(c-forward-type t))) ; Over "Y"
(setq list nil)) ; Shouldn't be needed. We can't have a list, here.
(when list
;; Jump past any initializer or function prototype to see if
;; there's a ',' to continue at.
@ -1340,8 +1353,12 @@ casts and declarations are fontified. Used on level 2 and higher."
(c-backward-syntactic-ws)
(and (c-simple-skip-symbol-backward)
(looking-at c-paren-stmt-key))))
t)))
t))
(template-class (and (eq context '<>)
(save-excursion
(goto-char match-pos)
(c-forward-syntactic-ws)
(looking-at c-template-typename-key)))))
;; Fix the `c-decl-id-start' or `c-decl-type-start' property
;; before the first declarator if it's a list.
;; `c-font-lock-declarators' handles the rest.
@ -1353,10 +1370,9 @@ casts and declarations are fontified. Used on level 2 and higher."
(if (cadr decl-or-cast)
'c-decl-type-start
'c-decl-id-start)))))
(c-font-lock-declarators
(min limit (point-max)) decl-list
(cadr decl-or-cast) (not toplev)))
(cadr decl-or-cast) (not toplev) template-class))
;; A declaration has been successfully identified, so do all the
;; fontification of types and refs that've been recorded.
@ -1650,7 +1666,8 @@ casts and declarations are fontified. Used on level 2 and higher."
;; font-lock-keyword-face. It always returns NIL to inhibit this and
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; fontification".
(let ((decl-search-lim (c-determine-limit 1000))
(let ((here (point))
(decl-search-lim (c-determine-limit 1000))
paren-state encl-pos token-end context decl-or-cast
start-pos top-level c-restricted-<>-arglists
c-recognize-knr-p) ; Strictly speaking, bogus, but it
@ -1667,26 +1684,27 @@ casts and declarations are fontified. Used on level 2 and higher."
(when (or (bobp)
(memq (char-before) '(?\; ?{ ?})))
(setq token-end (point))
(c-forward-syntactic-ws)
;; We're now putatively at the declaration.
(setq start-pos (point))
(setq paren-state (c-parse-state))
;; At top level or inside a "{"?
(if (or (not (setq encl-pos
(c-most-enclosing-brace paren-state)))
(eq (char-after encl-pos) ?\{))
(progn
(setq top-level (c-at-toplevel-p))
(let ((got-context (c-get-fontification-context
token-end nil top-level)))
(setq context (car got-context)
c-restricted-<>-arglists (cdr got-context)))
(setq decl-or-cast
(c-forward-decl-or-cast-1 token-end context nil))
(when (consp decl-or-cast)
(goto-char start-pos)
(c-font-lock-single-decl limit decl-or-cast token-end
context top-level)))))))
(c-forward-syntactic-ws here)
(when (< (point) here)
;; We're now putatively at the declaration.
(setq start-pos (point))
(setq paren-state (c-parse-state))
;; At top level or inside a "{"?
(if (or (not (setq encl-pos
(c-most-enclosing-brace paren-state)))
(eq (char-after encl-pos) ?\{))
(progn
(setq top-level (c-at-toplevel-p))
(let ((got-context (c-get-fontification-context
token-end nil top-level)))
(setq context (car got-context)
c-restricted-<>-arglists (cdr got-context)))
(setq decl-or-cast
(c-forward-decl-or-cast-1 token-end context nil))
(when (consp decl-or-cast)
(goto-char start-pos)
(c-font-lock-single-decl limit decl-or-cast token-end
context top-level))))))))
nil))
(defun c-font-lock-enclosing-decls (limit)
@ -1996,85 +2014,6 @@ on level 2 only and so aren't combined with `c-complex-decl-matchers'."
2 font-lock-type-face)
`(,(concat "\\<\\(" re "\\)\\>")
1 'font-lock-type-face)))
;; Fontify types preceded by `c-type-prefix-kwds' (e.g. "struct").
,@(when (c-lang-const c-type-prefix-kwds)
`((,(byte-compile
`(lambda (limit)
(c-fontify-types-and-refs
((c-promote-possible-types t)
;; The font-lock package in Emacs is known to clobber
;; `parse-sexp-lookup-properties' (when it exists).
(parse-sexp-lookup-properties
(cc-eval-when-compile
(boundp 'parse-sexp-lookup-properties))))
(save-restriction
;; Narrow to avoid going past the limit in
;; `c-forward-type'.
(narrow-to-region (point) limit)
(while (re-search-forward
,(concat "\\<\\("
(c-make-keywords-re nil
(c-lang-const c-type-prefix-kwds))
"\\)\\>")
limit t)
(unless (c-skip-comments-and-strings limit)
(c-forward-syntactic-ws)
;; Handle prefix declaration specifiers.
(while
(or
(when (or (looking-at c-prefix-spec-kwds-re)
(and (c-major-mode-is 'java-mode)
(looking-at "@[A-Za-z0-9]+")))
(c-forward-keyword-clause 1)
t)
(when (and c-opt-cpp-prefix
(looking-at
c-noise-macro-with-parens-name-re))
(c-forward-noise-clause)
t)))
,(if (c-major-mode-is 'c++-mode)
`(when (and (c-forward-type)
(eq (char-after) ?=))
;; In C++ we additionally check for a "class
;; X = Y" construct which is used in
;; templates, to fontify Y as a type.
(forward-char)
(c-forward-syntactic-ws)
(c-forward-type))
`(c-forward-type))
)))))))))
;; Fontify symbols after closing braces as declaration
;; identifiers under the assumption that they are part of
;; declarations like "class Foo { ... } foo;". It's too
;; expensive to check this accurately by skipping past the
;; brace block, so we use the heuristic that it's such a
;; declaration if the first identifier is on the same line as
;; the closing brace. `c-font-lock-declarations' will later
;; override it if it turns out to be an new declaration, but
;; it will be wrong if it's an expression (see the test
;; decls-8.cc).
;; ,@(when (c-lang-const c-opt-block-decls-with-vars-key)
;; `((,(c-make-font-lock-search-function
;; (concat "}"
;; (c-lang-const c-single-line-syntactic-ws)
;; "\\(" ; 1 + c-single-line-syntactic-ws-depth
;; (c-lang-const c-type-decl-prefix-key)
;; "\\|"
;; (c-lang-const c-symbol-key)
;; "\\)")
;; `((c-font-lock-declarators limit t nil) ; That nil says use `font-lock-variable-name-face';
;; ; t would mean `font-lock-function-name-face'.
;; (progn
;; (c-put-char-property (match-beginning 0) 'c-type
;; 'c-decl-id-start)
;; ; 'c-decl-type-start)
;; (goto-char (match-beginning
;; ,(1+ (c-lang-const
;; c-single-line-syntactic-ws-depth)))))
;; (goto-char (match-end 0)))))))
;; Fontify the type in C++ "new" expressions.
,@(when (c-major-mode-is 'c++-mode)
;; This pattern is a probably a "(MATCHER . ANCHORED-HIGHLIGHTER)"

View file

@ -1896,6 +1896,17 @@ the type of that expression."
t (c-make-keywords-re t (c-lang-const c-typeof-kwds)))
(c-lang-defvar c-typeof-key (c-lang-const c-typeof-key))
(c-lang-defconst c-template-typename-kwds
"Keywords which, within a template declaration, can introduce a
declaration with a type as a default value. This is used only in
C++ Mode, e.g. \"<typename X = Y>\"."
t nil
c++ '("class" "typename"))
(c-lang-defconst c-template-typename-key
t (c-make-keywords-re t (c-lang-const c-template-typename-kwds)))
(c-lang-defvar c-template-typename-key (c-lang-const c-template-typename-key))
(c-lang-defconst c-type-prefix-kwds
"Keywords where the following name - if any - is a type name, and
where the keyword together with the symbol works as a type in

View file

@ -1599,8 +1599,11 @@ ARGLIST is either a string, or a list of strings or symbols."
(defvar checkdoc-autofix-flag)
(defvar checkdoc-generate-compile-warnings-flag)
(defvar checkdoc-diagnostic-buffer)
(defun elisp-flymake--checkdoc-1 ()
"Do actual work for `elisp-flymake-checkdoc'."
;;;###autoload
(defun elisp-flymake-checkdoc (report-fn &rest _args)
"A Flymake backend for `checkdoc'.
Calls REPORT-FN directly."
(let (collected)
(let* ((checkdoc-create-error-function
(lambda (text start end &optional unfixable)
@ -1608,63 +1611,52 @@ ARGLIST is either a string, or a list of strings or symbols."
nil))
(checkdoc-autofix-flag nil)
(checkdoc-generate-compile-warnings-flag nil)
(buf (generate-new-buffer " *checkdoc-temp*"))
(checkdoc-diagnostic-buffer buf))
(checkdoc-diagnostic-buffer
(generate-new-buffer " *checkdoc-temp*")))
(unwind-protect
(save-excursion
(checkdoc-current-buffer t))
(kill-buffer buf)))
(kill-buffer checkdoc-diagnostic-buffer)))
(funcall report-fn
(cl-loop for (text start end _unfixable) in
collected
collect
(flymake-make-diagnostic
(current-buffer)
start end :note text)))
collected))
;;;###autoload
(defun elisp-flymake-checkdoc (report-fn &rest _args)
"A Flymake backend for `checkdoc'.
Calls REPORT-FN directly."
(unless (derived-mode-p 'emacs-lisp-mode)
(error "Can only work on `emacs-lisp-mode' buffers"))
(funcall report-fn
(cl-loop for (text start end _unfixable) in
(elisp-flymake--checkdoc-1)
collect
(flymake-make-diagnostic
(current-buffer)
start end :note text))))
(defun elisp-flymake--byte-compile-done (report-fn
origin-buffer
output-buffer
temp-file)
(unwind-protect
(with-current-buffer
origin-buffer
(save-excursion
(save-restriction
(widen)
(funcall
report-fn
(cl-loop with data =
(with-current-buffer output-buffer
(goto-char (point-min))
(search-forward ":elisp-flymake-output-start")
(read (point-marker)))
for (string pos _fill level) in data
do (goto-char pos)
for beg = (if (< (point) (point-max))
(point)
(line-beginning-position))
for end = (min
(line-end-position)
(or (cdr
(bounds-of-thing-at-point 'sexp))
(point-max)))
collect (flymake-make-diagnostic
(current-buffer)
(if (= beg end) (1- beg) beg)
end
level
string))))))
(kill-buffer output-buffer)
(ignore-errors (delete-file temp-file))))
source-buffer
output-buffer)
(with-current-buffer
source-buffer
(save-excursion
(save-restriction
(widen)
(funcall
report-fn
(cl-loop with data =
(with-current-buffer output-buffer
(goto-char (point-min))
(search-forward ":elisp-flymake-output-start")
(read (point-marker)))
for (string pos _fill level) in data
do (goto-char pos)
for beg = (if (< (point) (point-max))
(point)
(line-beginning-position))
for end = (min
(line-end-position)
(or (cdr
(bounds-of-thing-at-point 'sexp))
(point-max)))
collect (flymake-make-diagnostic
(current-buffer)
(if (= beg end) (1- beg) beg)
end
level
string)))))))
(defvar-local elisp-flymake--byte-compile-process nil
"Buffer-local process started for byte-compiling the buffer.")
@ -1674,16 +1666,11 @@ Calls REPORT-FN directly."
"A Flymake backend for elisp byte compilation.
Spawn an Emacs process that byte-compiles a file representing the
current buffer state and calls REPORT-FN when done."
(interactive (list (lambda (stuff)
(message "aha %s" stuff))))
(unless (derived-mode-p 'emacs-lisp-mode)
(error "Can only work on `emacs-lisp-mode' buffers"))
(when elisp-flymake--byte-compile-process
(process-put elisp-flymake--byte-compile-process 'elisp-flymake--obsolete t)
(when (process-live-p elisp-flymake--byte-compile-process)
(kill-process elisp-flymake--byte-compile-process)))
(let ((temp-file (make-temp-file "elisp-flymake-byte-compile"))
(origin-buffer (current-buffer)))
(source-buffer (current-buffer)))
(save-restriction
(widen)
(write-region (point-min) (point-max) temp-file nil 'nomessage))
@ -1703,21 +1690,22 @@ current buffer state and calls REPORT-FN when done."
:connection-type 'pipe
:sentinel
(lambda (proc _event)
(unless (process-live-p proc)
(when (eq (process-status proc) 'exit)
(unwind-protect
(cond
((not (eq proc elisp-flymake--byte-compile-process))
(flymake-log :warning "byte-compile process %s obsolete" proc))
((zerop (process-exit-status proc))
(elisp-flymake--byte-compile-done report-fn
origin-buffer
output-buffer
temp-file))
((process-get proc 'elisp-flymake--obsolete)
(flymake-log :warning "byte-compile process %s obsolete" proc))
source-buffer
output-buffer))
(t
(funcall report-fn
:panic
:explanation
(format "byte-compile process %s died" proc)))))))))
(format "byte-compile process %s died" proc))))
(ignore-errors (delete-file temp-file))
(kill-buffer output-buffer))))))
:stderr null-device
:noquery t)))

View file

@ -113,7 +113,7 @@ NAME is the file name function to use, default `flymake-proc-get-real-file-name'
"Currently active Flymake process for a buffer, if any.")
(defvar flymake-proc--report-fn nil
"If bound, function used to report back to flymake's UI.")
"If bound, function used to report back to Flymake's UI.")
(defun flymake-proc-reformat-err-line-patterns-from-compile-el (original-list)
"Grab error line patterns from ORIGINAL-LIST in compile.el format.
@ -265,7 +265,6 @@ Return t if so, nil if not."
(defun flymake-proc--find-possible-master-files (file-name master-file-dirs masks)
"Find (by name and location) all possible master files.
Name is specified by FILE-NAME and location is specified by
MASTER-FILE-DIRS. Master files include .cpp and .c for .h.
Files are searched for starting from the .h directory and max
@ -626,7 +625,7 @@ Create parent directories as needed."
(defun flymake-proc--panic (problem explanation)
"Tell Flymake UI about a fatal PROBLEM with this backend.
May only be called in a dynamic environment where
`flymake-proc--dynamic-report-fn' is bound"
`flymake-proc--report-fn' is bound."
(flymake-log 0 "%s: %s" problem explanation)
(if (and (boundp 'flymake-proc--report-fn)
flymake-proc--report-fn)
@ -718,7 +717,7 @@ May only be called in a dynamic environment where
(defun flymake-proc-legacy-flymake (report-fn &rest args)
"Flymake backend based on the original Flymake implementation.
This function is suitable for inclusion in
`flymake-diagnostic-types-alist'. For backward compatibility, it
`flymake-diagnostic-functions'. For backward compatibility, it
can also be executed interactively independently of
`flymake-mode'."
;; Interactively, behave as if flymake had invoked us through its

View file

@ -203,7 +203,7 @@ generated it."
`(flymake--log-1 ,level ',sublog ,msg ,@args)))
(defun flymake-error (text &rest args)
"Format TEXT with ARGS and signal an error for flymake."
"Format TEXT with ARGS and signal an error for Flymake."
(let ((msg (apply #'format-message text args)))
(flymake-log :error msg)
(error (concat "[Flymake] " msg))))
@ -223,17 +223,6 @@ TYPE is a key to `flymake-diagnostic-types-alist' and TEXT is a
description of the problem detected in this region."
(flymake--diag-make :buffer buffer :beg beg :end end :type type :text text))
(defun flymake-ler-make-ler (file line type text &optional full-file)
(let* ((file (or full-file file))
(buf (find-buffer-visiting file)))
(unless buf (flymake-error "No buffer visiting %s" file))
(pcase-let* ((`(,beg . ,end)
(with-current-buffer buf
(flymake-diag-region line nil))))
(flymake-make-diagnostic buf beg end type text))))
(make-obsolete 'flymake-ler-make-ler 'flymake-make-diagnostic "26.1")
(cl-defun flymake--overlays (&key beg end filter compare key)
"Get flymake-related overlays.
If BEG is non-nil and END is nil, consider only `overlays-at'
@ -342,7 +331,7 @@ function is called with an arbitrary number of arguments:
* the remaining arguments are keyword-value pairs in the
form (:KEY VALUE :KEY2 VALUE2...). Currently, Flymake provides
no such arguments, but backend functions must be prepared to
accept to accept and possibly ignore any number of them.
accept and possibly ignore any number of them.
Backend functions are expected to initiate the buffer check, but
aren't required to complete it check before exiting: if the
@ -385,8 +374,8 @@ Currently accepted REPORT-KEY arguments are:
* :explanation: value should give user-readable details of
the situation encountered, if any.
* :force: value should be a boolean suggesting that the Flymake
considers the report even if was somehow unexpected.")
* :force: value should be a boolean suggesting that Flymake
consider the report even if it was somehow unexpected.")
(defvar flymake-diagnostic-types-alist
`((:error
@ -395,15 +384,17 @@ Currently accepted REPORT-KEY arguments are:
. ((flymake-category . flymake-warning)))
(:note
. ((flymake-category . flymake-note))))
"Alist ((KEY . PROPS)*) of properties of Flymake error types.
KEY can be anything passed as `:type' to `flymake-diag-make'.
"Alist ((KEY . PROPS)*) of properties of Flymake diagnostic types.
KEY designates a kind of diagnostic can be anything passed as
`:type' to `flymake-make-diagnostic'.
PROPS is an alist of properties that are applied, in order, to
the diagnostics of each type. The recognized properties are:
the diagnostics of the type designated by KEY. The recognized
properties are:
* Every property pertaining to overlays, except `category' and
`evaporate' (see Info Node `(elisp)Overlay Properties'), used
affect the appearance of Flymake annotations.
to affect the appearance of Flymake annotations.
* `bitmap', an image displayed in the fringe according to
`flymake-fringe-indicator-position'. The value actually
@ -522,23 +513,22 @@ associated `flymake-category' return DEFAULT."
"Buffer-local hash table of a Flymake backend's state.
The keys to this hash table are functions as found in
`flymake-diagnostic-functions'. The values are structures
of the type `flymake--backend-state', with these slots
of the type `flymake--backend-state', with these slots:
`running', a symbol to keep track of a backend's replies via its
REPORT-FN argument. A backend is running if this key is
present. If the key is absent if the backend isn't expecting any
replies from the backend.
present. If nil, Flymake isn't expecting any replies from the
backend.
`diags', a (possibly empty) list of diagnostic objects created
with `flymake-make-diagnostic'. This key is absent if the
backend hasn't reported anything yet.
`diags', a (possibly empty) list of recent diagnostic objects
created by the backend with `flymake-make-diagnostic'.
`reported-p', a boolean indicating if the backend has replied
since it last was contacted.
`disabled', a string with the explanation for a previous
exceptional situation reported by the backend. If this key is
present the backend is disabled.")
exceptional situation reported by the backend, nil if the
backend is operating normally.")
(cl-defstruct (flymake--backend-state
(:constructor flymake--make-backend-state))
@ -563,7 +553,6 @@ present the backend is disabled.")
&key explanation force
&allow-other-keys)
"Handle reports from BACKEND identified by TOKEN.
BACKEND, REPORT-ACTION and EXPLANATION, and FORCE conform to the calling
convention described in `flymake-diagnostic-functions' (which
see). Optional FORCE says to handle a report even if TOKEN was
@ -650,7 +639,7 @@ different runs of the same backend."
(defun flymake--disable-backend (backend &optional explanation)
"Disable BACKEND because EXPLANATION.
If is is running also stop it."
If it is running also stop it."
(flymake-log :warning "Disabling backend %s because %s" backend explanation)
(flymake--with-backend-state backend state
(setf (flymake--backend-state-running state) nil
@ -666,7 +655,7 @@ If is is running also stop it."
(flymake--backend-state-disabled state) nil
(flymake--backend-state-diags state) nil
(flymake--backend-state-reported-p state) nil))
;; FIXME: Should use `condition-case-unless-debug' here, for don't
;; FIXME: Should use `condition-case-unless-debug' here, but don't
;; for two reasons: (1) that won't let me catch errors from inside
;; `ert-deftest' where `debug-on-error' appears to be always
;; t. (2) In cases where the user is debugging elisp somewhere
@ -719,18 +708,14 @@ Interactively, with a prefix arg, FORCE is t."
(cond
;; Turning the mode ON.
(flymake-mode
(cond
((not flymake-diagnostic-functions)
(flymake-error "No backends to check buffer %s" (buffer-name)))
(t
(add-hook 'after-change-functions 'flymake-after-change-function nil t)
(add-hook 'after-save-hook 'flymake-after-save-hook nil t)
(add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
(add-hook 'after-change-functions 'flymake-after-change-function nil t)
(add-hook 'after-save-hook 'flymake-after-save-hook nil t)
(add-hook 'kill-buffer-hook 'flymake-kill-buffer-hook nil t)
(setq flymake--backend-state (make-hash-table))
(setq flymake--backend-state (make-hash-table))
(when flymake-start-syntax-check-on-find-file
(flymake-start)))))
(when flymake-start-syntax-check-on-find-file
(flymake-start)))
;; Turning the mode OFF.
(t
@ -806,13 +791,11 @@ Do it only if `flymake-no-changes-timeout' is non-nil."
(defun flymake-goto-next-error (&optional n filter interactive)
"Go to Nth next Flymake error in buffer matching FILTER.
Interactively, always move to the next error. With a prefix arg,
skip any diagnostics with a severity less than :warning.
Interactively, always move to the next error. Interactively, and
with a prefix arg, skip any diagnostics with a severity less than
:warning.
If flymake-wrap-around is non-nil, resumes search from top
at end of buffer.
If flymake-wrap-around is non-nil and no more next errors,
resumes search from top.
FILTER is a list of diagnostic types found in
`flymake-diagnostic-types-alist', or nil, if no filter is to be
@ -852,6 +835,7 @@ applied."
(goto-char (overlay-start target))
(when interactive
(message
"%s"
(funcall (overlay-get target 'help-echo)
nil nil (point)))))
(interactive
@ -862,13 +846,11 @@ applied."
(defun flymake-goto-prev-error (&optional n filter interactive)
"Go to Nth previous Flymake error in buffer matching FILTER.
Interactively, always move to the previous error. With a prefix
arg, skip any diagnostics with a severity less than :warning.
Interactively, always move to the previous error. Interactively,
and with a prefix arg, skip any diagnostics with a severity less
than :warning.
If flymake-wrap-around is non-nil, resumes search from top
at end of buffer.
If flymake-wrap-around is non-nil and no more previous errors,
resumes search from bottom.
FILTER is a list of diagnostic types found in
`flymake-diagnostic-types-alist', or nil, if no filter is to be

View file

@ -640,10 +640,14 @@ The type returned can be `comment', `string' or `paren'."
((python-rx string-delimiter)
(0 (ignore (python-syntax-stringify))))))
(defconst python--prettify-symbols-alist
(defvar python-prettify-symbols-alist
'(("lambda" . )
("and" . ?∧)
("or" . ?)))
("or" . ?))
"Value for `prettify-symbols-alist' in `python-mode'.")
(define-obsolete-variable-alias 'python--prettify-symbols-alist
'python-prettify-symbols-alist "26.1")
(defsubst python-syntax-count-quotes (quote-char &optional point limit)
"Count number of quotes around point (max is 3).

View file

@ -1254,8 +1254,7 @@ preceding cell has spilled over."
((< len width)
;; Fill field to length with spaces.
(setq len (make-string (- width len) ?\s)
text (if (or (stringp value)
(eq ses-call-printer-return t))
text (if (eq ses-call-printer-return t)
(concat text len)
(concat len text))))
((> len width)

View file

@ -110,8 +110,7 @@ BODY should be a list of Lisp expressions.
\(fn ARGS [DOCSTRING] [INTERACTIVE] BODY)"
(declare (doc-string 2) (indent defun)
(debug (&define lambda-list
[&optional stringp]
(debug (&define lambda-list lambda-doc
[&optional ("interactive" interactive)]
def-body)))
;; Note that this definition should not use backquotes; subr.el should not

View file

@ -288,8 +288,10 @@ which is the \"1006\" extension implemented in Xterm >= 277."
(string-match "down-" last-name)
(equal name (replace-match "" t t last-name)))
(xterm-mouse--set-click-count event click-count)))
((not last-time) nil)
((and (> double-click-time (* 1000 (- this-time last-time)))
((and last-time
double-click-time
(or (eq double-click-time t)
(> double-click-time (* 1000 (- this-time last-time))))
(equal last-name (replace-match "" t t name)))
(setq click-count (1+ click-count))
(xterm-mouse--set-click-count event click-count))

View file

@ -66,7 +66,7 @@ struct dim
/* Function prototypes. */
static void update_frame_line (struct frame *, int);
static void update_frame_line (struct frame *, int, bool);
static int required_matrix_height (struct window *);
static int required_matrix_width (struct window *);
static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
@ -88,7 +88,7 @@ static void check_matrix_pointers (struct glyph_matrix *,
static void mirror_line_dance (struct window *, int, int, int *, char *);
static bool update_window_tree (struct window *, bool);
static bool update_window (struct window *, bool);
static bool update_frame_1 (struct frame *, bool, bool, bool);
static bool update_frame_1 (struct frame *, bool, bool, bool, bool);
static bool scrolling (struct frame *);
static void set_window_cursor_after_update (struct window *);
static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
@ -3121,7 +3121,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
/* Update the display. */
update_begin (f);
paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1);
paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
update_end (f);
if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
@ -3174,7 +3174,7 @@ update_frame_with_menu (struct frame *f, int row, int col)
cursor_at_point_p = !(row >= 0 && col >= 0);
/* Force update_frame_1 not to stop due to pending input, and not
try scrolling. */
paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p);
paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p, true);
/* ROW and COL tell us where in the menu to position the cursor, so
that screen readers know the active region on the screen. */
if (!cursor_at_point_p)
@ -4474,7 +4474,7 @@ scrolling_window (struct window *w, bool header_line_p)
static bool
update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
bool set_cursor_p)
bool set_cursor_p, bool updating_menu_p)
{
/* Frame matrices to work on. */
struct glyph_matrix *current_matrix = f->current_matrix;
@ -4513,7 +4513,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
/* Update the individual lines as needed. Do bottom line first. */
if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1))
update_frame_line (f, desired_matrix->nrows - 1);
update_frame_line (f, desired_matrix->nrows - 1, updating_menu_p);
/* Now update the rest of the lines. */
for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++)
@ -4539,7 +4539,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
if (!force_p && (i - 1) % preempt_count == 0)
detect_input_pending_ignore_squeezables ();
update_frame_line (f, i);
update_frame_line (f, i, updating_menu_p);
}
}
@ -4775,7 +4775,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
/* Perform a frame-based update on line VPOS in frame FRAME. */
static void
update_frame_line (struct frame *f, int vpos)
update_frame_line (struct frame *f, int vpos, bool updating_menu_p)
{
struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
int tem;
@ -4814,6 +4814,12 @@ update_frame_line (struct frame *f, int vpos)
current_row->enabled_p = true;
current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA];
/* For some reason, cursor is sometimes moved behind our back when a
frame with a TTY menu is redrawn. Homing the cursor as below
fixes that. */
if (updating_menu_p)
cursor_to (f, 0, 0);
/* If desired line is empty, just clear the line. */
if (!desired_row->enabled_p)
{

View file

@ -4179,6 +4179,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
multibyte character of the previous string. This flag tells if we
must consider such a situation or not. */
bool maybe_combine_byte;
Lisp_Object val;
bool arg_intervals = false;
USE_SAFE_ALLOCA;
sa_avail -= sizeof initial_buffer;
@ -4417,7 +4418,10 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
{
if (format == end && format - format_start == 2
&& ! string_intervals (args[0]))
return arg;
{
val = arg;
goto return_val;
}
/* handle case (precision[n] >= 0) */
@ -4862,11 +4866,14 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
emacs_abort ();
if (! new_result)
return args[0];
{
val = args[0];
goto return_val;
}
if (maybe_combine_byte)
nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf);
Lisp_Object val = make_specified_string (buf, nchars, p - buf, multibyte);
val = make_specified_string (buf, nchars, p - buf, multibyte);
/* If the format string has text properties, or any of the string
arguments has text properties, set up text properties of the
@ -4964,6 +4971,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
}
}
return_val:
/* If we allocated BUF or INFO with malloc, free it too. */
SAFE_FREE ();

View file

@ -2472,7 +2472,6 @@ syms_of_gnutls (void)
DEFSYM (QCcipher_blocksize, ":cipher-blocksize");
DEFSYM (QCcipher_keysize, ":cipher-keysize");
DEFSYM (QCcipher_tagsize, ":cipher-tagsize");
DEFSYM (QCcipher_keysize, ":cipher-keysize");
DEFSYM (QCcipher_ivsize, ":cipher-ivsize");
DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id");

View file

@ -6893,6 +6893,9 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize
NSTRACE_RECT ("[sender frame]", [sender frame]);
NSTRACE_FSTYPE ("fs_state", fs_state);
if (!FRAME_LIVE_P (emacsframe))
return frameSize;
if (fs_state == FULLSCREEN_MAXIMIZED
&& (maximized_width != (int)frameSize.width
|| maximized_height != (int)frameSize.height))

View file

@ -8097,7 +8097,6 @@ syms_of_process (void)
DEFSYM (Qreal, "real");
DEFSYM (Qnetwork, "network");
DEFSYM (Qserial, "serial");
DEFSYM (Qpipe, "pipe");
DEFSYM (QCbuffer, ":buffer");
DEFSYM (QChost, ":host");
DEFSYM (QCservice, ":service");

View file

@ -232,7 +232,18 @@ emacs_get_current_dir_name (void)
bool use_libc = true;
# endif
if (use_libc)
return get_current_dir_name ();
{
/* GNU/Linux get_current_dir_name can return a string starting
with "(unreachable)" (Bug#27871). */
char *wd = get_current_dir_name ();
if (wd && ! (IS_DIRECTORY_SEP (*wd) || (*wd && IS_DEVICE_SEP (wd[1]))))
{
free (wd);
errno = ENOENT;
return NULL;
}
return wd;
}
# endif
char *buf;

View file

@ -282,3 +282,13 @@ identical output.
(ert-deftest cps-test-declarations-preserved ()
(should (equal (documentation 'generator-with-docstring) "Documentation!"))
(should (equal (get 'generator-with-docstring 'lisp-indent-function) 5)))
(ert-deftest cps-iter-lambda-with-dynamic-binding ()
"`iter-lambda' with dynamic binding produces correct result (bug#25965)."
(should (= 1
(iter-next
(funcall (iter-lambda ()
(let* ((fill-column 10) ;;any special variable will do
(i 0)
(j (setq i (1+ i))))
(iter-yield i))))))))