commit 8c3245ef0107337d0a2284c58089e2e8e21e257c (HEAD, refs/remotes/origin/master) Author: Lars Ingebrigtsen Date: Thu Apr 28 01:15:16 2016 +0200 Make `undo' of `C-x r t' put point where it should be * lisp/rect.el (string-rectangle): Make `undo' of a this command put point back where it was (bug#7522). diff --git a/lisp/rect.el b/lisp/rect.el index 6056b14..07e0f6f 100644 --- a/lisp/rect.el +++ b/lisp/rect.el @@ -476,10 +476,15 @@ Called from a program, takes three args; START, END and STRING." #'rectangle--string-erase-preview nil t) (add-hook 'post-command-hook #'rectangle--string-preview nil t)) - (read-string (format "String rectangle (default %s): " - (or (car string-rectangle-history) "")) - nil 'string-rectangle-history + (read-string (format "String rectangle (default %s): " + (or (car string-rectangle-history) "")) + nil 'string-rectangle-history (car string-rectangle-history))))))) + ;; If we undo this change, we want to have the point back where we + ;; are now, and not after the first line in the rectangle (which is + ;; the first line to be changed by the following command). + (unless (eq buffer-undo-list t) + (push (point) buffer-undo-list)) (goto-char (apply-on-rectangle 'string-rectangle-line start end string t))) commit 388bb723fa078158d3148de05e942f9c01e95dd8 Author: Lars Ingebrigtsen Date: Thu Apr 28 00:53:04 2016 +0200 Add some concept index entries for custom types * doc/lispref/customize.texi (Composite Types): Add concept index entries for restricted-sexp, radio and choice (bug#7385). diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 994c346..14e6eb3 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -841,6 +841,7 @@ most general last. Here's an example of proper usage: This way, the special value @code{nil} is not treated like other symbols, and symbols are not treated like other Lisp expressions. +@cindex radio, customization types @item (radio @var{element-types}@dots{}) This is similar to @code{choice}, except that the choices are displayed using radio buttons rather than a menu. This has the advantage of @@ -936,6 +937,7 @@ The value must be a list and each element of the list must fit the type list of elements, with @samp{[INS]} and @samp{[DEL]} buttons for adding more elements or removing elements. +@cindex restricted-sexp, customization types @item (restricted-sexp :match-alternatives @var{criteria}) This is the most general composite type construct. The value may be any Lisp object that satisfies one of @var{criteria}. @var{criteria} @@ -1020,6 +1022,7 @@ and whose remaining arguments should be zero or more of @code{foo} and This matches values such as @code{(baz)}, @code{(baz foo)}, @code{(baz bar)} and @code{(baz foo bar)}. +@cindex choice, customization types When the element-type is a @code{choice}, you use @code{:inline} not in the @code{choice} itself, but in (some of) the alternatives of the @code{choice}. For example, to match a list which must start with a commit a1627691a896b2afaa264f93534178bc763564c9 Author: Lars Ingebrigtsen Date: Wed Apr 27 20:48:30 2016 +0200 Mention `lisp-indent-function' in the lispref manual * doc/lispref/macros.texi (Indenting Macros): Mention `lisp-indent-function' (bug#3393). diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi index 3f9db8c..6472bd1 100644 --- a/doc/lispref/macros.texi +++ b/doc/lispref/macros.texi @@ -595,6 +595,11 @@ calls to the macro. An indentation specification is written like this: @end example @noindent +@cindex @code{lisp-indent-function} property +This results in the @code{lisp-indent-function} property being set on +the macro name. + +@noindent Here are the possibilities for @var{indent-spec}: @table @asis commit 123191decb7428db3b32a6c01631fa755088393a Author: Lars Ingebrigtsen Date: Wed Apr 27 20:40:59 2016 +0200 Clarify doc string of internal compilation function * lisp/progmodes/compile.el (compilation-get-file-structure): Clarify doc string (bug#3137). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 0160aab..cc04fe9 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -2760,7 +2760,9 @@ FILE should be (FILENAME) or (RELATIVE-FILENAME . DIRNAME). In the former case, FILENAME may be relative or absolute. The file-structure looks like this: - ((FILENAME [DIR-FROM-PREV-MSG]) FMT LINE-STRUCT...)" + ((FILENAME [TRUE-DIRNAME]) FMT ...) + +TRUE-DIRNAME is the `file-truename' of DIRNAME, if given." (or (gethash file compilation-locs) ;; File was not previously encountered, at least not in the form passed. ;; Let's normalize it and look again. @@ -2815,7 +2817,7 @@ The file-structure looks like this: (let ((fs (compilation-get-file-structure file))) (cl-assert (eq fs (gethash file compilation-locs))) (cl-assert (eq fs (gethash (cons (caar fs) (cadr (car fs))) - compilation-locs))) + compilation-locs))) (maphash (lambda (k v) (if (eq v fs) (remhash k compilation-locs))) compilation-locs))) commit aeb613ea95b7970e66d663ec5cba54e9ec0528fa Author: Lars Ingebrigtsen Date: Wed Apr 27 19:52:46 2016 +0200 Avoid having `C-x h' mark the prompt part of the minibuffer * lisp/simple.el (mark-whole-buffer): Don't mark the prompt part of the minibuffer (bug#2589). diff --git a/etc/NEWS b/etc/NEWS index ef2b4b0..da68ed5 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -57,6 +57,10 @@ affected by this, as SGI stopped supporting IRIX in December 2013. * Changes in Emacs 25.2 --- +** `C-x h' (`mark-whole-buffer') will now avoid marking the prompt +part of minibuffers. + +--- ** `find-library' now takes a prefix argument to pop to a different window. diff --git a/lisp/simple.el b/lisp/simple.el index 971f6006..7573789 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1075,7 +1075,9 @@ that uses or sets the mark." (interactive) (push-mark (point)) (push-mark (point-max) nil t) - (goto-char (point-min))) + ;; This is really `point-min' in most cases, but if we're in the + ;; minibuffer, this is at the end of the prompt. + (goto-char (minibuffer-prompt-end))) ;; Counting lines, one way or another. commit e1f2d14ae16342c06c052ce33b9d08cdd8ee63af Author: Lars Ingebrigtsen Date: Wed Apr 27 19:25:21 2016 +0200 Allow a prefix argument to find-library to pop to a different window * lisp/emacs-lisp/find-func.el (find-library): Allow a prefix argument to pop to a different window (bug#2270). diff --git a/etc/NEWS b/etc/NEWS index 2aeee96..ef2b4b0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -56,6 +56,10 @@ affected by this, as SGI stopped supporting IRIX in December 2013. * Changes in Emacs 25.2 +--- +** `find-library' now takes a prefix argument to pop to a different +window. + ** `find-library', `help-function-def' and `help-variable-def' now run `find-function-after-hook'. diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index b04a9d2..3bbf809 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -255,9 +255,12 @@ TYPE should be nil to find a function, or `defvar' to find a variable." (cons (current-buffer) (match-beginning 0)))) ;;;###autoload -(defun find-library (library) +(defun find-library (library &optional other-window) "Find the Emacs Lisp source of LIBRARY. -LIBRARY should be a string (the name of the library)." +LIBRARY should be a string (the name of the library). If the +optional OTHER-WINDOW argument (i.e., the command argument) is +specified, pop to a different window before displaying the +buffer." (interactive (let* ((dirs (or find-function-source-path load-path)) (suffixes (find-library-suffixes)) @@ -279,15 +282,17 @@ LIBRARY should be a string (the name of the library)." (when (and def (not (test-completion def table))) (setq def nil)) (list - (completing-read (if def (format "Library name (default %s): " def) + (completing-read (if def + (format "Library name (default %s): " def) "Library name: ") - table nil nil nil nil def)))) - (let ((buf (find-file-noselect (find-library-name library)))) - (condition-case nil - (prog1 - (switch-to-buffer buf) - (run-hooks 'find-function-after-hook)) - (error (pop-to-buffer buf))))) + table nil nil nil nil def) + current-prefix-arg))) + (prog1 + (funcall (if other-window + 'pop-to-buffer + 'pop-to-buffer-same-window) + (find-file-noselect (find-library-name library))) + (run-hooks 'find-function-after-hook))) ;;;###autoload (defun find-function-search-for-symbol (symbol type library) commit 162f18539257a2d24c0bfed9a7206bd8c03b6661 Author: Lars Ingebrigtsen Date: Wed Apr 27 19:12:47 2016 +0200 Move the diff command to "Operate" in ibuffer * lisp/ibuffer.el (ibuffer-mode-operate-map): Move the diff command to the "Operate" menu, and remove the customisation entry to make the "View" menu more logical (bug#1150). diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 9a1f3b9..b2ec073 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -700,16 +700,10 @@ directory, like `default-directory'." (define-key-after map [menu-bar view dashes2] '("--")) - (define-key-after map [menu-bar view diff-with-file] - '(menu-item "Diff with file" ibuffer-diff-with-file - :help "View the differences between this buffer and its file")) (define-key-after map [menu-bar view auto-mode] '(menu-item "Auto Mode" ibuffer-auto-mode :button (:toggle . ibuffer-auto-mode) :help "Attempt to automatically update the Ibuffer buffer")) - (define-key-after map [menu-bar view customize] - '(menu-item "Customize Ibuffer" ibuffer-customize - :help "Use Custom to customize Ibuffer")) (define-key-after map [menu-bar mark] (cons "Mark" (make-sparse-keymap "Mark"))) @@ -820,6 +814,9 @@ directory, like `default-directory'." (define-key-after operate-map [do-view-and-eval] '(menu-item "Eval (viewing buffer)..." ibuffer-do-view-and-eval :help "Evaluate a Lisp form in each marked buffer while viewing it")) + (define-key-after operate-map [diff-with-file] + '(menu-item "Diff with file" ibuffer-diff-with-file + :help "View the differences between this buffer and its file")) operate-map)) commit b3500fc058ed4f294969b1ef1bf36b28bb3ebe43 Author: Lars Ingebrigtsen Date: Wed Apr 27 18:43:02 2016 +0200 Make the minor modes in help buffers into buttons * lisp/help.el (describe-mode): Make the minor modes into buttons to enable easier documentation traversal (bug#1149). diff --git a/lisp/help.el b/lisp/help.el index baccf59..efbae39 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -946,14 +946,15 @@ documentation for the major and minor modes of that buffer." (let ((mode-function (nth 0 mode)) (pretty-minor-mode (nth 1 mode)) (indicator (nth 2 mode))) - (add-text-properties 0 (length pretty-minor-mode) - '(face bold) pretty-minor-mode) (save-excursion (goto-char (point-max)) (princ "\n\f\n") (push (point-marker) help-button-cache) ;; Document the minor modes fully. - (insert pretty-minor-mode) + (insert-text-button + pretty-minor-mode 'type 'help-function + 'help-args (list mode-function) + 'button '(t)) (princ (format " minor mode (%s):\n" (if (zerop (length indicator)) "no indicator" commit 1a08fb07546a4488511abb65bcae5c0d8b192c20 Author: Jorgen Schaefer Date: Wed Apr 27 10:44:40 2016 +0200 Add a number of Python 3 exceptions * lisp/progmoes/python.el (python-font-lock-keywords): Clean up the exception list, adding a number of new Python 3 exceptions and moving some exceptions to the Python 2 and 3 list as Python 2.7 includes them. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1898e0d..1e7a15d 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -561,23 +561,32 @@ The type returned can be `comment', `string' or `paren'." ;; Builtin Exceptions (,(rx symbol-start (or + ;; Python 2 and 3: "ArithmeticError" "AssertionError" "AttributeError" "BaseException" - "DeprecationWarning" "EOFError" "EnvironmentError" "Exception" - "FloatingPointError" "FutureWarning" "GeneratorExit" "IOError" - "ImportError" "ImportWarning" "IndexError" "KeyError" - "KeyboardInterrupt" "LookupError" "MemoryError" "NameError" - "NotImplementedError" "OSError" "OverflowError" - "PendingDeprecationWarning" "ReferenceError" "RuntimeError" - "RuntimeWarning" "StopIteration" "SyntaxError" "SyntaxWarning" - "SystemError" "SystemExit" "TypeError" "UnboundLocalError" - "UnicodeDecodeError" "UnicodeEncodeError" "UnicodeError" - "UnicodeTranslateError" "UnicodeWarning" "UserWarning" "VMSError" - "ValueError" "Warning" "WindowsError" "ZeroDivisionError" + "BufferError" "BytesWarning" "DeprecationWarning" "EOFError" + "EnvironmentError" "Exception" "FloatingPointError" "FutureWarning" + "GeneratorExit" "IOError" "ImportError" "ImportWarning" + "IndentationError" "IndexError" "KeyError" "KeyboardInterrupt" + "LookupError" "MemoryError" "NameError" "NotImplementedError" + "OSError" "OverflowError" "PendingDeprecationWarning" + "ReferenceError" "RuntimeError" "RuntimeWarning" "StopIteration" + "SyntaxError" "SyntaxWarning" "SystemError" "SystemExit" "TabError" + "TypeError" "UnboundLocalError" "UnicodeDecodeError" + "UnicodeEncodeError" "UnicodeError" "UnicodeTranslateError" + "UnicodeWarning" "UserWarning" "ValueError" "Warning" + "ZeroDivisionError" ;; Python 2: "StandardError" ;; Python 3: - "BufferError" "BytesWarning" "IndentationError" "ResourceWarning" - "TabError") + "BlockingIOError" "BrokenPipeError" "ChildProcessError" + "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" + "ConnectionResetError" "FileExistsError" "FileNotFoundError" + "InterruptedError" "IsADirectoryError" "NotADirectoryError" + "PermissionError" "ProcessLookupError" "RecursionError" + "ResourceWarning" "StopAsyncIteration" "TimeoutError" + ;; OS specific + "VMSError" "WindowsError" + ) symbol-end) . font-lock-type-face) ;; Builtins (,(rx symbol-start