aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-06-19 00:47:00 +0200
committerPaul Eggert2016-06-19 00:47:00 +0200
commit68cb71c0928eb8b10487a125192f43923e8bfe7f (patch)
tree053133358af1bd991d60ed6c29590ad84b29fed0
parent87c9d8fcec183c8f4933e218c1895b6a0722b1e1 (diff)
parent9ae514a9b7ed368ea97ddefa806079b6423833cb (diff)
downloademacs-68cb71c0928eb8b10487a125192f43923e8bfe7f.tar.gz
emacs-68cb71c0928eb8b10487a125192f43923e8bfe7f.zip
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 b93c9b251ca..1447bd4f49a 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -886,6 +886,8 @@ in the repository.")
886 ("ED.WORSHIP" . "JOKES") 886 ("ED.WORSHIP" . "JOKES")
887 ("GNU.JOKES" . "JOKES") 887 ("GNU.JOKES" . "JOKES")
888 ("CHARACTERS" . "TODO") 888 ("CHARACTERS" . "TODO")
889 ("lisp/character-fold.el" . "lisp/char-fold.el")
890 ("test/automated/character-fold-tests.el" . "test/automated/char-fold-tests.el")
889 ("images/gnus/mail_send.xpm" . "mail-send.xpm") ; still in images/gnus 891 ("images/gnus/mail_send.xpm" . "mail-send.xpm") ; still in images/gnus
890 ;; Renamed within same directory. 892 ;; Renamed within same directory.
891 ("schema/xhtml-basic-form.rnc" . "xhtml-bform.rnc" ) 893 ("schema/xhtml-basic-form.rnc" . "xhtml-bform.rnc" )
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index c18c408209a..e7a739f88f3 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1556,12 +1556,16 @@ keys may not be symbols:
1556@end smallexample 1556@end smallexample
1557@end defun 1557@end defun
1558 1558
1559@defun alist-get key value &optional default 1559@defun alist-get key value &optional default remove
1560This function is like @code{assq}, but instead of returning the entire 1560This function is like @code{assq}, but instead of returning the entire
1561association for @var{key}, @code{(@var{key} . @var{value})}, it 1561association for @var{key}, @code{(@var{key} . @var{value})}, it
1562returns just the @var{value}. It returns @var{default} if @var{key} 1562returns just the @var{value}. If @var{key} is not found in
1563is not found in @var{alist}, defaulting to @code{nil} if @var{default} 1563@var{alist} it returns @var{default}.
1564is omitted. 1564
1565This is a generalized variable (@pxref{Generalized Variables}) that
1566can be used to change a value with @code{setf}. When using it to set
1567a value, optional argument @var{remove} non-nil means to remove
1568@var{key} from @var{alist} if the new value is @code{eql} to @var{default}.
1565@end defun 1569@end defun
1566 1570
1567@defun rassq value alist 1571@defun rassq value alist
diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi
index 4137a95b3b2..a98d0ac455b 100644
--- a/doc/misc/cl.texi
+++ b/doc/misc/cl.texi
@@ -3364,7 +3364,7 @@ was @code{nil} for all elements.
3364@defun cl-notevery predicate seq &rest more-seqs 3364@defun cl-notevery predicate seq &rest more-seqs
3365This function calls @var{predicate} on each element of the sequence(s) 3365This function calls @var{predicate} on each element of the sequence(s)
3366in turn; it returns a non-@code{nil} value as soon as @var{predicate} 3366in turn; it returns a non-@code{nil} value as soon as @var{predicate}
3367returns @code{nil} for any element, or @code{t} if the predicate was 3367returns @code{nil} for any element, or @code{nil} if the predicate was
3368true for all elements. 3368true for all elements.
3369@end defun 3369@end defun
3370 3370
diff --git a/etc/AUTHORS b/etc/AUTHORS
index 760d7354ba5..9a4aaf6d554 100644
--- a/etc/AUTHORS
+++ b/etc/AUTHORS
@@ -351,14 +351,13 @@ and changed ada-mode.texi frames.texi generic-x.el texinfo.el
351 351
352Artem Chuprina: changed message.el 352Artem Chuprina: changed message.el
353 353
354Artur Malabarba: wrote character-fold-tests.el faces-tests.el 354Artur Malabarba: wrote char-fold-tests.el faces-tests.el isearch-tests.el
355 isearch-tests.el let-alist.el simple-test.el sort-tests.el 355 let-alist.el simple-test.el sort-tests.el tabulated-list-test.el
356 tabulated-list-test.el 356and changed package.el isearch.el lisp/char-fold.el files.el
357and changed package.el isearch.el character-fold.el files.el 357 tabulated-list.el package-test.el menu-bar.el
358 tabulated-list.el package-test.el menu-bar.el faces.el files-x.el 358 test/automated/char-fold-tests.el faces.el files-x.el help-fns.el
359 help-fns.el replace.el align.el bytecomp.el custom.texi cl-lib-tests.el 359 replace.el align.el bytecomp.el custom.texi cl-lib-tests.el custom.el
360 custom.el map.el simple.el subr-tests.el variables.texi bindings.el 360 map.el simple.el subr-tests.el variables.texi and 40 other files
361 and 39 other files
362 361
363Arun Persaud: changed org-agenda.el org-src.el 362Arun Persaud: changed org-agenda.el org-src.el
364 363
diff --git a/etc/NEWS b/etc/NEWS
index d8583cf5ab8..b3a044d4cd2 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
2177MS-Windows doesn't support UTF-8 as codeset in its locales. 2177MS-Windows doesn't support UTF-8 as codeset in its locales.
2178 2178
2179+++ 2179+++
2180** New function 'alist-get', which is also a valid place (aka lvalue). 2180** New function 'alist-get', which is a generalized variable
2181suitable for use with 'setf'.
2181 2182
2182+++ 2183+++
2183** New function 'funcall-interactively', which works like 'funcall' 2184** 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 121738df576..d2c90c2b809 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
851 "The Common Lisp `loop' macro. 851 "The Common Lisp `loop' macro.
852Valid clauses include: 852Valid clauses include:
853 For clauses: 853 For clauses:
854 for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3 854 for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 [by EXPR3]
855 for VAR = EXPR1 then EXPR2 855 for VAR = EXPR1 then EXPR2
856 for VAR in/on/in-ref LIST by FUNC 856 for VAR in/on/in-ref LIST [by FUNC]
857 for VAR across/across-ref ARRAY 857 for VAR across/across-ref ARRAY
858 for VAR being: 858 for VAR being:
859 the elements of/of-ref SEQUENCE [using (index VAR2)] 859 the elements of/of-ref SEQUENCE [using (index VAR2)]
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e92019f9345..97c8df2298a 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -583,7 +583,8 @@ FILE is the file where FUNCTION was probably defined."
583 (sig-key (if (subrp def) 583 (sig-key (if (subrp def)
584 (indirect-function real-def) 584 (indirect-function real-def)
585 real-def)) 585 real-def))
586 (file-name (find-lisp-object-file-name function def)) 586 (file-name (find-lisp-object-file-name function (if aliased 'defun
587 def)))
587 (pt1 (with-current-buffer (help-buffer) (point))) 588 (pt1 (with-current-buffer (help-buffer) (point)))
588 (beg (if (and (or (byte-code-function-p def) 589 (beg (if (and (or (byte-code-function-p def)
589 (keymapp def) 590 (keymapp def)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0be17b48cac..8d727536e05 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -575,7 +575,12 @@ command alters the kill ring or not."
575 (mouse-minibuffer-check click) 575 (mouse-minibuffer-check click)
576 (select-window (posn-window (event-start click))) 576 (select-window (posn-window (event-start click)))
577 (let ((beg (posn-point (event-start click))) 577 (let ((beg (posn-point (event-start click)))
578 (end (posn-point (event-end click))) 578 (end
579 (if (eq (posn-window (event-end click)) (selected-window))
580 (posn-point (event-end click))
581 ;; If the mouse ends up in any other window or on the menu
582 ;; bar, use `window-point' of selected window (Bug#23707).
583 (window-point)))
579 (click-count (event-click-count click))) 584 (click-count (event-click-count click)))
580 (let ((drag-start (terminal-parameter nil 'mouse-drag-start))) 585 (let ((drag-start (terminal-parameter nil 'mouse-drag-start)))
581 (when drag-start 586 (when drag-start
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 1d060f871fe..30ef5e83bdd 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."
16297 (message ""))) 16297 (message "")))
16298 (org-defkey map ">" 16298 (org-defkey map ">"
16299 (lambda () (interactive) 16299 (lambda () (interactive)
16300 (org-eval-in-calendar '(scroll-calendar-left 1)))) 16300 (org-eval-in-calendar '(calendar-scroll-left 1))))
16301 (org-defkey map "<" 16301 (org-defkey map "<"
16302 (lambda () (interactive) 16302 (lambda () (interactive)
16303 (org-eval-in-calendar '(scroll-calendar-right 1)))) 16303 (org-eval-in-calendar '(calendar-scroll-right 1))))
16304 (org-defkey map "\C-v" 16304 (org-defkey map "\C-v"
16305 (lambda () (interactive) 16305 (lambda () (interactive)
16306 (org-eval-in-calendar 16306 (org-eval-in-calendar
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d4089a3ea92..ad69f8779e0 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2700,6 +2700,7 @@ variable.
2700\(Type \\[describe-mode] in the process buffer for a list of commands.)" 2700\(Type \\[describe-mode] in the process buffer for a list of commands.)"
2701 (when python-shell--parent-buffer 2701 (when python-shell--parent-buffer
2702 (python-util-clone-local-variables python-shell--parent-buffer)) 2702 (python-util-clone-local-variables python-shell--parent-buffer))
2703 (set (make-local-variable 'indent-tabs-mode) nil)
2703 ;; Users can interactively override default values for 2704 ;; Users can interactively override default values for
2704 ;; `python-shell-interpreter' and `python-shell-interpreter-args' 2705 ;; `python-shell-interpreter' and `python-shell-interpreter-args'
2705 ;; when calling `run-python'. This ensures values let-bound in 2706 ;; 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
4313 (unless (zerop (length docstring)) 4314 (unless (zerop (length docstring))
4314 docstring))))) 4315 docstring)))))
4315 4316
4317(defvar-local python-eldoc-get-doc t
4318 "Non-nil means eldoc should fetch the documentation
4319 automatically. Set to nil by `python-eldoc-function' if
4320 `python-eldoc-function-timeout-permanent' is non-nil and
4321 `python-eldoc-function' times out.")
4322
4323(defcustom python-eldoc-function-timeout 1
4324 "Timeout for `python-eldoc-function' in seconds."
4325 :group 'python
4326 :type 'integer
4327 :version "25.1")
4328
4329(defcustom python-eldoc-function-timeout-permanent t
4330 "Non-nil means that when `python-eldoc-function' times out
4331`python-eldoc-get-doc' will be set to nil"
4332 :group 'python
4333 :type 'boolean
4334 :version "25.1")
4335
4316(defun python-eldoc-function () 4336(defun python-eldoc-function ()
4317 "`eldoc-documentation-function' for Python. 4337 "`eldoc-documentation-function' for Python.
4318For this to work as best as possible you should call 4338For this to work as best as possible you should call
4319`python-shell-send-buffer' from time to time so context in 4339`python-shell-send-buffer' from time to time so context in
4320inferior Python process is updated properly." 4340inferior Python process is updated properly.
4321 (python-eldoc--get-doc-at-point)) 4341
4342If `python-eldoc-function-timeout' seconds elapse before this
4343function returns then if
4344`python-eldoc-function-timeout-permanent' is non-nil
4345`python-eldoc-get-doc' will be set to nil and eldoc will no
4346longer return the documentation at the point automatically.
4347
4348Set `python-eldoc-get-doc' to t to reenable eldoc documentation
4349fetching"
4350 (when python-eldoc-get-doc
4351 (with-timeout (python-eldoc-function-timeout
4352 (if python-eldoc-function-timeout-permanent
4353 (progn
4354 (message "Eldoc echo-area display muted in this buffer, see `python-eldoc-function'")
4355 (setq python-eldoc-get-doc nil))
4356 (message "`python-eldoc-function' timed out, see `python-eldoc-function-timeout'")))
4357 (python-eldoc--get-doc-at-point))))
4322 4358
4323(defun python-eldoc-at-point (symbol) 4359(defun python-eldoc-at-point (symbol)
4324 "Get help on SYMBOL using `help'. 4360 "Get help on SYMBOL using `help'.
diff --git a/lisp/simple.el b/lisp/simple.el
index 6c309293bd4..10b4f392d50 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2919,9 +2919,7 @@ REASON describes the reason that the boundary is being added; see
2919 2919
2920This list is maintained by `undo-auto--undoable-change' and 2920This list is maintained by `undo-auto--undoable-change' and
2921`undo-auto--boundaries' and can be affected by changes to their 2921`undo-auto--boundaries' and can be affected by changes to their
2922default values. 2922default values.")
2923
2924See also `undo-auto--buffer-undoably-changed'.")
2925 2923
2926(defun undo-auto--add-boundary () 2924(defun undo-auto--add-boundary ()
2927 "Add an `undo-boundary' in appropriate buffers." 2925 "Add an `undo-boundary' in appropriate buffers."
diff --git a/lisp/subr.el b/lisp/subr.el
index 358bfa5e1c0..48ff5013cee 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -600,10 +600,12 @@ Elements of ALIST that are not conses are ignored."
600 alist) 600 alist)
601 601
602(defun alist-get (key alist &optional default remove) 602(defun alist-get (key alist &optional default remove)
603 "Get the value associated to KEY in ALIST. 603 "Return the value associated with KEY in ALIST, using `assq'.
604DEFAULT is the value to return if KEY is not found in ALIST. 604If KEY is not found in ALIST, return DEFAULT.
605REMOVE, if non-nil, means that when setting this element, we should 605
606remove the entry if the new value is `eql' to DEFAULT." 606This is a generalized variable suitable for use with `setf'.
607When using it to set a value, optional argument REMOVE non-nil
608means to remove KEY from ALIST if the new value is `eql' to DEFAULT."
607 (ignore remove) ;;Silence byte-compiler. 609 (ignore remove) ;;Silence byte-compiler.
608 (let ((x (assq key alist))) 610 (let ((x (assq key alist)))
609 (if x (cdr x) default))) 611 (if x (cdr x) default)))
diff --git a/src/keyboard.c b/src/keyboard.c
index 717c0710a5c..653f52732a7 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -681,6 +681,14 @@ recursive_edit_1 (void)
681 specbind (Qinhibit_redisplay, Qnil); 681 specbind (Qinhibit_redisplay, Qnil);
682 redisplaying_p = 0; 682 redisplaying_p = 0;
683 683
684 /* This variable stores buffers that have changed so that an undo
685 boundary can be added. specbind this so that changes in the
686 recursive edit will not result in undo boundaries in buffers
687 changed before we entered there recursive edit.
688 See Bug #23632.
689 */
690 specbind (Qundo_auto__undoably_changed_buffers, Qnil);
691
684 val = command_loop (); 692 val = command_loop ();
685 if (EQ (val, Qt)) 693 if (EQ (val, Qt))
686 Fsignal (Qquit, Qnil); 694 Fsignal (Qquit, Qnil);
@@ -10980,6 +10988,8 @@ syms_of_keyboard (void)
10980 DEFSYM (Qpost_command_hook, "post-command-hook"); 10988 DEFSYM (Qpost_command_hook, "post-command-hook");
10981 10989
10982 DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary"); 10990 DEFSYM (Qundo_auto__add_boundary, "undo-auto--add-boundary");
10991 DEFSYM (Qundo_auto__undoably_changed_buffers,
10992 "undo-auto--undoably-changed-buffers");
10983 10993
10984 DEFSYM (Qdeferred_action_function, "deferred-action-function"); 10994 DEFSYM (Qdeferred_action_function, "deferred-action-function");
10985 DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook"); 10995 DEFSYM (Qdelayed_warnings_hook, "delayed-warnings-hook");
diff --git a/src/syntax.c b/src/syntax.c
index 1c1a2f82782..587335acef8 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -3771,7 +3771,7 @@ In both cases, LIMIT bounds the search. */);
3771 Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil); 3771 Vfind_word_boundary_function_table = Fmake_char_table (Qnil, Qnil);
3772 3772
3773 DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped, 3773 DEFVAR_BOOL ("comment-end-can-be-escaped", Vcomment_end_can_be_escaped,
3774 doc: /* Non-nil means an escaped ender inside a comment doesn'tend the comment. */); 3774 doc: /* Non-nil means an escaped ender inside a comment doesn't end the comment. */);
3775 Vcomment_end_can_be_escaped = 0; 3775 Vcomment_end_can_be_escaped = 0;
3776 DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped"); 3776 DEFSYM (Qcomment_end_can_be_escaped, "comment-end-can-be-escaped");
3777 Fmake_variable_buffer_local (Qcomment_end_can_be_escaped); 3777 Fmake_variable_buffer_local (Qcomment_end_can_be_escaped);
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index 12ebc75ea92..40cd1d29498 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -310,6 +310,38 @@
310 (= 6 310 (= 6
311 (undo-test-point-after-forward-kill)))) 311 (undo-test-point-after-forward-kill))))
312 312
313(defmacro simple-test-undo-with-switched-buffer (buffer &rest body)
314 (let ((before-buffer (make-symbol "before-buffer")))
315 `(let ((,before-buffer (current-buffer)))
316 (unwind-protect
317 (progn
318 (switch-to-buffer ,buffer)
319 ,@body)
320 (switch-to-buffer ,before-buffer)))))
321
322;; This tests for a regression in emacs 25.0 see bug #23632
323(ert-deftest simple-test-undo-extra-boundary-in-tex ()
324 (should
325 (string=
326 ""
327 (simple-test-undo-with-switched-buffer
328 "temp.tex"
329 (latex-mode)
330 ;; This macro calls `latex-insert-block'
331 (execute-kbd-macro
332 (read-kbd-macro
333 "
334C-c C-o ;; latex-insert-block
335RET ;; newline
336C-/ ;; undo
337"
338 ))
339 (buffer-substring-no-properties
340 (point-min)
341 (point-max))))))
342
343
344
313 345
314(provide 'simple-test) 346(provide 'simple-test)
315;;; simple-test.el ends here 347;;; simple-test.el ends here