emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 68cb71c 1/6: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master 68cb71c 1/6: Merge from origin/emacs-25
Date: Sun, 19 Jun 2016 02:33:04 +0000 (UTC)

branch: master
commit 68cb71c0928eb8b10487a125192f43923e8bfe7f
Merge: 87c9d8f 9ae514a
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 admin/authors.el           |    2 ++
 doc/lispref/lists.texi     |   12 ++++++++----
 doc/misc/cl.texi           |    2 +-
 etc/AUTHORS                |   15 +++++++--------
 etc/NEWS                   |    3 ++-
 lisp/emacs-lisp/cl-macs.el |    4 ++--
 lisp/help-fns.el           |    3 ++-
 lisp/mouse.el              |    7 ++++++-
 lisp/org/org.el            |    4 ++--
 lisp/progmodes/python.el   |   40 ++++++++++++++++++++++++++++++++++++++--
 lisp/simple.el             |    4 +---
 lisp/subr.el               |   10 ++++++----
 src/keyboard.c             |   10 ++++++++++
 src/syntax.c               |    2 +-
 test/lisp/simple-tests.el  |   32 ++++++++++++++++++++++++++++++++
 15 files changed, 120 insertions(+), 30 deletions(-)

diff --git a/admin/authors.el b/admin/authors.el
index b93c9b2..1447bd4 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 c18c408..e7a739f 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -1556,12 +1556,16 @@ keys may not be symbols:
 @end smallexample
 @end defun
 
address@hidden alist-get key value &optional default
address@hidden 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
address@hidden 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
address@hidden 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 4137a95..a98d0ac 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 address@hidden 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 760d735..9a4aaf6 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 d8583cf..b3a044d 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 121738d..d2c90c2 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 e92019f..97c8df2 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 0be17b4..8d72753 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 1d060f8..30ef5e8 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 d4089a3..ad69f87 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 6c30929..10b4f39 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 358bfa5..48ff501 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 717c071..653f527 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 1c1a2f8..587335a 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 12ebc75..40cd1d2 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]