summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-06-19 00:47:00 +0200
committerPaul Eggert <eggert@cs.ucla.edu>2016-06-19 00:47:00 +0200
commit68cb71c0928eb8b10487a125192f43923e8bfe7f (patch)
tree053133358af1bd991d60ed6c29590ad84b29fed0
parent87c9d8fcec183c8f4933e218c1895b6a0722b1e1 (diff)
parent9ae514a9b7ed368ea97ddefa806079b6423833cb (diff)
Merge from origin/emacs-25
9ae514a * etc/AUTHORS: Update the AUTHORS file 3ca428e add entries to authors.el 66d556b Fix eldoc-related freezes in python mode d59bcbc Handle mouse leaving initial window in `mouse-set-region' (Bu... 27fe1e4 org.el: Fix bindings of < and > for calendar scrolling a813487 Fix undo boundary in recursive edit (Bug#23632) 1f85b7c Doc fixes re alist-get. (Bug#23548) ba3f206 * lisp/progmodes/python.el (inferior-python-mode): Avoid tabs... 56fa055 * src/syntax.c (syms_of_syntax) <comment-end-can-be-escaped>:... 4c1370a * lisp/help-fns.el (describe-function-1): Fix handling of fil... a3f7ae8 * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix re "by". 601b9b2 * doc/misc/cl.texi (Mapping over Sequences): Fix cl-notevery.
-rw-r--r--admin/authors.el2
-rw-r--r--doc/lispref/lists.texi12
-rw-r--r--doc/misc/cl.texi2
-rw-r--r--etc/AUTHORS15
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/emacs-lisp/cl-macs.el4
-rw-r--r--lisp/help-fns.el3
-rw-r--r--lisp/mouse.el7
-rw-r--r--lisp/org/org.el4
-rw-r--r--lisp/progmodes/python.el40
-rw-r--r--lisp/simple.el4
-rw-r--r--lisp/subr.el10
-rw-r--r--src/keyboard.c10
-rw-r--r--src/syntax.c2
-rw-r--r--test/lisp/simple-tests.el32
15 files changed, 120 insertions, 30 deletions
diff --git a/admin/authors.el b/admin/authors.el
index b93c9b251c..1447bd4f49 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -886,6 +886,8 @@ in the repository.")
("ED.WORSHIP" . "JOKES")
("GNU.JOKES" . "JOKES")
("CHARACTERS" . "TODO")
+ ("lisp/character-fold.el" . "lisp/char-fold.el")
+ ("test/automated/character-fold-tests.el" . "test/automated/char-fold-tests.el")
("images/gnus/mail_send.xpm" . "mail-send.xpm") ; still in images/gnus
;; Renamed within same directory.
("schema/xhtml-basic-form.rnc" . "xhtml-bform.rnc" )
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index c18c408209..e7a739f88f 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1556,12 +1556,16 @@ keys may not be symbols:
@end smallexample
@end defun
-@defun alist-get key value &optional default
+@defun alist-get key value &optional default remove
This function is like @code{assq}, but instead of returning the entire
association for @var{key}, @code{(@var{key} . @var{value})}, it
-returns just the @var{value}. It returns @var{default} if @var{key}
-is not found in @var{alist}, defaulting to @code{nil} if @var{default}
-is omitted.
+returns just the @var{value}. If @var{key} is not found in
+@var{alist} it returns @var{default}.
+
+This is a generalized variable (@pxref{Generalized Variables}) that
+can be used to change a value with @code{setf}. When using it to set
+a value, optional argument @var{remove} non-nil means to remove
+@var{key} from @var{alist} if the new value is @code{eql} to @var{default}.
@end defun
@defun rassq value alist
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 4137a95b3b..a98d0ac455 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -3364,7 +3364,7 @@ was @code{nil} for all elements.
@defun cl-notevery predicate seq &rest more-seqs
This function calls @var{predicate} on each element of the sequence(s)
in turn; it returns a non-@code{nil} value as soon as @var{predicate}
-returns @code{nil} for any element, or @code{t} if the predicate was
+returns @code{nil} for any element, or @code{nil} if the predicate was
true for all elements.
@end defun
diff --git a/etc/AUTHORS b/etc/AUTHORS
index 760d7354ba..9a4aaf6d55 100644
--- a/etc/AUTHORS
+++ b/etc/AUTHORS
@@ -351,14 +351,13 @@ and changed ada-mode.texi frames.texi generic-x.el texinfo.el
Artem Chuprina: changed message.el
-Artur Malabarba: wrote character-fold-tests.el faces-tests.el
- isearch-tests.el let-alist.el simple-test.el sort-tests.el
- tabulated-list-test.el
-and changed package.el isearch.el character-fold.el files.el
- tabulated-list.el package-test.el menu-bar.el faces.el files-x.el
- help-fns.el replace.el align.el bytecomp.el custom.texi cl-lib-tests.el
- custom.el map.el simple.el subr-tests.el variables.texi bindings.el
- and 39 other files
+Artur Malabarba: wrote char-fold-tests.el faces-tests.el isearch-tests.el
+ let-alist.el simple-test.el sort-tests.el tabulated-list-test.el
+and changed package.el isearch.el lisp/char-fold.el files.el
+ tabulated-list.el package-test.el menu-bar.el
+ test/automated/char-fold-tests.el faces.el files-x.el help-fns.el
+ replace.el align.el bytecomp.el custom.texi cl-lib-tests.el custom.el
+ map.el simple.el subr-tests.el variables.texi and 40 other files
Arun Persaud: changed org-agenda.el org-src.el
diff --git a/etc/NEWS b/etc/NEWS
index d8583cf5ab..b3a044d4cd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2177,7 +2177,8 @@ codeset is "UTF-8" (as in "en_US.UTF-8"). This is needed because
MS-Windows doesn't support UTF-8 as codeset in its locales.
+++
-** New function 'alist-get', which is also a valid place (aka lvalue).
+** New function 'alist-get', which is a generalized variable
+suitable for use with 'setf'.
+++
** New function 'funcall-interactively', which works like 'funcall'
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 121738df57..d2c90c2b80 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -851,9 +851,9 @@ This is compatible with Common Lisp, but note that `defun' and
"The Common Lisp `loop' macro.
Valid clauses include:
For clauses:
- for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3
+ for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 [by EXPR3]
for VAR = EXPR1 then EXPR2
- for VAR in/on/in-ref LIST by FUNC
+ for VAR in/on/in-ref LIST [by FUNC]
for VAR across/across-ref ARRAY
for VAR being:
the elements of/of-ref SEQUENCE [using (index VAR2)]
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e92019f934..97c8df2298 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -583,7 +583,8 @@ FILE is the file where FUNCTION was probably defined."
(sig-key (if (subrp def)
(indirect-function real-def)
real-def))
- (file-name (find-lisp-object-file-name function def))
+ (file-name (find-lisp-object-file-name function (if aliased 'defun
+ def)))
(pt1 (with-current-buffer (help-buffer) (point)))
(beg (if (and (or (byte-code-function-p def)
(keymapp def)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0be17b48ca..8d727536e0 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -575,7 +575,12 @@ command alters the kill ring or not."
(mouse-minibuffer-check click)
(select-window (posn-window (event-start click)))
(let ((beg (posn-point (event-start click)))
- (end (posn-point (event-end click)))
+ (end
+ (if (eq (posn-window (event-end click)) (selected-window))
+ (posn-point (event-end click))
+ ;; If the mouse ends up in any other window or on the menu
+ ;; bar, use `window-point' of selected window (Bug#23707).
+ (window-point)))
(click-count (event-click-count click)))
(let ((drag-start (terminal-parameter nil 'mouse-drag-start)))
(when drag-start
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 1d060f871f..30ef5e83bd 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -16297,10 +16297,10 @@ So these are more for recording a certain time/date."
(message "")))
(org-defkey map ">"
(lambda () (interactive)
- (org-eval-in-calendar '(scroll-calendar-left 1))))
+ (org-eval-in-calendar '(calendar-scroll-left 1))))
(org-defkey map "<"
(lambda () (interactive)
- (org-eval-in-calendar '(scroll-calendar-right 1))))
+ (org-eval-in-calendar '(calendar-scroll-right 1))))
(org-defkey map "\C-v"
(lambda () (interactive)
(org-eval-in-calendar
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d4089a3ea9..ad69f8779e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2700,6 +2700,7 @@ variable.
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
(when python-shell--parent-buffer
(python-util-clone-local-variables python-shell--parent-buffer))
+ (set (make-local-variable 'indent-tabs-mode) nil)
;; Users can interactively override default values for
;; `python-shell-interpreter' and `python-shell-interpreter-args'
;; when calling `run-python'. This ensures values let-bound in
@@ -4313,12 +4314,47 @@ returns will be used. If not FORCE-PROCESS is passed what
(unless (zerop (length docstring))
docstring)))))
+(defvar-local python-eldoc-get-doc t
+ "Non-nil means eldoc should fetch the documentation
+ automatically. Set to nil by `python-eldoc-function' if
+ `python-eldoc-function-timeout-permanent' is non-nil and
+ `python-eldoc-function' times out.")
+
+(defcustom python-eldoc-function-timeout 1
+ "Timeout for `python-eldoc-function' in seconds."
+ :group 'python
+ :type 'integer
+ :version "25.1")
+
+(defcustom python-eldoc-function-timeout-permanent t
+ "Non-nil means that when `python-eldoc-function' times out
+`python-eldoc-get-doc' will be set to nil"
+ :group 'python
+ :type 'boolean
+ :version "25.1")
+
(defun python-eldoc-function ()
"`eldoc-documentation-function' for Python.
For this to work as best as possible you should call
`python-shell-send-buffer' from time to time so context in
-inferior Python process is updated properly."
- (python-eldoc--get-doc-at-point))
+inferior Python process is updated properly.
+
+If `python-eldoc-function-timeout' seconds elapse before this
+function returns then if
+`python-eldoc-function-timeout-permanent' is non-nil
+`python-eldoc-get-doc' will be set to nil and eldoc will no
+longer return the documentation at the point automatically.
+
+Set `python-eldoc-get-doc' to t to reenable eldoc documentation
+fetching"
+ (when python-eldoc-get-doc
+ (with-timeout (python-eldoc-function-timeout
+ (if python-eldoc-function-timeout-permanent
+ (progn
+ (message "Eldoc echo-area display muted in this buffer, see `python-eldoc-function'")
+ (setq python-eldoc-get-doc nil))
+ (message "`python-eldoc-function' timed out, see `python-eldoc-function-timeout'")))
+ (python-eldoc--get-doc-at-point))))
(defun python-eldoc-at-point (symbol)
"Get help on SYMBOL using `help'.
diff --git a/lisp/simple.el b/lisp/simple.el
index 6c309293bd..10b4f392d5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2919,9 +2919,7 @@ REASON describes the reason that the boundary is being added; see
This list is maintained by `undo-auto--undoable-change' and
`undo-auto--boundaries' and can be affected by changes to their
-default values.
-
-See also `undo-auto--buffer-undoably-changed'.")
+default values.")
(defun undo-auto--add-boundary ()
"Add an `undo-boundary' in appropriate buffers."
diff --git a/lisp/subr.el b/lisp/subr.el
index 358bfa5e1c..48ff5013ce 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -600,10 +600,12 @@ Elements of ALIST that are not conses are ignored."
alist)
(defun alist-get (key alist &optional default remove)
- "Get the value associated to KEY in ALIST.
-DEFAULT is the value to return if KEY is not found in ALIST.
-REMOVE, if non-nil, means that when setting this element, we should
-remove the entry if the new value is `eql' to DEFAULT."
+ "Return the value associated with KEY in ALIST, using `assq'.
+If KEY is not found in ALIST, return DEFAULT.
+
+This is a generalized variable suitable for use with `setf'.
+When using it to set a value, optional argument REMOVE non-nil
+means to remove KEY from ALIST if the new value is `eql' to DEFAULT."
(ignore remove) ;;Silence byte-compiler.
(let ((x (assq key alist)))
(if x (cdr x) default)))
diff --git a/src/keyboard.c b/src/keyboard.c
index 717c0710a5..653f52732a 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -681,6 +681,14 @@ recursive_edit_1 (void)
specbind (Qinhibit_redisplay, Qnil);
redisplaying_p = 0;
+ /* This variable stores buffers that have changed so that an undo
+ boundary can be added. specbind this so that changes in the
+ recursive edit will not result in undo boundaries in buffers
+ changed before we entered there recursive edit.
+ See Bug #23632.
+ */
+ specbind (Qundo_auto__undoably_changed_buffers, Qnil);
+
val = command_loop ();
if (EQ (val, Qt))
Fsignal (Qquit, Qnil);
@@ -10980,6 +10988,8 @@ syms_of_keyboard (void)
DEFSYM (Qpost_command_hook, "post-command-hook");
DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary");
+ DEFSYM (Qundo_auto__undoably_changed_buffers,
+ "undo-auto--undoably-changed-buffers");
DEFSYM (Qdeferred_action_function, "deferred-action-function");
DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook");
diff --git a/src/syntax.c b/src/syntax.c
index 1c1a2f8278..587335acef 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3771,7 +3771,7 @@ In both cases, LIMIT bounds the search. */);
Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil);
DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped,
- doc: /* Non-nil means an escaped ender inside a comment doesn'tend the comment. */);
+ doc: /* Non-nil means an escaped ender inside a comment doesn't end the comment. */);
Vcomment_end_can_be_escaped = 0;
DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped");
Fmake_variable_buffer_local (Qcomment_end_can_be_escaped);
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index 12ebc75ea9..40cd1d2949 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -310,6 +310,38 @@
(= 6
(undo-test-point-after-forward-kill))))
+(defmacro simple-test-undo-with-switched-buffer (buffer &rest body)
+ (let ((before-buffer (make-symbol "before-buffer")))
+ `(let ((,before-buffer (current-buffer)))
+ (unwind-protect
+ (progn
+ (switch-to-buffer ,buffer)
+ ,@body)
+ (switch-to-buffer ,before-buffer)))))
+
+;; This tests for a regression in emacs 25.0 see bug #23632
+(ert-deftest simple-test-undo-extra-boundary-in-tex ()
+ (should
+ (string=
+ ""
+ (simple-test-undo-with-switched-buffer
+ "temp.tex"
+ (latex-mode)
+ ;; This macro calls `latex-insert-block'
+ (execute-kbd-macro
+ (read-kbd-macro
+ "
+C-c C-o ;; latex-insert-block
+RET ;; newline
+C-/ ;; undo
+"
+ ))
+ (buffer-substring-no-properties
+ (point-min)
+ (point-max))))))
+
+
+
(provide 'simple-test)
;;; simple-test.el ends here