commit 821a0840b27861e7323c192848a21def2aeddca0 (HEAD, refs/remotes/origin/master) Author: Drew Adams Date: Sun Dec 30 11:37:28 2018 -0800 Don't signal error from "C-x C-k l" about mouse events * lisp/edmacro.el (edmacro-fix-menu-commands): Ignore mouse events instead of signaling an error. Display unsupported events in the error message. (Bug#33930) diff --git a/lisp/edmacro.el b/lisp/edmacro.el index 55023462ad..b480b2330a 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -623,12 +623,16 @@ This function assumes that the events can be stored in a string." (push (vector 'menu-bar (car ev)) result)) ;; It would be nice to do pop-up menus, too, but not enough ;; info is recorded in macros to make this possible. - (noerror - ;; Just ignore mouse events. + ((or (mouse-event-p ev) (mouse-movement-p ev) + (memq (event-basic-type ev) + (list mouse-wheel-down-event mouse-wheel-up-event + mouse-wheel-right-event + mouse-wheel-left-event))) nil) + (noerror nil) (t - (error "Macros with mouse clicks are not %s" - "supported by this command")))) + (error "`edmacro-fix-menu-commands': Unsupported event: %S" + ev)))) ;; Reverse them again and make them back into a vector. (vconcat (nreverse result))) macro)) commit a3c79d44ccb4f6503d0a8b02230ff7a41db64ff8 Author: Joel Rosdahl Date: Thu Dec 27 16:52:07 2018 +0100 Fix electric indent bug in python-mode after dedenting colon * list/progmodes/python.el (python-indent-post-self-insert-function): Use markers instead of positions when reindenting statement(s) after inserting electric colon to avoid reindenting too many statements (bug#22663). * test/lisp/progmodes/python-tests.el (python-indent-electric-colon-2): Improve test case to also verify the fix of bug#22663. Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index ea34e1d9ab..71b2a94c07 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1334,16 +1334,17 @@ the line will be re-indented automatically if needed." (not (equal ?: (char-before (1- (point))))) (not (python-syntax-comment-or-string-p))) ;; Just re-indent dedenters - (let ((dedenter-pos (python-info-dedenter-statement-p)) - (current-pos (point))) + (let ((dedenter-pos (python-info-dedenter-statement-p))) (when dedenter-pos - (save-excursion - (goto-char dedenter-pos) - (python-indent-line) - (unless (= (line-number-at-pos dedenter-pos) - (line-number-at-pos current-pos)) - ;; Reindent region if this is a multiline statement - (python-indent-region dedenter-pos current-pos))))))))) + (let ((start (copy-marker dedenter-pos)) + (end (point-marker))) + (save-excursion + (goto-char start) + (python-indent-line) + (unless (= (line-number-at-pos start) + (line-number-at-pos end)) + ;; Reindent region if this is a multiline statement + (python-indent-region start end)))))))))) ;;; Mark diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 34a05194df..94c846ecb1 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -1161,10 +1161,13 @@ def b() if do: something() else +outside " (python-tests-look-at "else") (goto-char (line-end-position)) (python-tests-self-insert ":") + (should (= (current-indentation) 0)) + (python-tests-look-at "outside") (should (= (current-indentation) 0)))) (ert-deftest python-indent-electric-colon-3 () commit f6eacc468b8539be482260fa569e7b5ece07f4a2 Author: Eli Zaretskii Date: Fri Jan 4 15:55:59 2019 +0200 Improve documentation of 'server-name' * doc/emacs/misc.texi (Emacs Server, TCP Emacs server) (emacsclient Options): * lisp/server.el (server-name): Document the usage of 'server-name' to specify the server file as an absolute file name. (Bug#33934) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 13e18f8a71..a3aa71e267 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1693,7 +1693,9 @@ each one a unique @dfn{server name}, using the variable @code{server-name}. For example, @kbd{M-x set-variable @key{RET} server-name @key{RET} "foo" @key{RET}} sets the server name to @samp{foo}. The @code{emacsclient} program can specify a server by -name, using the @samp{-s} option (@pxref{emacsclient Options}). +name, using the @samp{-s} or the @samp{-f} option (@pxref{emacsclient +Options}), depending on whether or not the server uses a TCP socket +(@pxref{TCP Emacs server}). If you want to run multiple Emacs daemons (@pxref{Initial Options}), you can give each daemon its own server name like this: @@ -1758,21 +1760,23 @@ use @kbd{M-x server-generate-key} to get a random key. When you start a TCP Emacs server, Emacs creates a @dfn{server file} containing the TCP information to be used by @command{emacsclient} to connect to the server. The variable @code{server-auth-dir} specifies -the directory containing the server file; by default, this is +the default directory containing the server file; by default, this is @file{~/.emacs.d/server/}. In the absence of a local socket with file permissions, the permissions of this directory determine which users can have their @command{emacsclient} processes talk to the Emacs -server. +server. If @code{server-name} is an absolute file name, the server +file is created where specified by that file name. @vindex EMACS_SERVER_FILE@r{, environment variable} To tell @command{emacsclient} to connect to the server over TCP with a specific server file, use the @samp{-f} or @samp{--server-file} option, or set the @env{EMACS_SERVER_FILE} environment variable (@pxref{emacsclient Options}). If @code{server-auth-dir} is set to a -non-standard value, @command{emacsclient} needs an absolute file name -to the server file, as the default @code{server-auth-dir} is -hard-coded in @command{emacsclient} to be used as the directory for -resolving relative filenames. +non-standard value, or if @code{server-name} is set to an absolute +file name, @command{emacsclient} needs an absolute file name to the +server file, as the default @code{server-auth-dir} is hard-coded in +@command{emacsclient} to be used as the directory for resolving +relative filenames. @node Invoking emacsclient @subsection Invoking @code{emacsclient} @@ -1961,10 +1965,13 @@ evaluation performed is for side-effect rather than result. @item -s @var{server-name} @itemx --socket-name=@var{server-name} -Connect to the Emacs server named @var{server-name}. The server name -is given by the variable @code{server-name} on the Emacs server. If -this option is omitted, @command{emacsclient} connects to the first -server it finds. (This option is not supported on MS-Windows.) +Connect to the Emacs server named @var{server-name}. (This option is +not supported on MS-Windows.) The server name is given by the +variable @code{server-name} on the Emacs server. If this option is +omitted, @command{emacsclient} connects to the first server it finds. +If you set @code{server-name} of the Emacs server to an absolute file +name, give the same absolute file name as @var{server-name} to this +option to instruct @command{emacsclient} to connect to that server. Alternatively, you can set the @env{EMACS_SOCKET_NAME} environment variable to point to the server socket. (The command-line option diff --git a/lisp/server.el b/lisp/server.el index 9020b09c5d..a5d5e561db 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -270,7 +270,14 @@ been consumed.") "server") "The name of the Emacs server, if this Emacs process creates one. The command `server-start' makes use of this. It should not be -changed while a server is running." +changed while a server is running. +If this is a file name with no leading directories, Emacs will +create a socket file by that name under `server-socket-dir' +if `server-use-tcp' is nil, else under `server-auth-dir'. +If this is an absolute file name, it specifies where the socket +file will be created. To have emacsclient connect to the same +socket, use the \"-s\" switch for local non-TCP sockets, and +the \"-f\" switch otherwise." :group 'server :type 'string :version "23.1")