commit a62437d4b933825a92ac3836836edbca3540fa1c (HEAD, refs/remotes/origin/master) Author: Noam Postavsky Date: Thu Mar 23 23:54:58 2017 -0400 Don't add `search-failed' to ignored errors in info.el (Bug#6106) * lisp/info.el: Stop adding `search-failed' to `debug-ignored-errors'. (Info-select-node, Info-search): Replace (signal 'search-failed ...) with (user-error "Search failed: "...). diff --git a/lisp/info.el b/lisp/info.el index 8dc85f48a4..a06c868fb3 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1672,7 +1672,7 @@ escaped (\\\",\\\\)." (forward-line 2) (if (looking-at "\^_") (forward-line 1) - (signal 'search-failed (list "\n\^_")))) + (user-error "Search failed: `\n\^_'"))) ;; Get nodename spelled as it is in the node. (re-search-forward "Node:[ \t]*") (setq Info-current-node @@ -1998,19 +1998,20 @@ If DIRECTION is `backward', search in the reverse direction." Info-isearch-initial-node bound (and found (> found opoint-min) (< found opoint-max))) - (signal 'search-failed (list regexp "end of node"))) + (user-error "Search failed: `%s' (end of node)" regexp)) ;; If no subfiles, give error now. (unless (or found Info-current-subfile) (if isearch-mode - (signal 'search-failed (list regexp "end of manual")) + (user-error "Search failed: `%s' (end of manual)" regexp) (let ((search-spaces-regexp Info-search-whitespace-regexp)) - (if backward - (re-search-backward regexp) - (re-search-forward regexp))))) + (unless (if backward + (re-search-backward regexp nil t) + (re-search-forward regexp nil t)) + (user-error "Search failed: `%s'" regexp))))) (if (and bound (not found)) - (signal 'search-failed (list regexp))) + (user-error "Search failed: `%s'" regexp)) (unless (or found bound) (unwind-protect @@ -2054,9 +2055,8 @@ If DIRECTION is `backward', search in the reverse direction." (setq list nil))) (if found (message "") - (signal 'search-failed (if isearch-mode - (list regexp "end of manual") - (list regexp))))) + (user-error "Search failed: `%s'%s" + regexp (if isearch-mode " (end of manual)" "")))) (if (not found) (progn (Info-read-subfile osubfile) (goto-char opoint) @@ -5237,9 +5237,6 @@ BUFFER is the buffer speedbar is requesting buttons for." (erase-buffer)) (Info-speedbar-hierarchy-buttons nil 0)) -;; FIXME: Really? Why here? -(add-to-list 'debug-ignored-errors 'search-failed) - ;;;; Desktop support (defun Info-desktop-buffer-misc-data (_desktop-dirname) commit 55086ef6517bd7294783d08d2b3cd50c330a9e96 Author: Paul Eggert Date: Mon Mar 27 11:22:54 2017 -0700 Fix obsolete ‘test/automated’ references * Makefile.in (mostlyclean, clean, maybeclean_dirs, distclean) (bootstrap-clean, maintainer-clean): Clean ‘test’, not ‘test/automated’. Test for existence of subdirectory only for ‘test’, not for directories that should always exist. * admin/MAINTAINERS, etc/TODO, lisp/emacs-lisp/bytecomp.el: * lisp/emacs-lisp/seq.el, lisp/emacs-lisp/thunk.el: * lisp/man.el (Man-parse-man-k): * lisp/url/url-domsuf.el, make-dist: * test/file-organization.org: Fix obsolete references to test/automated. diff --git a/Makefile.in b/Makefile.in index cf8ff84212..06909c3444 100644 --- a/Makefile.in +++ b/Makefile.in @@ -821,9 +821,7 @@ mostlyclean_dirs = src oldXMenu lwlib lib lib-src nt doc/emacs doc/misc \ $(foreach dir,$(mostlyclean_dirs),$(eval $(call submake_template,$(dir),mostlyclean))) mostlyclean: $(mostlyclean_dirs:=_mostlyclean) - for dir in test/automated; do \ - [ ! -d $$dir ] || $(MAKE) -C $$dir mostlyclean; \ - done + [ ! -d test ] || $(MAKE) -C test $@ ### 'clean' ### Delete all files from the current directory that are normally @@ -838,9 +836,8 @@ clean_dirs = $(mostlyclean_dirs) nextstep $(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean))) clean: $(clean_dirs:=_clean) - for dir in test/automated admin/charsets; do \ - [ ! -d $$dir ] || $(MAKE) -C $$dir clean; \ - done + $(MAKE) -C admin/charsets $@ + [ ! -d test ] || $(MAKE) -C test $@ -rm -f *.tmp etc/*.tmp* -rm -rf info-dir.* @@ -864,12 +861,13 @@ distclean_dirs = $(clean_dirs) leim lisp $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean))) -maybeclean_dirs = test/automated admin/grammars admin/unidata admin/charsets +maybeclean_dirs = test admin/grammars admin/unidata admin/charsets distclean: $(distclean_dirs:=_distclean) - for dir in ${maybeclean_dirs}; do \ - [ ! -d $$dir ] || $(MAKE) -C $$dir distclean; \ + for dir in $(filter-out test,$(maybeclean_dirs)); do \ + $(MAKE) -C $$dir $@ || exit; \ done + [ ! -d test ] || $(MAKE) -C test $@ ${top_distclean} ### 'bootstrap-clean' @@ -878,9 +876,10 @@ distclean: $(distclean_dirs:=_distclean) $(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),bootstrap-clean))) bootstrap-clean: $(distclean_dirs:=_bootstrap-clean) - for dir in ${maybeclean_dirs}; do \ - [ ! -d $$dir ] || $(MAKE) -C $$dir bootstrap-clean; \ + for dir in $(filter-out test,$(maybeclean_dirs)); do \ + $(MAKE) -C $$dir $@ || exit; \ done + [ ! -d test ] || $(MAKE) -C test $@ [ ! -f config.log ] || mv -f config.log config.log~ rm -rf ${srcdir}/info rm -f ${srcdir}/etc/refcards/emacsver.tex @@ -906,9 +905,10 @@ maintainer_clean_dirs = src leim lisp $(foreach dir,$(maintainer_clean_dirs),$(eval $(call submake_template,$(dir),maintainer-clean))) maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean) - for dir in ${maybeclean_dirs}; do \ - [ ! -d $$dir ] || $(MAKE) -C $$dir maintainer-clean; \ + for dir in $(filter-out test,$(maybeclean_dirs)); do \ + $(MAKE) -C $$dir $@ || exit; \ done + [ ! -d test ] || $(MAKE) -C test $@ ${top_maintainer_clean} ### This doesn't actually appear in the coding standards, but Karl diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 5aff824288..c13cb552a7 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -82,11 +82,11 @@ Simen Heggestøyl Nicolas Petton lisp/emacs-lisp/map.el - test/automated/map-tests.el + test/lisp/emac-lisp/map-tests.el lisp/emacs-lisp/seq.el - test/automated/seq-tests.el + test/lisp/emac-lisp/seq-tests.el lisp/emacs-lisp/thunk.el - test/automated/thunk-tests.el + test/lisp/emac-lisp/thunk-tests.el The GNU AUCTeX maintainers (auctex-devel@gnu.org) RefTeX @@ -104,7 +104,7 @@ The GNU AUCTeX maintainers (auctex-devel@gnu.org) Dmitry Gutov lisp/progmodes/ruby-mode.el - test/automated/ruby-mode-tests.el + test/lisp/progmodes/ruby-mode-tests.el test/indent/ruby.rb lisp/progmodes/xref.el lisp/progmodes/project.el @@ -119,11 +119,11 @@ Ulf Jasper lisp/net/newst-ticker.el lisp/net/newst-treeview.el lisp/net/newsticker.el - test/automated/newsticker-tests.el + test/lisp/net/newsticker-tests.el Icalendar lisp/calendar/icalendar.el - test/automated/icalendar-tests.el + test/lisp/calendar/icalendar-tests.el ============================================================================== 2. Areas that someone is willing to maintain, although he would not diff --git a/etc/TODO b/etc/TODO index 71704f07cf..af2f41bf96 100644 --- a/etc/TODO +++ b/etc/TODO @@ -139,7 +139,7 @@ things in their .emacs. case to make sure it stays fixed. Or pick your favorite programming major-mode, and write a test for its indentation. Or a version control backend, and write a test for its status parser. Etc. -See test/automated for examples. +See the 'test' directory for examples. * Small but important fixes needed in existing features: diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index f45ae359f6..2c2996ebab 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -443,7 +443,7 @@ Return the compile-time value of FORM." ;; Macroexpand (not macroexpand-all!) form at toplevel in case it ;; expands into a toplevel-equivalent `progn'. See CLHS section ;; 3.2.3.1, "Processing of Top Level Forms". The semantics are very - ;; subtle: see test/automated/bytecomp-tests.el for interesting + ;; subtle: see test/lisp/emacs-lisp/bytecomp-tests.el for interesting ;; cases. (setf form (macroexp-macroexpand form byte-compile-macro-environment)) (if (eq (car-safe form) 'progn) diff --git a/lisp/emacs-lisp/seq.el b/lisp/emacs-lisp/seq.el index 4118764662..10de248479 100644 --- a/lisp/emacs-lisp/seq.el +++ b/lisp/emacs-lisp/seq.el @@ -52,7 +52,7 @@ ;; - `seq-copy' ;; - `seq-into' ;; -;; All functions are tested in test/automated/seq-tests.el +;; All functions are tested in test/lisp/emacs-lisp/seq-tests.el ;;; Code: diff --git a/lisp/emacs-lisp/thunk.el b/lisp/emacs-lisp/thunk.el index be0a90fefd..f4c075d22c 100644 --- a/lisp/emacs-lisp/thunk.el +++ b/lisp/emacs-lisp/thunk.el @@ -42,8 +42,6 @@ ;; ;; (thunk-force delayed) -;; Tests are located at test/automated/thunk-tests.el - ;;; Code: (defmacro thunk-delay (&rest body) diff --git a/lisp/man.el b/lisp/man.el index 4f6e1187e0..0e1c92956b 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -832,10 +832,7 @@ indicating optional parts and whitespace being interpreted somewhat loosely. foo[, bar [, ...]] [other stuff] (sec) - description -foo(sec)[, bar(sec) [, ...]] [other stuff] - description - -For more details and some regression tests, please see -test/automated/man-tests.el in the emacs repository." +foo(sec)[, bar(sec) [, ...]] [other stuff] - description" (goto-char (point-min)) ;; See man-tests for data about which systems use which format (hopefully we ;; will be able to simplify the code if/when some of those formats aren't diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el index 25a6a423eb..b24f24531a 100644 --- a/lisp/url/url-domsuf.el +++ b/lisp/url/url-domsuf.el @@ -89,7 +89,7 @@ ;; Tests: -;; TODO convert to a proper test/automated test. +;; TODO convert to a proper test. ;; (url-domsuf-cookie-allowed-p "com") => nil ;; (url-domsuf-cookie-allowed-p "foo.bar.bd") => t ;; (url-domsuf-cookie-allowed-p "bar.bd") => nil diff --git a/make-dist b/make-dist index 96e0a73048..7e1f0dfb96 100755 --- a/make-dist +++ b/make-dist @@ -538,12 +538,9 @@ done if [ "$with_tests" = "yes" ]; then echo "Making links to 'test' and its subdirectories" - for f in `find test -type f`; do - case $f in - test/automated/*.log) continue ;; - test/automated/flymake/warnpred/a.out) continue ;; - test/automated/Makefile) continue ;; - esac + for f in `find test -type f ! -name '*.log' ! -name a.out \ + ! -path test/Makefile + `; do ln $f $tempdir/$f done fi diff --git a/test/file-organization.org b/test/file-organization.org index 8d9c671637..4d76c0068e 100644 --- a/test/file-organization.org +++ b/test/file-organization.org @@ -50,9 +50,9 @@ not run by the "make check" command and its derivatives. Resource files for tests (containing test data) should reside in a directory named after the feature with a ~-resources~ suffix, and located in the same directory as the feature. Hence, the lisp file -~flymake.el~ should have test files in -~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a -directory called ~/test/automated/lisp/progmodes/flymake-resources~. +~lisp/progmodes/flymake.el~, with tests in +~test/lisp/progmodes/flymake-tests.el~, should have resources in a +directory called ~test/lisp/progmodes/flymake-resources~. No guidance is given for the organization of resource files inside the ~-resource~ directory; files can be organized at the author's commit 8ce827426e5400f2be80ae5d7394b74d8dd90373 Author: Katsumi Yamaoka Date: Mon Mar 27 09:05:41 2017 +0000 shr-image-fetched: Work for narrowed Gnus article See <8737e3msun.fsf@gmail.com> of bug#26231 in the bug-gnu-emacs list. * lisp/net/shr.el (shr-image-fetched): Work for narrowed article. diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 6ec647e802..7472c4133a 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -933,17 +933,19 @@ If EXTERNAL, browse the URL using `shr-external-browser'." (let ((data (shr-parse-image-data))) (with-current-buffer buffer (save-excursion - (let ((alt (buffer-substring start end)) - (properties (text-properties-at start)) - (inhibit-read-only t)) - (delete-region start end) - (goto-char start) - (funcall shr-put-image-function data alt flags) - (while properties - (let ((type (pop properties)) - (value (pop properties))) - (unless (memq type '(display image-size)) - (put-text-property start (point) type value)))))))))) + (save-restriction + (widen) + (let ((alt (buffer-substring start end)) + (properties (text-properties-at start)) + (inhibit-read-only t)) + (delete-region start end) + (goto-char start) + (funcall shr-put-image-function data alt flags) + (while properties + (let ((type (pop properties)) + (value (pop properties))) + (unless (memq type '(display image-size)) + (put-text-property start (point) type value))))))))))) (kill-buffer image-buffer))) (defun shr-image-from-data (data)