From d8374c4e95d6b2a0e839b3b49b12225222e8c721 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 12 Oct 2016 17:48:04 -0700 Subject: [PATCH 01/11] * src/filelock.c (current_lock_owner): Update comment. --- src/filelock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/filelock.c b/src/filelock.c index 23bb4b83bd5..6c60c3e8e1c 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -574,10 +574,10 @@ current_lock_owner (lock_info_type *owner, char *lfname) break; case '\357': - /* Treat "\357\200\242" (U+F022 in UTF-8) as if it were ":". - This works around a bug in Samba, which can mistakenly - transliterate ':' to U+F022 in symlink contents (Bug#24656). - See . */ + /* Treat "\357\200\242" (U+F022 in UTF-8) as if it were ":" (Bug#24656). + This works around a bug in the Linux CIFS kernel client, which can + mistakenly transliterate ':' to U+F022 in symlink contents. + See . */ if (! (boot[0] == '\200' && boot[1] == '\242')) return -1; boot += 2; From ceb46f002145e986c944b2423404535019b7e62b Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Wed, 12 Oct 2016 22:48:32 +0200 Subject: [PATCH 02/11] Fix crash in evaluating functions See Bug#24673 * src/eval.c (funcall_lambda): Fix crash for bogus functions such as (closure). --- src/eval.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/eval.c b/src/eval.c index 13a41a2ae20..b94712d4579 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2825,9 +2825,11 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, { if (EQ (XCAR (fun), Qclosure)) { - fun = XCDR (fun); /* Drop `closure'. */ + Lisp_Object cdr = XCDR (fun); /* Drop `closure'. */ + if (! CONSP (cdr)) + xsignal1 (Qinvalid_function, fun); + fun = cdr; lexenv = XCAR (fun); - CHECK_LIST_CONS (fun, fun); } else lexenv = Qnil; From 4de671d844c56d70e747366657664c8d293fe2bf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Oct 2016 20:15:21 +0300 Subject: [PATCH 03/11] Improve doc string of 'completion-at-point-functions' * lisp/minibuffer.el (completion-at-point-functions): Doc fix. (Bug#24663) --- lisp/minibuffer.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index c7f7c4122c3..56454d5a634 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -2052,22 +2052,22 @@ Also respects the obsolete wrapper hook `completion-in-region-functions'. minor-mode-map-alist)) (defvar completion-at-point-functions '(tags-completion-at-point-function) - "Special hook to find the completion table for the thing at point. -Each function on this hook is called in turn without any argument and should -return either nil to mean that it is not applicable at point, -or a function of no argument to perform completion (discouraged), -or a list of the form (START END COLLECTION . PROPS) where + "Special hook to find the completion table for the entity at point. +Each function on this hook is called in turn without any argument and +should return either nil, meaning it is not applicable at point, +or a function of no arguments to perform completion (discouraged), +or a list of the form (START END COLLECTION . PROPS), where: START and END delimit the entity to complete and should include point, - COLLECTION is the completion table to use to complete it, and + COLLECTION is the completion table to use to complete the entity, and PROPS is a property list for additional information. Currently supported properties are all the properties that can appear in `completion-extra-properties' plus: `:predicate' a predicate that completion candidates need to satisfy. - `:exclusive' If `no', means that if the completion table fails to + `:exclusive' value of `no' means that if the completion table fails to match the text at point, then instead of reporting a completion failure, the completion should try the next completion function. -As is the case with most hooks, the functions are responsible to preserve -things like point and current buffer.") +As is the case with most hooks, the functions are responsible for +preserving things like point and current buffer.") (defvar completion--capf-misbehave-funs nil "List of functions found on `completion-at-point-functions' that misbehave. From 10835b18cdfd93442e6fae093ffd130587006fcf Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 14 Oct 2016 22:52:46 +0300 Subject: [PATCH 04/11] Avoid crashes due to objects read with the #n=object form * src/lread.c (read1): Use Fcons for 'placeholder', not AUTO_CONS, because elements of the list in 'read_objects' cannot be allocated off the stack. (Bug#24640) --- src/lread.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/lread.c b/src/lread.c index ef58b20070d..8a368806e15 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2845,7 +2845,18 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (c == '=') { /* Make a placeholder for #n# to use temporarily. */ - AUTO_CONS (placeholder, Qnil, Qnil); + /* Note: We used to use AUTO_CONS to allocate + placeholder, but that is a bad idea, since it + will place a stack-allocated cons cell into + the list in read_objects, which is a + staticpro'd global variable, and thus each of + its elements is marked during each GC. A + stack-allocated object will become garbled + when its stack slot goes out of scope, and + some other function reuses it for entirely + different purposes, which will cause crashes + in GC. */ + Lisp_Object placeholder = Fcons (Qnil, Qnil); Lisp_Object cell = Fcons (make_number (n), placeholder); read_objects = Fcons (cell, read_objects); From 21300051eb28b87703745dd0979d322da68d9ed5 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 15 Oct 2016 12:40:45 +0200 Subject: [PATCH 05/11] * INSTALL: Use correct Emacs release number 25. --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index 6f516bd1dde..119b4d4dd1d 100644 --- a/INSTALL +++ b/INSTALL @@ -34,7 +34,7 @@ some of the steps manually. The more detailed description in the other sections of this guide will help you do that, so please refer to those sections if you need to. - 1. Unpacking the Emacs 24 release requires about 200 MB of free + 1. Unpacking the Emacs 25 release requires about 200 MB of free disk space. Building Emacs uses about another 200 MB of space. The final installed Emacs uses about 150 MB of disk space. This includes the space-saving that comes from automatically From 528997daa15d6e864f4f7119fe073fe37ab4c685 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Oct 2016 16:53:36 +0300 Subject: [PATCH 06/11] Keep point when switching from and to *terminal* buffer * lisp/term.el (term-reset-size): Don't reset the size if it didn't change. If the size did change, restore point after adjusting the size. (Bug#24465) --- lisp/term.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/term.el b/lisp/term.el index f477bccbe2e..993e5803059 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1116,12 +1116,16 @@ Entry to this mode runs the hooks on `term-mode-hook'." (term-update-mode-line)) (defun term-reset-size (height width) - (setq term-height height) - (setq term-width width) - (setq term-start-line-column nil) - (setq term-current-row nil) - (setq term-current-column nil) - (term-set-scroll-region 0 height)) + (when (or (/= height term-height) + (/= width term-width)) + (let ((point (point))) + (setq term-height height) + (setq term-width width) + (setq term-start-line-column nil) + (setq term-current-row nil) + (setq term-current-column nil) + (term-set-scroll-region 0 height) + (goto-char point)))) ;; Recursive routine used to check if any string in term-kill-echo-list ;; matches part of the buffer before point. From 4eb4463abf1db904f9e8cdc35156a66f8a10125c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 15 Oct 2016 17:58:57 +0300 Subject: [PATCH 07/11] Fix char-width-table values for some Emoji * lisp/international/characters.el (char-width-table): Add missing range U+1F400..U+1F43E. (Bug#24699) * admin/notes/unicode: Mention the need to verify char-width-table setting against data in EastAsianWidth.txt. --- admin/notes/unicode | 4 ++++ lisp/international/characters.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/notes/unicode b/admin/notes/unicode index 76479d44975..d149459a9d4 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -36,6 +36,10 @@ and char-width-table. The additional scripts should cause automatic updates in charscript.el, but it is a good idea to look at the results and see if any changes in admin/unidata/blocks.awk are required. +The setting of char-width-table around line 1200 of characters.el +should be checked against the latest version of the Unicode file +EastAsianWidth.txt, and any discrepancies fixed. + Any new scripts added by UnicodeData.txt will also need updates to script-representative-chars defined in fontset.el, and also the list of OTF script tags in otf-script-alist, whose source is on this page: diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 00f68f0fbbf..bd0e41516a5 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1257,7 +1257,7 @@ with L, LRE, or LRO Unicode bidi character type.") (#x1F3E0 . #x1F3F0) (#x1F3F4 . #x1F3F4) (#x1F3F8 . #x1F3FA) - (#x1F3FB . #x1F3FF) + (#x1F3FB . #x1F43E) (#x1F440 . #x1F440) (#x1F442 . #x1F4FC) (#x1F4FF . #x1F53D) From 30c4bb58ca14d4dcd9037553ba5782a8f68394d4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Oct 2016 14:19:32 +0300 Subject: [PATCH 08/11] More char-width fixes * lisp/international/characters.el (char-width-table): More fixes according to the latest EastAsianWidth.txt. (Bug#24705) --- lisp/international/characters.el | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index bd0e41516a5..c9f8bebed53 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1235,38 +1235,25 @@ with L, LRE, or LRO Unicode bidi character type.") (#x2B50 . #x2B50) (#x2B55 . #x2B55) (#x2E80 . #x303E) - (#x3040 . #xA4CF) + (#x3040 . #x4DBF) + (#x4E00 . #xA4CF) + (#xA960 . #xA97F) (#xAC00 . #xD7A3) (#xF900 . #xFAFF) + (#xFE10 . #xFE19) (#xFE30 . #xFE6F) (#xFF01 . #xFF60) (#xFFE0 . #xFFE6) (#x16FE0 . #x16FE0) (#x17000 . #x187EC) (#x18800 . #x18AF2) + (#x1B000 . #x1B001) + (#x1F004 . #x1F004) + (#x1F0CF . #x1F0CF) (#x1F18E . #x1F18E) (#x1F191 . #x1F19A) - (#x1F200 . #x1F202) - (#x1F210 . #x1F23B) - (#x1F300 . #x1F320) - (#x1F32D . #x1F335) - (#x1F337 . #x1F37C) - (#x1F37E . #x1F393) - (#x1F3A0 . #x1F3CA) - (#x1F3CF . #x1F3D3) - (#x1F3E0 . #x1F3F0) - (#x1F3F4 . #x1F3F4) - (#x1F3F8 . #x1F3FA) - (#x1F3FB . #x1F43E) - (#x1F440 . #x1F440) - (#x1F442 . #x1F4FC) - (#x1F4FF . #x1F53D) - (#x1F54B . #x1F54E) - (#x1F550 . #x1F567) - (#x1F57A . #x1F57A) - (#x1F595 . #x1F596) - (#x1F5A4 . #x1F5A4) - (#x1F5FB . #x1F5FF) + (#x1F200 . #x1F2FF) + (#x1F300 . #x1F5FF) (#x1F600 . #x1F64F) (#x1F680 . #x1F6C5) (#x1F6CC . #x1F6CC) From 993acb5088a9766f3af240edcb9c6ffb93530034 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 16 Oct 2016 14:22:24 +0300 Subject: [PATCH 09/11] ; Minor fix for last change in characters.el --- lisp/international/characters.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index c9f8bebed53..e7f2ce097b0 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1248,8 +1248,6 @@ with L, LRE, or LRO Unicode bidi character type.") (#x17000 . #x187EC) (#x18800 . #x18AF2) (#x1B000 . #x1B001) - (#x1F004 . #x1F004) - (#x1F0CF . #x1F0CF) (#x1F18E . #x1F18E) (#x1F191 . #x1F19A) (#x1F200 . #x1F2FF) From 55ebb708cf65156085003ea0e5cd08a06353be05 Mon Sep 17 00:00:00 2001 From: Andreas Politz Date: Sun, 16 Oct 2016 16:56:25 +0300 Subject: [PATCH 10/11] Catch the imenu-unavailable error in sh-mode completion table * lisp/progmodes/sh-script.el (sh--cmd-completion-table): Catch the imenu-unavailable error (bug#24238). --- lisp/progmodes/sh-script.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index f089c81fe56..0040adc2c2b 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -1741,7 +1741,10 @@ This adds rules for comments and assignments." (defun sh--cmd-completion-table (string pred action) (let ((cmds (append (when (fboundp 'imenu--make-index-alist) - (mapcar #'car (imenu--make-index-alist))) + (mapcar #'car + (condition-case nil + (imenu--make-index-alist) + (imenu-unavailable nil)))) (mapcar (lambda (v) (concat v "=")) (sh--vars-before-point)) (locate-file-completion-table From b73f4668ab685dfb690eced15b20ed47f90efccb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Oct 2016 18:56:06 -0700 Subject: [PATCH 11/11] * lisp/cus-start.el (exec-path): Handle nil elements. (Bug#24471) --- lisp/cus-start.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 001d638ca14..a8bcc458649 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el @@ -173,7 +173,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of (directory :format "%v"))) nil :standard - (mapcar 'directory-file-name + (mapcar (lambda (f) + (if f (directory-file-name f) + ".")) (append (parse-colon-path (getenv "PATH")) (list exec-directory)))) (exec-suffixes execute (repeat string))