commit 56f8384bb3f20d55693a3a1db8aa2cf490e6d18e (HEAD, refs/remotes/origin/master) Author: Philipp Stephani Date: Thu Oct 20 20:22:40 2016 +0200 Minor fixes to cc-mode-tests.el See Bug#24747. * progmodes/cc-mode-tests.el: Rename from cc-mode.el; fix typo in file-local variable; add comments to make checkdoc happy. diff --git a/test/lisp/progmodes/cc-mode.el b/test/lisp/progmodes/cc-mode-tests.el similarity index 96% rename from test/lisp/progmodes/cc-mode.el rename to test/lisp/progmodes/cc-mode-tests.el index 6cd9fa4..62e0a73 100644 --- a/test/lisp/progmodes/cc-mode.el +++ b/test/lisp/progmodes/cc-mode-tests.el @@ -1,4 +1,4 @@ -;;; cc-mode-tests.el --- Test suite for cc-mode. -*- lexical-binning: t -*- +;;; cc-mode-tests.el --- Test suite for cc-mode. -*- lexical-binding: t; -*- ;; Copyright (C) 2016 Free Software Foundation, Inc. @@ -21,6 +21,11 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Unit tests for cc-mode.el. + ;;; Code: (require 'ert) @@ -63,3 +68,5 @@ '("struct \t Blah_42 \t {" "struct template {" "#include "))))) + +;;; cc-mode-tests.el ends here commit 3b83123a7f5709ad58ceaa9ac073f433749471d2 Author: Michael Albinus Date: Thu Oct 20 16:29:40 2016 +0200 * etc/NEWS: Fix typos. Remove entries backported to Emacs 25.2. diff --git a/etc/NEWS b/etc/NEWS index 4f88de9..3b3164c 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -127,9 +127,6 @@ part of minibuffers. ** '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'. - --- ** 'process-attributes' on Darwin systems now returns more information. @@ -286,7 +283,7 @@ whose content matches a regexp; bound to '% g'. ** Dired +++ -*** A New option 'dired-always-read-filesystem' default to nil. +*** A new option 'dired-always-read-filesystem' default to nil. If non-nil, buffers visiting files are reverted before search them; for instance, in 'dired-mark-files-containing-regexp' a non-nil value of this option means the file is revisited in a temporary buffer; @@ -302,9 +299,9 @@ this is controlled by the 'wdired-create-parent-directories' variable. *** 'W' is now bound to 'browse-url-of-dired-file', and is useful for viewing HTML files and the like. -** Ediff +** Edebug -*** Ediff can be prevented from pausing 1 second after reaching a +*** Edebug can be prevented from pausing 1 second after reaching a breakpoint (e.g. with "f" and "o") by customizing the new option 'edebug-sit-on-break'. @@ -514,14 +511,15 @@ function 'check-declare-errmsg' has been removed. * Lisp Changes in Emacs 26.1 -** New function undo-amalgamate-change-group to get rid of undo-boundaries -between two states. +** New function 'undo-amalgamate-change-group' to get rid of +undo-boundaries between two states. ** New var 'definition-prefixes' is a hashtable mapping prefixes to the files where corresponding definitions can be found. This can be used to fetch definitions that are not yet loaded, for example for 'C-h f'. -** New var syntax-ppss-table to control the syntax-table used in syntax-ppss. +** New var 'syntax-ppss-table' to control the syntax-table used in +'syntax-ppss'. +++ ** 'define-derived-mode' can now specify an :after-hook form, which @@ -535,8 +533,8 @@ FIXME As an experiment, nil is the current default. If no insurmountable problems before next release, it can stay that way. --- -** 'gnutls-boot' now takes a parameter :complete-negotiation that says -that negotiation should complete even on non-blocking sockets. +** 'gnutls-boot' now takes a parameter ':complete-negotiation' that +says that negotiation should complete even on non-blocking sockets. +++ ** New functions 'window-pixel-width-before-size-change' and @@ -574,7 +572,7 @@ of a two character construct, i.e., a comment delimiter or escaped character. Its value is the syntax of that last character. +++ -** 'parse-partial-sexp''s state, element 9, has now been confirmed as +** 'parse-partial-sexp's state, element 9, has now been confirmed as permanent and documented, and may be used by Lisp programs. Its value is a list of currently open parenthesis positions, starting with the outermost parenthesis. @@ -615,10 +613,6 @@ ABBR is a time zone abbreviation. The affected functions are 'current-time-string', 'current-time-zone', 'decode-time', 'format-time-string', and 'set-time-zone-rule'. -+++ -*** New basic face 'fixed-pitch-serif', for a fixed-width font with serifs. -The Info-quoted and tex-verbatim faces now default to inheriting from it. - ** New built-in function 'mapcan' which avoids unnecessary consing (and garbage collection). @@ -635,7 +629,7 @@ or its files before 'delete-directory' gets to them. +++ *** Support for side windows is now official. The display action -function `display-buffer-in-side-window' will display its buffer in a +function 'display-buffer-in-side-window' will display its buffer in a side window. Functions for toggling all side windows on a frame, changing and reversing the layout of side windows and returning the main (major non-side) window of a frame are provided. For details consult @@ -643,21 +637,22 @@ the section "Side Windows" in the Elisp manual. +++ *** Support for atomic windows - rectangular compositions of windows -treated by `split-window', `delete-window' and `delete-other-windows' +treated by 'split-window', 'delete-window' and 'delete-other-windows' like a single live window - is now official. For details consult the section "Atomic Windows" in the Elisp manual. +++ -*** New `display-buffer' alist entry `window-parameters' allows to +*** New 'display-buffer' alist entry 'window-parameters' allows to assign window parameters to the window used for displaying the buffer. +++ -*** New window parameter `no-delete-other-window' prevents that -its window gets deleted by `delete-other-windows'. +*** New window parameter 'no-delete-other-window' prevents that +its window gets deleted by 'delete-other-windows'. +++ -*** New command `window-swap-states' swaps the states of two live +*** New command 'window-swap-states' swaps the states of two live windows. + * Changes in Emacs 26.1 on Non-Free Operating Systems commit ce26926b6223194a6ff0d8a3c17f1d58aaa5d0fe Merge: 38091c9 f63a4b8 Author: Michael Albinus Date: Thu Oct 20 14:58:13 2016 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit 38091c90005932017cbac54f2f5b82b3a003b9fa Author: Michael Albinus Date: Thu Oct 20 14:57:17 2016 +0200 Document, how to suppress iTerm2 shell integration in Tramp * doc/misc/tramp.texi (Frequently Asked Questions): Suppress iTerm2 shell integration. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index c3b54c6..d8a2bea 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2886,8 +2886,21 @@ end @end group @end example -When using WinSSHD on remote hosts, @value{tramp} do not recognize the -strange prompt settings. +When using WinSSHD on remote hosts, @value{tramp} does not recognize +the strange prompt settings. + +A similar problem exist with the iTerm2 shell integration, which sends +proprietary escape codes when starting a shell. This can be +suppressed by changing the respective integration snippet in your +@file{~/.profile} like this: + +@example +@group +[ $TERM = "dumb" ] || \ +test -e "$@{HOME@}/.iterm2_shell_integration.bash" && \ +source "$@{HOME@}/.iterm2_shell_integration.bash" +@end group +@end example @item Echoed characters after login commit f63a4b82f0e8634a76e4e7794bb7c7c4e734c4ba Author: Tino Calancha Date: Thu Oct 20 19:51:55 2016 +0900 cl-seq: Remove max limit on input sequence length * lisp/emacs-lisp/cl-seq.el (cl-fill, cl-replace, cl-delete) (cl--position, cl-nsubstitute, cl-substitute, cl-remove): Remove limit on maximum length for the input sequence (#Bug24264). * test/lisp/emacs-lisp/cl-seq-tests.el: Update test expected result as passed. diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el index ed27b7c..3f8b1ee 100644 --- a/lisp/emacs-lisp/cl-seq.el +++ b/lisp/emacs-lisp/cl-seq.el @@ -151,8 +151,8 @@ called. (cl--parsing-keywords ((:start 0) :end) () (if (listp cl-seq) (let ((p (nthcdr cl-start cl-seq)) - (n (if cl-end (- cl-end cl-start) 8000000))) - (while (and p (>= (setq n (1- n)) 0)) + (n (and cl-end (- cl-end cl-start)))) + (while (and p (or (null n) (>= (cl-decf n) 0))) (setcar p cl-item) (setq p (cdr p)))) (or cl-end (setq cl-end (length cl-seq))) @@ -180,16 +180,20 @@ SEQ1 is destructively modified, then returned. (elt cl-seq2 (+ cl-start2 cl-n)))))) (if (listp cl-seq1) (let ((cl-p1 (nthcdr cl-start1 cl-seq1)) - (cl-n1 (if cl-end1 (- cl-end1 cl-start1) 4000000))) + (cl-n1 (and cl-end1 (- cl-end1 cl-start1)))) (if (listp cl-seq2) (let ((cl-p2 (nthcdr cl-start2 cl-seq2)) - (cl-n (min cl-n1 - (if cl-end2 (- cl-end2 cl-start2) 4000000)))) - (while (and cl-p1 cl-p2 (>= (setq cl-n (1- cl-n)) 0)) + (cl-n (cond ((and cl-n1 cl-end2) + (min cl-n1 (- cl-end2 cl-start2))) + ((and cl-n1 (null cl-end2)) cl-n1) + ((and (null cl-n1) cl-end2) (- cl-end2 cl-start2))))) + (while (and cl-p1 cl-p2 (or (null cl-n) (>= (cl-decf cl-n) 0))) (setcar cl-p1 (car cl-p2)) (setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2)))) - (setq cl-end2 (min (or cl-end2 (length cl-seq2)) - (+ cl-start2 cl-n1))) + (setq cl-end2 (if (null cl-n1) + (or cl-end2 (length cl-seq2)) + (min (or cl-end2 (length cl-seq2)) + (+ cl-start2 cl-n1)))) (while (and cl-p1 (< cl-start2 cl-end2)) (setcar cl-p1 (aref cl-seq2 cl-start2)) (setq cl-p1 (cdr cl-p1) cl-start2 (1+ cl-start2))))) @@ -215,9 +219,10 @@ to avoid corrupting the original SEQ. \n(fn ITEM SEQ [KEYWORD VALUE]...)" (cl--parsing-keywords (:test :test-not :key :if :if-not :count :from-end (:start 0) :end) () - (if (<= (or cl-count (setq cl-count 8000000)) 0) + (let ((len (length cl-seq))) + (if (<= (or cl-count (setq cl-count len)) 0) cl-seq - (if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000))) + (if (or (nlistp cl-seq) (and cl-from-end (< cl-count (/ len 2)))) (let ((cl-i (cl--position cl-item cl-seq cl-start cl-end cl-from-end))) (if cl-i @@ -229,7 +234,7 @@ to avoid corrupting the original SEQ. (if (listp cl-seq) cl-res (if (stringp cl-seq) (concat cl-res) (vconcat cl-res)))) cl-seq)) - (setq cl-end (- (or cl-end 8000000) cl-start)) + (setq cl-end (- (or cl-end len) cl-start)) (if (= cl-start 0) (while (and cl-seq (> cl-end 0) (cl--check-test cl-item (car cl-seq)) @@ -250,7 +255,7 @@ to avoid corrupting the original SEQ. :start 0 :end (1- cl-end) :count (1- cl-count) cl-keys)))) cl-seq)) - cl-seq))))) + cl-seq)))))) ;;;###autoload (defun cl-remove-if (cl-pred cl-list &rest cl-keys) @@ -278,20 +283,21 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. \n(fn ITEM SEQ [KEYWORD VALUE]...)" (cl--parsing-keywords (:test :test-not :key :if :if-not :count :from-end (:start 0) :end) () - (if (<= (or cl-count (setq cl-count 8000000)) 0) + (let ((len (length cl-seq))) + (if (<= (or cl-count (setq cl-count len)) 0) cl-seq (if (listp cl-seq) - (if (and cl-from-end (< cl-count 4000000)) + (if (and cl-from-end (< cl-count (/ len 2))) (let (cl-i) (while (and (>= (setq cl-count (1- cl-count)) 0) (setq cl-i (cl--position cl-item cl-seq cl-start - cl-end cl-from-end))) + cl-end cl-from-end))) (if (= cl-i 0) (setq cl-seq (cdr cl-seq)) (let ((cl-tail (nthcdr (1- cl-i) cl-seq))) (setcdr cl-tail (cdr (cdr cl-tail))))) (setq cl-end cl-i)) cl-seq) - (setq cl-end (- (or cl-end 8000000) cl-start)) + (setq cl-end (- (or cl-end len) cl-start)) (if (= cl-start 0) (progn (while (and cl-seq @@ -312,7 +318,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. (setq cl-p (cdr cl-p))) (setq cl-end (1- cl-end))))) cl-seq) - (apply 'cl-remove cl-item cl-seq cl-keys))))) + (apply 'cl-remove cl-item cl-seq cl-keys)))))) ;;;###autoload (defun cl-delete-if (cl-pred cl-list &rest cl-keys) @@ -396,15 +402,17 @@ to avoid corrupting the original SEQ. (cl--parsing-keywords (:test :test-not :key :if :if-not :count (:start 0) :end :from-end) () (if (or (eq cl-old cl-new) - (<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0)) + (<= (or cl-count (setq cl-from-end nil + cl-count (length cl-seq))) 0)) cl-seq (let ((cl-i (cl--position cl-old cl-seq cl-start cl-end))) (if (not cl-i) cl-seq (setq cl-seq (copy-sequence cl-seq)) - (or cl-from-end - (progn (setf (elt cl-seq cl-i) cl-new) - (setq cl-i (1+ cl-i) cl-count (1- cl-count)))) + (unless cl-from-end + (setf (elt cl-seq cl-i) cl-new) + (cl-incf cl-i) + (cl-decf cl-count)) (apply 'cl-nsubstitute cl-new cl-old cl-seq :count cl-count :start cl-i cl-keys)))))) @@ -434,17 +442,18 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. \n(fn NEW OLD SEQ [KEYWORD VALUE]...)" (cl--parsing-keywords (:test :test-not :key :if :if-not :count (:start 0) :end :from-end) () - (or (eq cl-old cl-new) (<= (or cl-count (setq cl-count 8000000)) 0) - (if (and (listp cl-seq) (or (not cl-from-end) (> cl-count 4000000))) + (let ((len (length cl-seq))) + (or (eq cl-old cl-new) (<= (or cl-count (setq cl-count len)) 0) + (if (and (listp cl-seq) (or (not cl-from-end) (> cl-count (/ len 2)))) (let ((cl-p (nthcdr cl-start cl-seq))) - (setq cl-end (- (or cl-end 8000000) cl-start)) + (setq cl-end (- (or cl-end len) cl-start)) (while (and cl-p (> cl-end 0) (> cl-count 0)) (if (cl--check-test cl-old (car cl-p)) (progn (setcar cl-p cl-new) (setq cl-count (1- cl-count)))) (setq cl-p (cdr cl-p) cl-end (1- cl-end)))) - (or cl-end (setq cl-end (length cl-seq))) + (or cl-end (setq cl-end len)) (if cl-from-end (while (and (< cl-start cl-end) (> cl-count 0)) (setq cl-end (1- cl-end)) @@ -457,7 +466,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible. (progn (aset cl-seq cl-start cl-new) (setq cl-count (1- cl-count)))) - (setq cl-start (1+ cl-start)))))) + (setq cl-start (1+ cl-start))))))) cl-seq)) ;;;###autoload @@ -513,14 +522,13 @@ Return the index of the matching item, or nil if not found. (defun cl--position (cl-item cl-seq cl-start &optional cl-end cl-from-end) (if (listp cl-seq) - (let ((cl-p (nthcdr cl-start cl-seq))) - (or cl-end (setq cl-end 8000000)) - (let ((cl-res nil)) - (while (and cl-p (< cl-start cl-end) (or (not cl-res) cl-from-end)) + (let ((cl-p (nthcdr cl-start cl-seq)) + cl-res) + (while (and cl-p (or (null cl-end) (< cl-start cl-end)) (or (null cl-res) cl-from-end)) (if (cl--check-test cl-item (car cl-p)) (setq cl-res cl-start)) (setq cl-p (cdr cl-p) cl-start (1+ cl-start))) - cl-res)) + cl-res) (or cl-end (setq cl-end (length cl-seq))) (if cl-from-end (progn diff --git a/test/lisp/emacs-lisp/cl-seq-tests.el b/test/lisp/emacs-lisp/cl-seq-tests.el index cc393f4..02d9246 100644 --- a/test/lisp/emacs-lisp/cl-seq-tests.el +++ b/test/lisp/emacs-lisp/cl-seq-tests.el @@ -294,7 +294,6 @@ Body are forms defining the test." (ert-deftest cl-seq-test-bug24264 () "Test for http://debbugs.gnu.org/24264 ." - :expected-result :failed (let ((list (append (make-list 8000005 1) '(8))) (list2 (make-list 8000005 2))) (should (cl-position 8 list))