commit edc63bf94f3cd3f52fab86fe7b92a3ec6a19de40 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Mon Apr 17 09:47:39 2017 +0300 Fix assertion violations when displaying thread-related error * src/process.c (Faccept_process_output): Don't assume a thread's name is always a string. diff --git a/src/process.c b/src/process.c index 2f2e5c1b25..b81c7b459e 100644 --- a/src/process.c +++ b/src/process.c @@ -4563,8 +4563,16 @@ is nil, from any process) before the timeout expired. */) /* Can't wait for a process that is dedicated to a different thread. */ if (!EQ (proc->thread, Qnil) && !EQ (proc->thread, Fcurrent_thread ())) - error ("Attempt to accept output from process %s locked to thread %s", - SDATA (proc->name), SDATA (XTHREAD (proc->thread)->name)); + { + Lisp_Object proc_thread_name = XTHREAD (proc->thread)->name; + + if (STRINGP (proc_thread_name)) + error ("Attempt to accept output from process %s locked to thread %s", + SDATA (proc->name), SDATA (proc_thread_name)); + else + error ("Attempt to accept output from process %s locked to thread %p", + SDATA (proc->name), XTHREAD (proc->thread)); + } } else just_this_one = Qnil; commit 47122295521c63febe9fc64680430812da3a3acf Author: Paul Eggert Date: Sun Apr 16 23:36:26 2017 -0700 dired ‘M’ should not complain about ‘.’ and ‘..’ * lisp/dired-aux.el (dired-do-redisplay): Allow redisplay of ‘.’ and ‘..’ (Bug#26528). diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index d7ca052787..ec07f9bf73 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -1266,12 +1266,14 @@ See Info node `(emacs)Subdir switches' for more details." ;; message much faster than making dired-map-over-marks show progress (dired-uncache (if (consp dired-directory) (car dired-directory) dired-directory)) - (dired-map-over-marks (let ((fname (dired-get-filename)) + (dired-map-over-marks (let ((fname (dired-get-filename nil t)) ;; Postpone readin hook till we map ;; over all marked files (Bug#6810). (dired-after-readin-hook nil)) - (message "Redisplaying... %s" fname) - (dired-update-file-line fname)) + (if (not fname) + (error "No file on this line") + (message "Redisplaying... %s" fname) + (dired-update-file-line fname))) arg) (run-hooks 'dired-after-readin-hook) (dired-move-to-filename) commit 750721c3943e5837d7d9292d6462a144a49347c7 Author: Paul Eggert Date: Sun Apr 16 23:07:33 2017 -0700 Remove unused coding enums * src/coding.h (enum coding_system_type, enum end_of_line_type): Remove; unused. diff --git a/src/coding.h b/src/coding.h index 7a1dd682b2..77f90ec9c1 100644 --- a/src/coding.h +++ b/src/coding.h @@ -96,39 +96,6 @@ enum define_coding_undecided_arg_index extern Lisp_Object Vcoding_system_hash_table; -/* Enumeration of coding system type. */ - -enum coding_system_type - { - coding_type_charset, - coding_type_utf_8, - coding_type_utf_16, - coding_type_iso_2022, - coding_type_emacs_mule, - coding_type_sjis, - coding_type_ccl, - coding_type_raw_text, - coding_type_undecided, - coding_type_max - }; - - -/* Enumeration of end-of-line format type. */ - -enum end_of_line_type - { - eol_lf, /* Line-feed only, same as Emacs' internal - format. */ - eol_crlf, /* Sequence of carriage-return and - line-feed. */ - eol_cr, /* Carriage-return only. */ - eol_any, /* Accept any of above. Produce line-feed - only. */ - eol_undecided, /* This value is used to denote that the - eol-type is not yet undecided. */ - eol_type_max - }; - /* Enumeration of index to an attribute vector of a coding system. */ enum coding_attr_index commit 1cad61030160ebc4b73e1f4212155a180d417be3 Author: Paul Eggert Date: Sun Apr 16 22:50:02 2017 -0700 Work around bug with unibyte Linux consoles * src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if the terminal's coding system is unibyte (Bug#26396). diff --git a/src/terminal.c b/src/terminal.c index 0b1cbe7b79..3d25b36fa5 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -575,7 +575,9 @@ Lisp_Object terminal_glyph_code (struct terminal *t, int ch) { #if HAVE_STRUCT_UNIPAIR_UNICODE - if (t->type == output_termcap) + /* Heuristically assume that a terminal supporting glyph codes is in + UTF-8 mode if and only if its coding system is multibyte (Bug#26396). */ + if (t->type == output_termcap && t->terminal_coding->src_multibyte) { /* As a hack, recompute the table when CH is the maximum character. */ commit c68cce94c46140f2ad1411550427d3cc2658ec02 Author: Christian Garbs Date: Wed Mar 8 21:13:57 2017 +0100 ; Fix typo in error messages (Bug#26034) Copyright-paperwork-exempt: yes diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index 8738824aa7..77cfd53785 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el @@ -157,12 +157,12 @@ it's header arguments." (defun org-babel-prep-session:C (session params) "This function does nothing as C is a compiled language with no support for sessions" - (error "C is a compiled languages -- no support for sessions")) + (error "C is a compiled language -- no support for sessions")) (defun org-babel-load-session:C (session body params) "This function does nothing as C is a compiled language with no support for sessions" - (error "C is a compiled languages -- no support for sessions")) + (error "C is a compiled language -- no support for sessions")) ;; helper functions commit 8750a4546a1da4f03243df12c7e5b89f2c32d27e Author: Teemu Likonen Date: Sun Apr 16 16:14:22 2017 +0300 Fix org-agenda's command for calendar-lunar-phases Function org-agenda-phases-of-moon tries to call a non-existing function calendar-phases-of-moon. The correct function is calendar-lunar-phases. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index c870ddd4e4..153e3772b0 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -9533,7 +9533,7 @@ entries in that Org-mode file." (defun org-agenda-phases-of-moon () "Display the phases of the moon for the 3 months around the cursor date." (interactive) - (org-agenda-execute-calendar-command 'calendar-phases-of-moon)) + (org-agenda-execute-calendar-command 'calendar-lunar-phases)) (defun org-agenda-holidays () "Display the holidays for the 3 months around the cursor date." commit 8d96feae07c618f591a952f8f10ae949735b4050 Author: Michael Albinus Date: Sun Apr 16 16:51:24 2017 +0200 Tuning for `separate' Tramp syntax * lisp/net/tramp.el (tramp-method-regexp): Fix it for `separate' syntax. (tramp-completion-file-name-regexp-separate): Simplify. * test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect-separate): Extend test. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 12169d473e..9b80c596a3 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -717,7 +717,10 @@ Should always start with \"^\". Derived from `tramp-prefix-format'." (defun tramp-method-regexp () "Regexp matching methods identifiers. The `ftp' syntax does not support methods." - (if (eq (tramp-compat-tramp-syntax) 'simplified) "" "[a-zA-Z0-9-]+")) + (cond ((eq (tramp-compat-tramp-syntax) 'default) "[a-zA-Z0-9-]+") + ((eq (tramp-compat-tramp-syntax) 'simplified) "") + ((eq (tramp-compat-tramp-syntax) 'separate) "[a-zA-Z0-9-]*") + (t (error "Wrong `tramp-syntax' %s" tramp-syntax)))) (defun tramp-postfix-method-format () "String matching delimiter between method and user or host names. @@ -942,7 +945,7 @@ See `tramp-file-name-structure' for more explanations. On W32 systems, the volume letter must be ignored.") (defconst tramp-completion-file-name-regexp-separate - "\\`/\\[\\([^]]*\\)?\\'" + "\\`/\\[[^]]*\\'" "Value for `tramp-completion-file-name-regexp' for separate remoting. See `tramp-file-name-structure' for more explanations.") @@ -2306,7 +2309,7 @@ not in completion mode." ;; Method, host name and user name completion. ;; `tramp-completion-dissect-file-name' returns a list of -;; tramp-file-name structures. For all of them we return possible completions. +;; tramp-file-name structures. For all of them we return possible completions. (defun tramp-completion-handle-file-name-all-completions (filename directory) "Like `file-name-all-completions' for partial Tramp files." diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 9dcb3ec976..1d487bc12d 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -764,7 +764,7 @@ handled properly. BODY shall not contain a timeout." (file-remote-p "/user@host#1234:" 'localname) "")) (should (string-equal (file-remote-p "/user@host#1234:" 'hop) nil)) - ;; Expand `tramp-default-method' and `tramp-default-user'. + ;; Expand `tramp-default-method' and `tramp-default-user'. (should (string-equal (file-remote-p "/1.2.3.4:") (format "/%s@%s:" "default-user" "1.2.3.4"))) @@ -961,6 +961,43 @@ handled properly. BODY shall not contain a timeout." ;; Expand `tramp-default-method' and `tramp-default-user'. (should (string-equal + (file-remote-p "/[/host]") + (format + "/[%s/%s@%s]" "default-method" "default-user" "host"))) + (should (string-equal + (file-remote-p "/[/host]" 'method) "default-method")) + (should (string-equal + (file-remote-p "/[/host]" 'user) "default-user")) + (should (string-equal (file-remote-p "/[/host]" 'host) "host")) + (should (string-equal (file-remote-p "/[/host]" 'localname) "")) + (should (string-equal (file-remote-p "/[/host]" 'hop) nil)) + + ;; Expand `tramp-default-method' and `tramp-default-host'. + (should (string-equal + (file-remote-p "/[/user@]") + (format + "/[%s/%s@%s]" "default-method" "user" "default-host"))) + (should (string-equal + (file-remote-p "/[/user@]" 'method) "default-method")) + (should (string-equal (file-remote-p "/[/user@]" 'user) "user")) + (should (string-equal + (file-remote-p "/[/user@]" 'host) "default-host")) + (should (string-equal (file-remote-p "/[/user@]" 'localname) "")) + (should (string-equal (file-remote-p "/[/user@]" 'hop) nil)) + + ;; Expand `tramp-default-method'. + (should (string-equal + (file-remote-p "/[/user@host]") + (format "/[%s/%s@%s]" "default-method" "user" "host"))) + (should (string-equal + (file-remote-p "/[/user@host]" 'method) "default-method")) + (should (string-equal (file-remote-p "/[/user@host]" 'user) "user")) + (should (string-equal (file-remote-p "/[/user@host]" 'host) "host")) + (should (string-equal (file-remote-p "/[/user@host]" 'localname) "")) + (should (string-equal (file-remote-p "/[/user@host]" 'hop) nil)) + + ;; Expand `tramp-default-method' and `tramp-default-user'. + (should (string-equal (file-remote-p "/[-/host]") (format "/[%s/%s@%s]" "default-method" "default-user" "host"))) @@ -1055,6 +1092,36 @@ handled properly. BODY shall not contain a timeout." ;; Expand `tramp-default-method' and `tramp-default-user'. (should (string-equal + (file-remote-p "/[/host#1234]") + (format + "/[%s/%s@%s]" "default-method" "default-user" "host#1234"))) + (should (string-equal + (file-remote-p "/[/host#1234]" 'method) "default-method")) + (should (string-equal + (file-remote-p "/[/host#1234]" 'user) "default-user")) + (should (string-equal + (file-remote-p "/[/host#1234]" 'host) "host#1234")) + (should (string-equal (file-remote-p "/[/host#1234]" 'localname) "")) + (should (string-equal (file-remote-p "/[/host#1234]" 'hop) nil)) + + ;; Expand `tramp-default-method'. + (should (string-equal + (file-remote-p "/[/user@host#1234]") + (format "/[%s/%s@%s]" "default-method" "user" "host#1234"))) + (should (string-equal + (file-remote-p + "/[/user@host#1234]" 'method) "default-method")) + (should (string-equal + (file-remote-p + "/[/user@host#1234]" 'user) "user")) + (should (string-equal + (file-remote-p "/[/user@host#1234]" 'host) "host#1234")) + (should (string-equal + (file-remote-p "/[/user@host#1234]" 'localname) "")) + (should (string-equal (file-remote-p "/[/user@host#1234]" 'hop) nil)) + + ;; Expand `tramp-default-method' and `tramp-default-user'. + (should (string-equal (file-remote-p "/[-/host#1234]") (format "/[%s/%s@%s]" "default-method" "default-user" "host#1234"))) @@ -1115,6 +1182,35 @@ handled properly. BODY shall not contain a timeout." ;; Expand `tramp-default-method' and `tramp-default-user'. (should (string-equal + (file-remote-p "/[/1.2.3.4]") + (format + "/[%s/%s@%s]" "default-method" "default-user" "1.2.3.4"))) + (should (string-equal + (file-remote-p "/[/1.2.3.4]" 'method) "default-method")) + (should (string-equal + (file-remote-p "/[/1.2.3.4]" 'user) "default-user")) + (should (string-equal + (file-remote-p "/[/1.2.3.4]" 'host) "1.2.3.4")) + (should (string-equal (file-remote-p "/[/1.2.3.4]" 'localname) "")) + (should (string-equal (file-remote-p "/[/1.2.3.4]" 'hop) nil)) + + ;; Expand `tramp-default-method'. + (should (string-equal + (file-remote-p "/[/user@1.2.3.4]") + (format "/[%s/%s@%s]" "default-method" "user" "1.2.3.4"))) + (should (string-equal + (file-remote-p + "/[/user@1.2.3.4]" 'method) "default-method")) + (should (string-equal + (file-remote-p "/[/user@1.2.3.4]" 'user) "user")) + (should (string-equal + (file-remote-p "/[/user@1.2.3.4]" 'host) "1.2.3.4")) + (should (string-equal + (file-remote-p "/[/user@1.2.3.4]" 'localname) "")) + (should (string-equal (file-remote-p "/[/user@1.2.3.4]" 'hop) nil)) + + ;; Expand `tramp-default-method' and `tramp-default-user'. + (should (string-equal (file-remote-p "/[-/1.2.3.4]") (format "/[%s/%s@%s]" "default-method" "default-user" "1.2.3.4"))) @@ -1174,6 +1270,58 @@ handled properly. BODY shall not contain a timeout." ;; Expand `tramp-default-method', `tramp-default-user' and ;; `tramp-default-host'. (should (string-equal + (file-remote-p "/[/]") + (format + "/[%s/%s@%s]" + "default-method" "default-user" "default-host"))) + (should (string-equal + (file-remote-p "/[/]" 'method) "default-method")) + (should (string-equal (file-remote-p "/[/]" 'user) "default-user")) + (should (string-equal (file-remote-p "/[/]" 'host) "default-host")) + (should (string-equal (file-remote-p "/[/]" 'localname) "")) + (should (string-equal (file-remote-p "/[/]" 'hop) nil)) + + ;; Expand `tramp-default-method' and `tramp-default-user'. + (let ((tramp-default-host "::1")) + (should (string-equal + (file-remote-p "/[/]") + (format + "/[%s/%s@%s]" + "default-method" "default-user" "::1"))) + (should (string-equal + (file-remote-p "/[/]" 'method) "default-method")) + (should (string-equal (file-remote-p "/[/]" 'user) "default-user")) + (should (string-equal (file-remote-p "/[/]" 'host) "::1")) + (should (string-equal (file-remote-p "/[/]" 'localname) "")) + (should (string-equal (file-remote-p "/[/]" 'hop) nil))) + + ;; Expand `tramp-default-method' and `tramp-default-user'. + (should (string-equal + (file-remote-p "/[/::1]") + (format + "/[%s/%s@%s]" "default-method" "default-user" "::1"))) + (should (string-equal + (file-remote-p "/[/::1]" 'method) "default-method")) + (should (string-equal + (file-remote-p "/[/::1]" 'user) "default-user")) + (should (string-equal (file-remote-p "/[/::1]" 'host) "::1")) + (should (string-equal (file-remote-p "/[/::1]" 'localname) "")) + (should (string-equal (file-remote-p "/[/::1]" 'hop) nil)) + + ;; Expand `tramp-default-method'. + (should (string-equal + (file-remote-p "/[/user@::1]") + (format "/[%s/%s@%s]" "default-method" "user" "::1"))) + (should (string-equal + (file-remote-p "/[/user@::1]" 'method) "default-method")) + (should (string-equal (file-remote-p "/[/user@::1]" 'user) "user")) + (should (string-equal (file-remote-p "/[/user@::1]" 'host) "::1")) + (should (string-equal (file-remote-p "/[/user@::1]" 'localname) "")) + (should (string-equal (file-remote-p "/[/user@::1]" 'hop) nil)) + + ;; Expand `tramp-default-method', `tramp-default-user' and + ;; `tramp-default-host'. + (should (string-equal (file-remote-p "/[-/]") (format "/[%s/%s@%s]" @@ -1250,6 +1398,7 @@ handled properly. BODY shall not contain a timeout." (should (string-equal (file-remote-p "/[method/user@::1]" 'hop) nil)) ;; Local file name part. + (should (string-equal (file-remote-p "/[/host]/:" 'localname) "/:")) (should (string-equal (file-remote-p "/[-/host]/:" 'localname) "/:")) (should (string-equal (file-remote-p "/[method/]:" 'localname) ":")) (should (string-equal (file-remote-p "/[method/] " 'localname) " ")) commit 92879a1b035baf297158812ccdbaf6ae1d157e16 Author: Alan Mackenzie Date: Sun Apr 16 10:01:09 2017 +0000 Fix bug #26529: C-h k errors with a lambda function bound to a key. * lisp/help-fns.el (help-fns--signature, describe-function-1): Check `function' is a symbol before trying to get property `reader-construct' from it. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 5459ddf4a3..2c635ffa50 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -473,7 +473,8 @@ suitable file is found, return nil." (let ((fill-begin (point)) (high-usage (car high)) (high-doc (cdr high))) - (unless (get function 'reader-construct) + (unless (and (symbolp function) + (get function 'reader-construct)) (insert high-usage "\n")) (fill-region fill-begin (point)) high-doc))))) @@ -613,7 +614,8 @@ FILE is the file where FUNCTION was probably defined." ;; Print what kind of function-like object FUNCTION is. (princ (cond ((or (stringp def) (vectorp def)) "a keyboard macro") - ((get function 'reader-construct) + ((and (symbolp function) + (get function 'reader-construct)) "a reader construct") ;; Aliases are Lisp functions, so we need to check ;; aliases before functions. commit bdd0c8600fcd33b6f8a535a66343591a29575042 Author: Simen Heggestøyl Date: Sun Apr 16 11:55:33 2017 +0200 Fix highlighting of short selectors in CSS mode * lisp/textmodes/css-mode.el (css--font-lock-keywords): Highlight selectors where the part before a colon is only one character long, such as `a:hover'. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 2088ea0a1e..d4a5cfe629 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -733,7 +733,7 @@ cannot be completed sensibly: `custom-ident', (if (not sassy) ;; We don't allow / as first char, so as not to ;; take a comment as the beginning of a selector. - "[^@/:{}() \t\n][^:{}()]+" + "[^@/:{}() \t\n][^:{}()]*" ;; Same as for non-sassy except we do want to allow { and } ;; chars in selectors in the case of #{$foo} ;; variable interpolation!