aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--INSTALL22
-rw-r--r--doc/lispref/ChangeLog4
-rw-r--r--doc/lispref/windows.texi6
-rw-r--r--lisp/ChangeLog36
-rw-r--r--lisp/ChangeLog.132
-rw-r--r--lisp/emacs-lisp/debug.el4
-rw-r--r--lisp/emacs-lisp/package.el5
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/gnus-uu.el1
-rw-r--r--lisp/mail/smtpmail.el2
-rw-r--r--lisp/minibuffer.el7
-rw-r--r--lisp/net/quickurl.el4
-rw-r--r--lisp/org/ChangeLog6
-rw-r--r--lisp/org/org.el1
-rw-r--r--lisp/pcmpl-cvs.el14
-rw-r--r--lisp/progmodes/perl-mode.el3
-rw-r--r--lisp/simple.el4
-rw-r--r--lisp/subr.el2
-rw-r--r--src/ChangeLog21
-rw-r--r--src/ChangeLog.112
-rw-r--r--src/ChangeLog.92
-rw-r--r--src/bidi.c10
-rw-r--r--src/lread.c2
-rw-r--r--src/xdisp.c122
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/newsticker-tests.el (renamed from test/newsticker-testsuite.el)113
27 files changed, 267 insertions, 143 deletions
diff --git a/ChangeLog b/ChangeLog
index a80fa24c3c2..c1a80f2d92f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12011-09-28 Eli Zaretskii <eliz@gnu.org>
2
3 * INSTALL: Mention that m17n libraries and libotf are needed for
4 Arabic shaping.
5
12011-09-26 Paul Eggert <eggert@cs.ucla.edu> 62011-09-26 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Merge from gnulib, improving some licensing wording. 8 Merge from gnulib, improving some licensing wording.
diff --git a/INSTALL b/INSTALL
index 03682d19b10..3aed5a869cc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -111,15 +111,16 @@ ADDITIONAL DISTRIBUTION FILES
111 111
112* Complex Text Layout support libraries 112* Complex Text Layout support libraries
113 113
114Emacs needs the optional libraries "m17n-db", "libm17n-flt", "libotf" 114On GNU and Unix systems, Emacs needs the optional libraries "m17n-db",
115to correctly display such complex scripts as Indic and Khmer. 115"libm17n-flt", "libotf" to correctly display such complex scripts as
116On some systems, particularly GNU/Linux, these libraries may be 116Indic and Khmer, and also for scripts that require Arabic shaping
117already present or available as additional packages. Note that if 117support (Arabic and Farsi). On some systems, particularly GNU/Linux,
118there is a separate `dev' or `devel' package, for use at compilation 118these libraries may be already present or available as additional
119time rather than run time, you will need that as well as the 119packages. Note that if there is a separate `dev' or `devel' package,
120corresponding run time package; typically the dev package will contain 120for use at compilation time rather than run time, you will need that
121header files and a library archive. Otherwise, you can download and 121as well as the corresponding run time package; typically the dev
122build libraries from sources. 122package will contain header files and a library archive. Otherwise,
123you can download and build libraries from sources.
123 124
124The sources of these libraries are available by anonymous CVS from 125The sources of these libraries are available by anonymous CVS from
125cvs.m17n.org. 126cvs.m17n.org.
@@ -133,6 +134,9 @@ For m17n-lib, if you have problems with making the whole package
133because you lack some other packages on which m17n-lib depends, try to 134because you lack some other packages on which m17n-lib depends, try to
134configure it with the option "--without-gui". 135configure it with the option "--without-gui".
135 136
137Note that Emacs cannot support complex scripts on a TTY, unless the
138terminal includes such a support.
139
136* intlfonts-VERSION.tar.gz 140* intlfonts-VERSION.tar.gz
137 141
138The intlfonts distribution contains X11 fonts in various encodings 142The intlfonts distribution contains X11 fonts in various encodings
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 423e052068b..afd32ad4ebe 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,7 @@
12011-09-28 Juanma Barranquero <lekktu@gmail.com>
2
3 * windows.texi (Splitting Windows): Fix typos.
4
12011-09-25 Martin Rudalics <rudalics@gmx.at> 52011-09-25 Martin Rudalics <rudalics@gmx.at>
2 6
3 * windows.texi (Windows and Frames, Display Action Functions) 7 * windows.texi (Windows and Frames, Display Action Functions)
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 96d489d1203..6a7206f459d 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1178,7 +1178,7 @@ equivalently, @code{(split-window W3 -8 'left)} should now produce the
1178penultimate configuration from the previous scenario from where we can 1178penultimate configuration from the previous scenario from where we can
1179continue as described before. 1179continue as described before.
1180 1180
1181 Another strategy starts with splitting an inital window @code{W6} by 1181 Another strategy starts with splitting an initial window @code{W6} by
1182evaluating @code{(split-window W6 nil nil t)} with the following result: 1182evaluating @code{(split-window W6 nil nil t)} with the following result:
1183@smallexample 1183@smallexample
1184@group 1184@group
@@ -1259,11 +1259,11 @@ configuration.
1259@defopt window-splits 1259@defopt window-splits
1260If this variable is nil, the function @code{split-window} can split a 1260If this variable is nil, the function @code{split-window} can split a
1261window if and only if that window's screen estate is sufficiently large 1261window if and only if that window's screen estate is sufficiently large
1262to accomodate both--itself and the new window. 1262to accommodate both--itself and the new window.
1263 1263
1264If this variable is non-@code{nil}, @code{split-window} tries to resize 1264If this variable is non-@code{nil}, @code{split-window} tries to resize
1265all windows that are part of the same combination as the old window to 1265all windows that are part of the same combination as the old window to
1266accomodate the new window. Hence, the new window can be also created if 1266accommodate the new window. Hence, the new window can be also created if
1267the old window is of fixed size or too small to split (@pxref{Window 1267the old window is of fixed size or too small to split (@pxref{Window
1268Sizes}). 1268Sizes}).
1269 1269
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ec867fee08b..0927ff478c2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,39 @@
12011-09-28 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * simple.el (delete-trailing-whitespace): Fix last change.
4
5 * progmodes/perl-mode.el (perl-syntax-propertize-function):
6 Don't confuse "y => 3" as the beginning of a `y' operation.
7
8 * emacs-lisp/debug.el (debug-convert-byte-code): Don't assume the
9 object has more than 4 slots (bug#9613).
10
112011-09-28 Juanma Barranquero <lekktu@gmail.com>
12
13 * subr.el (with-output-to-temp-buffer):
14 * net/quickurl.el (quickurl, quickurl-browse-url):
15 Fix typos in docstrings.
16
172011-09-27 Eli Zaretskii <eliz@gnu.org>
18
19 * minibuffer.el (completion-styles)
20 (completion-category-overrides): Cross reference each other in doc
21 strings.
22
232011-09-27 Glenn Morris <rgm@gnu.org>
24
25 * pcmpl-cvs.el (pcmpl-cvs-entries): Update for Emacs 22.1 changes
26 to split-string. (Bug#9606)
27
282011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
29
30 * mail/smtpmail.el (smtpmail-via-smtp): Fix STARTTLS detection
31 (bug#9615).
32
332011-09-27 Chong Yidong <cyd@stupidchicken.com>
34
35 * emacs-lisp/package.el (list-packages): Fix echo area message.
36
12011-09-27 Leo Liu <sdl.web@gmail.com> 372011-09-27 Leo Liu <sdl.web@gmail.com>
2 38
3 * ido.el (ido-read-internal): Accept cons cell HIST arg. 39 * ido.el (ido-read-internal): Accept cons cell HIST arg.
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index 8cbe1ad5776..993c51163cb 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -1743,7 +1743,7 @@
1743 auto-composition-function to it. 1743 auto-composition-function to it.
1744 (toggle-auto-composition): New function. 1744 (toggle-auto-composition): New function.
1745 1745
1746 * international/characters.el: Make all chararacters in the 1746 * international/characters.el: Make all characters in the
1747 charset tibetan to tibetan script. 1747 charset tibetan to tibetan script.
1748 1748
1749 * international/mule-conf.el (tibetan): Fix :code-space property. 1749 * international/mule-conf.el (tibetan): Fix :code-space property.
diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
index d7021a46165..d05a518e590 100644
--- a/lisp/emacs-lisp/debug.el
+++ b/lisp/emacs-lisp/debug.el
@@ -869,8 +869,10 @@ To specify a nil argument interactively, exit with an empty minibuffer."
869 ,defn 869 ,defn
870 ,@(remq '&rest (remq '&optional args)))))) 870 ,@(remq '&rest (remq '&optional args))))))
871 (if (> (length defn) 5) 871 (if (> (length defn) 5)
872 ;; The mere presence of field 5 is sufficient to make
873 ;; it interactive.
872 (push `(interactive ,(aref defn 5)) body)) 874 (push `(interactive ,(aref defn 5)) body))
873 (if (aref defn 4) 875 (if (and (> (length defn) 4) (aref defn 4))
874 ;; Use `documentation' here, to get the actual string, 876 ;; Use `documentation' here, to get the actual string,
875 ;; in case the compiled function has a reference 877 ;; in case the compiled function has a reference
876 ;; to the .elc file. 878 ;; to the .elc file.
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 4cab8f43480..2e340a442a6 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1658,10 +1658,11 @@ The list is displayed in a buffer named `*Packages*'."
1658 (switch-to-buffer buf)) 1658 (switch-to-buffer buf))
1659 (let ((upgrades (package-menu--find-upgrades))) 1659 (let ((upgrades (package-menu--find-upgrades)))
1660 (if upgrades 1660 (if upgrades
1661 (message "%d package%s can be upgraded; type `%s' to mark them for upgrading." 1661 (message "%d package%s can be upgraded; type `%s' to mark %s for upgrading."
1662 (length upgrades) 1662 (length upgrades)
1663 (if (= (length upgrades) 1) "" "s") 1663 (if (= (length upgrades) 1) "" "s")
1664 (substitute-command-keys "\\[package-menu-mark-upgrades]"))))) 1664 (substitute-command-keys "\\[package-menu-mark-upgrades]")
1665 (if (= (length upgrades) 1) "it" "them")))))
1665 1666
1666;;;###autoload 1667;;;###autoload
1667(defalias 'package-list-packages 'list-packages) 1668(defalias 'package-list-packages 'list-packages)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c535f4a9549..a330d5c6be8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -3,6 +3,11 @@
3 * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify 3 * plstore.el (plstore-select-keys, plstore-encrypt-to): Clarify
4 documentation. 4 documentation.
5 5
62011-09-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
7
8 * gnus-uu.el (gnus-uu-grab-articles): Require gnus-async so that
9 `gnus-asynchronous' isn't shadowed.
10
62011-09-26 Lars Magne Ingebrigtsen <larsi@gnus.org> 112011-09-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
7 12
8 * nnimap.el (nnimap-wait-for-response): Message less (bug#9540). 13 * nnimap.el (nnimap-wait-for-response): Message less (bug#9540).
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 05ba3595479..15c3d41bece 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1290,6 +1290,7 @@ When called interactively, prompt for REGEXP."
1290;; the process-function has been successful and nil otherwise. 1290;; the process-function has been successful and nil otherwise.
1291(defun gnus-uu-grab-articles (articles process-function 1291(defun gnus-uu-grab-articles (articles process-function
1292 &optional sloppy limit no-errors) 1292 &optional sloppy limit no-errors)
1293 (require 'gnus-async)
1293 (let ((state 'first) 1294 (let ((state 'first)
1294 (gnus-asynchronous nil) 1295 (gnus-asynchronous nil)
1295 (gnus-inhibit-treatment t) 1296 (gnus-inhibit-treatment t)
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 1c6f2c7b7ed..edcc82011af 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -658,7 +658,7 @@ The list is in preference order.")
658 :always-query-capabilities t 658 :always-query-capabilities t
659 :starttls-function 659 :starttls-function
660 (lambda (capabilities) 660 (lambda (capabilities)
661 (and (string-match "-STARTTLS" capabilities) 661 (and (string-match "[ -]STARTTLS" capabilities)
662 "STARTTLS\r\n")) 662 "STARTTLS\r\n"))
663 :client-certificate t 663 :client-certificate t
664 :use-starttls-if-possible t))) 664 :use-starttls-if-possible t)))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index c6f28b14415..021e46d5053 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -482,7 +482,10 @@ and DOC describes the way this style of completion works.")
482 ;; and simply add "bar" to the end of the result. 482 ;; and simply add "bar" to the end of the result.
483 emacs22) 483 emacs22)
484 "List of completion styles to use. 484 "List of completion styles to use.
485The available styles are listed in `completion-styles-alist'." 485The available styles are listed in `completion-styles-alist'.
486
487Note that `completion-category-overrides' may override these
488styles for specific categories, such as files, buffers, etc."
486 :type `(repeat (choice ,@(mapcar (lambda (x) (list 'const (car x))) 489 :type `(repeat (choice ,@(mapcar (lambda (x) (list 'const (car x)))
487 completion-styles-alist))) 490 completion-styles-alist)))
488 :group 'minibuffer 491 :group 'minibuffer
@@ -490,7 +493,7 @@ The available styles are listed in `completion-styles-alist'."
490 493
491(defcustom completion-category-overrides 494(defcustom completion-category-overrides
492 '((buffer (styles . (basic substring)))) 495 '((buffer (styles . (basic substring))))
493 "List of overrides for specific categories. 496 "List of `completion-styles' overrides for specific categories.
494Each override has the shape (CATEGORY . ALIST) where ALIST is 497Each override has the shape (CATEGORY . ALIST) where ALIST is
495an association list that can specify properties such as: 498an association list that can specify properties such as:
496- `styles': the list of `completion-styles' to use for that category. 499- `styles': the list of `completion-styles' to use for that category.
diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el
index 712f0b0c924..3f1437f0799 100644
--- a/lisp/net/quickurl.el
+++ b/lisp/net/quickurl.el
@@ -307,7 +307,7 @@ Also display a `message' saying what the URL was unless SILENT is non-nil."
307 "Insert a URL based on LOOKUP. 307 "Insert a URL based on LOOKUP.
308 308
309If not supplied LOOKUP is taken to be the word at point in the current 309If not supplied LOOKUP is taken to be the word at point in the current
310buffer, this default action can be modifed via 310buffer, this default action can be modified via
311`quickurl-grab-lookup-function'." 311`quickurl-grab-lookup-function'."
312 (interactive) 312 (interactive)
313 (when (or lookup 313 (when (or lookup
@@ -402,7 +402,7 @@ is decided."
402 "Browse the URL associated with LOOKUP. 402 "Browse the URL associated with LOOKUP.
403 403
404If not supplied LOOKUP is taken to be the word at point in the 404If not supplied LOOKUP is taken to be the word at point in the
405current buffer, this default action can be modifed via 405current buffer, this default action can be modified via
406`quickurl-grab-lookup-function'." 406`quickurl-grab-lookup-function'."
407 (interactive) 407 (interactive)
408 (when (or lookup 408 (when (or lookup
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 1c320f20e51..9fbeb9f1882 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,9 @@
12011-09-27 Eli Zaretskii <eliz@gnu.org>
2
3 * org.el (org-mode): Force left-to-right paragraphs in Org
4 buffers. For a related discussions, see
5 https://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00349.html.
6
12011-09-17 Juanma Barranquero <lekktu@gmail.com> 72011-09-17 Juanma Barranquero <lekktu@gmail.com>
2 8
3 * org.el (org-toggle-pretty-entities): Fix typo in message. 9 * org.el (org-toggle-pretty-entities): Fix typo in message.
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 32ca5288d6e..da39aa189ba 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -4748,6 +4748,7 @@ The following commands are available:
4748 (org-set-local 'line-move-ignore-invisible t)) 4748 (org-set-local 'line-move-ignore-invisible t))
4749 (org-set-local 'outline-regexp org-outline-regexp) 4749 (org-set-local 'outline-regexp org-outline-regexp)
4750 (org-set-local 'outline-level 'org-outline-level) 4750 (org-set-local 'outline-level 'org-outline-level)
4751 (setq bidi-paragraph-direction 'left-to-right)
4751 (when (and org-ellipsis 4752 (when (and org-ellipsis
4752 (fboundp 'set-display-table-slot) (boundp 'buffer-display-table) 4753 (fboundp 'set-display-table-slot) (boundp 'buffer-display-table)
4753 (fboundp 'make-glyph-code)) 4754 (fboundp 'make-glyph-code))
diff --git a/lisp/pcmpl-cvs.el b/lisp/pcmpl-cvs.el
index b6c5eb62b17..3ff07bca20e 100644
--- a/lisp/pcmpl-cvs.el
+++ b/lisp/pcmpl-cvs.el
@@ -169,13 +169,13 @@ operation character applies, as displayed by 'cvs -n update'."
169 (insert-file-contents (concat dir "CVS/Entries")) 169 (insert-file-contents (concat dir "CVS/Entries"))
170 (goto-char (point-min)) 170 (goto-char (point-min))
171 (while (not (eobp)) 171 (while (not (eobp))
172 (let* ((line (buffer-substring (line-beginning-position) 172 ;; Normal file: /NAME -> "" "NAME"
173 (line-end-position))) 173 ;; Directory : D/NAME -> "D" "NAME"
174 (fields (split-string line "/")) 174 (let* ((fields (split-string (buffer-substring
175 text) 175 (line-beginning-position)
176 (if (eq (aref line 0) ?/) 176 (line-end-position))
177 (setq fields (cons "" fields))) 177 "/"))
178 (setq text (nth 1 fields)) 178 (text (nth 1 fields)))
179 (when text 179 (when text
180 (if (string= (nth 0 fields) "D") 180 (if (string= (nth 0 fields) "D")
181 (setq text (file-name-as-directory text))) 181 (setq text (file-name-as-directory text)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 8ca8c690f92..933f004bb5d 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -304,11 +304,12 @@ The expansion is entirely correct because it uses the C preprocessor."
304 (put-text-property (match-beginning 2) (match-end 2) 304 (put-text-property (match-beginning 2) (match-end 2)
305 'syntax-table (string-to-syntax "\"")) 305 'syntax-table (string-to-syntax "\""))
306 (perl-syntax-propertize-special-constructs end))))) 306 (perl-syntax-propertize-special-constructs end)))))
307 ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" 307 ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\(?:\\([^])}>= \n\t]\\)\\|\\(?3:=\\)[^>]\\)"
308 ;; Nasty cases: 308 ;; Nasty cases:
309 ;; /foo/m $a->m $#m $m @m %m 309 ;; /foo/m $a->m $#m $m @m %m
310 ;; \s (appears often in regexps). 310 ;; \s (appears often in regexps).
311 ;; -s file 311 ;; -s file
312 ;; y => 3
312 ;; sub tr {...} 313 ;; sub tr {...}
313 (3 (ignore 314 (3 (ignore
314 (if (save-excursion (goto-char (match-beginning 0)) 315 (if (save-excursion (goto-char (match-beginning 0))
diff --git a/lisp/simple.el b/lisp/simple.el
index 142270930ca..14ce5ed18ec 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -589,9 +589,9 @@ If the region is active, only delete whitespace within the region."
589 ;; Delete trailing empty lines. 589 ;; Delete trailing empty lines.
590 (goto-char end-marker) 590 (goto-char end-marker)
591 (when (and (not end) 591 (when (and (not end)
592 (<= (skip-chars-backward "\n") -2)
593 ;; Really the end of buffer. 592 ;; Really the end of buffer.
594 (save-restriction (widen) (eobp))) 593 (save-restriction (widen) (eobp))
594 (<= (skip-chars-backward "\n") -2))
595 (delete-region (1+ (point)) end-marker)) 595 (delete-region (1+ (point)) end-marker))
596 (set-marker end-marker nil)))) 596 (set-marker end-marker nil))))
597 ;; Return nil for the benefit of `write-file-functions'. 597 ;; Return nil for the benefit of `write-file-functions'.
diff --git a/lisp/subr.el b/lisp/subr.el
index 1aa714fa883..4946f3eef7a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3002,7 +3002,7 @@ Instead it binds `standard-output' to that buffer, so that output
3002generated with `prin1' and similar functions in BODY goes into 3002generated with `prin1' and similar functions in BODY goes into
3003the buffer. 3003the buffer.
3004 3004
3005At the end of BODY, this marks buffer BUFNAME unmodifed and displays 3005At the end of BODY, this marks buffer BUFNAME unmodified and displays
3006it in a window, but does not select it. The normal way to do this is 3006it in a window, but does not select it. The normal way to do this is
3007by calling `display-buffer', then running `temp-buffer-show-hook'. 3007by calling `display-buffer', then running `temp-buffer-show-hook'.
3008However, if `temp-buffer-show-function' is non-nil, it calls that 3008However, if `temp-buffer-show-function' is non-nil, it calls that
diff --git a/src/ChangeLog b/src/ChangeLog
index 59169bdcf9f..f26754d1135 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,24 @@
12011-09-28 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (compute_display_string_end): If there's no display
4 string at CHARPOS, return -1.
5
6 * bidi.c (bidi_fetch_char): When compute_display_string_end
7 returns a negative value, treat the character as a normal
8 character not covered by a display string. (Bug#9624)
9
102011-09-28 Juanma Barranquero <lekktu@gmail.com>
11
12 * lread.c (Fread_from_string): Fix typo in docstring.
13
142011-09-27 Eli Zaretskii <eliz@gnu.org>
15
16 * xdisp.c (handle_invisible_prop): If invisible text ends on a
17 newline, reseat the iterator instead of bidi-iterating there one
18 character at a time. (Bug#9610)
19 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
20 TO_CHARPOS if the bidi iterator is at base embedding level.
21
12011-09-27 Andreas Schwab <schwab@linux-m68k.org> 222011-09-27 Andreas Schwab <schwab@linux-m68k.org>
2 23
3 * lread.c (readevalloop): Use correct code for NBSP. 24 * lread.c (readevalloop): Use correct code for NBSP.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index b64736459c8..0a9df7d1aee 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -4547,7 +4547,7 @@
4547 4547
4548 * composite.c (composition_compute_stop_pos): In forward search, 4548 * composite.c (composition_compute_stop_pos): In forward search,
4549 pay attention to the possibility that some character after ENDPOS 4549 pay attention to the possibility that some character after ENDPOS
4550 will be composed with charactrs before ENDPOS. 4550 will be composed with characters before ENDPOS.
4551 4551
45522010-08-24 Chong Yidong <cyd@stupidchicken.com> 45522010-08-24 Chong Yidong <cyd@stupidchicken.com>
4553 4553
diff --git a/src/ChangeLog.9 b/src/ChangeLog.9
index f25434087c1..ceec5da3296 100644
--- a/src/ChangeLog.9
+++ b/src/ChangeLog.9
@@ -10460,7 +10460,7 @@
10460 (Fkey_description): Likewise. 10460 (Fkey_description): Likewise.
10461 10461
10462 * lread.c (read1): On reading multibyte string, be sure to make 10462 * lread.c (read1): On reading multibyte string, be sure to make
10463 all 8-bit chararacters in valid multibyte form. 10463 all 8-bit characters in valid multibyte form.
10464 (readchar): Use FETCH_STRING_CHAR_ADVANCE unconditionally. 10464 (readchar): Use FETCH_STRING_CHAR_ADVANCE unconditionally.
10465 10465
10466 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE 10466 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE
diff --git a/src/bidi.c b/src/bidi.c
index 599c00449b5..e3fc03f4a9b 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -974,6 +974,15 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
974 ch = 0xFFFC; 974 ch = 0xFFFC;
975 } 975 }
976 disp_end_pos = compute_display_string_end (*disp_pos, string); 976 disp_end_pos = compute_display_string_end (*disp_pos, string);
977 if (disp_end_pos < 0)
978 {
979 /* Somebody removed the display string from the buffer
980 behind our back. Recover by processing this buffer
981 position as if no display property were present there to
982 begin with. */
983 *disp_prop = 0;
984 goto normal_char;
985 }
977 *nchars = disp_end_pos - *disp_pos; 986 *nchars = disp_end_pos - *disp_pos;
978 if (*nchars <= 0) 987 if (*nchars <= 0)
979 abort (); 988 abort ();
@@ -988,6 +997,7 @@ bidi_fetch_char (EMACS_INT bytepos, EMACS_INT charpos, EMACS_INT *disp_pos,
988 } 997 }
989 else 998 else
990 { 999 {
1000 normal_char:
991 if (string->s) 1001 if (string->s)
992 { 1002 {
993 int len; 1003 int len;
diff --git a/src/lread.c b/src/lread.c
index 241b1e41c94..af737d27070 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1966,7 +1966,7 @@ DEFUN ("read-from-string", Fread_from_string, Sread_from_string, 1, 3, 0,
1966 doc: /* Read one Lisp expression which is represented as text by STRING. 1966 doc: /* Read one Lisp expression which is represented as text by STRING.
1967Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX). 1967Returns a cons: (OBJECT-READ . FINAL-STRING-INDEX).
1968FINAL-STRING-INDEX is an integer giving the position of the next 1968FINAL-STRING-INDEX is an integer giving the position of the next
1969 remaining chararacter in STRING. 1969 remaining character in STRING.
1970START and END optionally delimit a substring of STRING from which to read; 1970START and END optionally delimit a substring of STRING from which to read;
1971 they default to 0 and (length STRING) respectively. */) 1971 they default to 0 and (length STRING) respectively. */)
1972 (Lisp_Object string, Lisp_Object start, Lisp_Object end) 1972 (Lisp_Object string, Lisp_Object start, Lisp_Object end)
diff --git a/src/xdisp.c b/src/xdisp.c
index d5a7c1ca595..9e26360394c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3391,9 +3391,10 @@ compute_display_string_pos (struct text_pos *position,
3391} 3391}
3392 3392
3393/* Return the character position of the end of the display string that 3393/* Return the character position of the end of the display string that
3394 started at CHARPOS. A display string is either an overlay with 3394 started at CHARPOS. If there's no display string at CHARPOS,
3395 `display' property whose value is a string or a `display' text 3395 return -1. A display string is either an overlay with `display'
3396 property whose value is a string. */ 3396 property whose value is a string or a `display' text property whose
3397 value is a string. */
3397EMACS_INT 3398EMACS_INT
3398compute_display_string_end (EMACS_INT charpos, struct bidi_string_data *string) 3399compute_display_string_end (EMACS_INT charpos, struct bidi_string_data *string)
3399{ 3400{
@@ -3407,8 +3408,22 @@ compute_display_string_end (EMACS_INT charpos, struct bidi_string_data *string)
3407 if (charpos >= eob || (string->s && !STRINGP (object))) 3408 if (charpos >= eob || (string->s && !STRINGP (object)))
3408 return eob; 3409 return eob;
3409 3410
3411 /* It could happen that the display property or overlay was removed
3412 since we found it in compute_display_string_pos above. One way
3413 this can happen is if JIT font-lock was called (through
3414 handle_fontified_prop), and jit-lock-functions remove text
3415 properties or overlays from the portion of buffer that includes
3416 CHARPOS. Muse mode is known to do that, for example. In this
3417 case, we return -1 to the caller, to signal that no display
3418 string is actually present at CHARPOS. See bidi_fetch_char for
3419 how this is handled.
3420
3421 An alternative would be to never look for display properties past
3422 it->stop_charpos. But neither compute_display_string_pos nor
3423 bidi_fetch_char that calls it know or care where the next
3424 stop_charpos is. */
3410 if (NILP (Fget_char_property (pos, Qdisplay, object))) 3425 if (NILP (Fget_char_property (pos, Qdisplay, object)))
3411 abort (); 3426 return -1;
3412 3427
3413 /* Look forward for the first character where the `display' property 3428 /* Look forward for the first character where the `display' property
3414 changes. */ 3429 changes. */
@@ -4061,40 +4076,67 @@ handle_invisible_prop (struct it *it)
4061 /* The position newpos is now either ZV or on visible text. */ 4076 /* The position newpos is now either ZV or on visible text. */
4062 if (it->bidi_p && newpos < ZV) 4077 if (it->bidi_p && newpos < ZV)
4063 { 4078 {
4064 /* With bidi iteration, the region of invisible text 4079 EMACS_INT bpos = CHAR_TO_BYTE (newpos);
4065 could start and/or end in the middle of a non-base 4080
4066 embedding level. Therefore, we need to skip 4081 if (FETCH_BYTE (bpos) == '\n'
4067 invisible text using the bidi iterator, starting at 4082 || (newpos > BEGV && FETCH_BYTE (bpos - 1) == '\n'))
4068 IT's current position, until we find ourselves
4069 outside the invisible text. Skipping invisible text
4070 _after_ bidi iteration avoids affecting the visual
4071 order of the displayed text when invisible properties
4072 are added or removed. */
4073 if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
4074 { 4083 {
4075 /* If we were `reseat'ed to a new paragraph, 4084 /* If the invisible text ends on a newline or the
4076 determine the paragraph base direction. We need 4085 character after a newline, we can avoid the
4077 to do it now because next_element_from_buffer may 4086 costly, character by character, bidi iteration to
4078 not have a chance to do it, if we are going to 4087 newpos, and instead simply reseat the iterator
4079 skip any text at the beginning, which resets the 4088 there. That's because all bidi reordering
4080 FIRST_ELT flag. */ 4089 information is tossed at the newline. This is a
4081 bidi_paragraph_init (it->paragraph_embedding, 4090 big win for modes that hide complete lines, like
4082 &it->bidi_it, 1); 4091 Outline, Org, etc. (Implementation note: the
4092 call to reseat_1 is necessary, because it signals
4093 to the bidi iterator that it needs to reinit its
4094 internal information when the next element for
4095 display is requested. */
4096 struct text_pos tpos;
4097
4098 SET_TEXT_POS (tpos, newpos, bpos);
4099 reseat_1 (it, tpos, 0);
4083 } 4100 }
4084 do 4101 else /* Must use the slow method. */
4085 { 4102 {
4086 bidi_move_to_visually_next (&it->bidi_it); 4103 /* With bidi iteration, the region of invisible text
4104 could start and/or end in the middle of a
4105 non-base embedding level. Therefore, we need to
4106 skip invisible text using the bidi iterator,
4107 starting at IT's current position, until we find
4108 ourselves outside the invisible text. Skipping
4109 invisible text _after_ bidi iteration avoids
4110 affecting the visual order of the displayed text
4111 when invisible properties are added or
4112 removed. */
4113 if (it->bidi_it.first_elt && it->bidi_it.charpos < ZV)
4114 {
4115 /* If we were `reseat'ed to a new paragraph,
4116 determine the paragraph base direction. We
4117 need to do it now because
4118 next_element_from_buffer may not have a
4119 chance to do it, if we are going to skip any
4120 text at the beginning, which resets the
4121 FIRST_ELT flag. */
4122 bidi_paragraph_init (it->paragraph_embedding,
4123 &it->bidi_it, 1);
4124 }
4125 do
4126 {
4127 bidi_move_to_visually_next (&it->bidi_it);
4128 }
4129 while (it->stop_charpos <= it->bidi_it.charpos
4130 && it->bidi_it.charpos < newpos);
4131 IT_CHARPOS (*it) = it->bidi_it.charpos;
4132 IT_BYTEPOS (*it) = it->bidi_it.bytepos;
4133 /* If we overstepped NEWPOS, record its position in
4134 the iterator, so that we skip invisible text if
4135 later the bidi iteration lands us in the
4136 invisible region again. */
4137 if (IT_CHARPOS (*it) >= newpos)
4138 it->prev_stop = newpos;
4087 } 4139 }
4088 while (it->stop_charpos <= it->bidi_it.charpos
4089 && it->bidi_it.charpos < newpos);
4090 IT_CHARPOS (*it) = it->bidi_it.charpos;
4091 IT_BYTEPOS (*it) = it->bidi_it.bytepos;
4092 /* If we overstepped NEWPOS, record its position in the
4093 iterator, so that we skip invisible text if later the
4094 bidi iteration lands us in the invisible region
4095 again. */
4096 if (IT_CHARPOS (*it) >= newpos)
4097 it->prev_stop = newpos;
4098 } 4140 }
4099 else 4141 else
4100 { 4142 {
@@ -7934,7 +7976,9 @@ move_it_in_display_line_to (struct it *it,
7934 ((op & MOVE_TO_POS) != 0 \ 7976 ((op & MOVE_TO_POS) != 0 \
7935 && BUFFERP (it->object) \ 7977 && BUFFERP (it->object) \
7936 && (IT_CHARPOS (*it) == to_charpos \ 7978 && (IT_CHARPOS (*it) == to_charpos \
7937 || (!it->bidi_p && IT_CHARPOS (*it) > to_charpos) \ 7979 || ((!it->bidi_p \
7980 || BIDI_AT_BASE_LEVEL (it->bidi_it)) \
7981 && IT_CHARPOS (*it) > to_charpos) \
7938 || (it->what == IT_COMPOSITION \ 7982 || (it->what == IT_COMPOSITION \
7939 && ((IT_CHARPOS (*it) > to_charpos \ 7983 && ((IT_CHARPOS (*it) > to_charpos \
7940 && to_charpos >= it->cmp_it.charpos) \ 7984 && to_charpos >= it->cmp_it.charpos) \
@@ -7966,7 +8010,13 @@ move_it_in_display_line_to (struct it *it,
7966 if ((op & MOVE_TO_POS) != 0 8010 if ((op & MOVE_TO_POS) != 0
7967 && BUFFERP (it->object) 8011 && BUFFERP (it->object)
7968 && it->method == GET_FROM_BUFFER 8012 && it->method == GET_FROM_BUFFER
7969 && ((!it->bidi_p && IT_CHARPOS (*it) > to_charpos) 8013 && (((!it->bidi_p
8014 /* When the iterator is at base embedding level, we
8015 are guaranteed that characters are delivered for
8016 display in strictly increasing order of their
8017 buffer positions. */
8018 || BIDI_AT_BASE_LEVEL (it->bidi_it))
8019 && IT_CHARPOS (*it) > to_charpos)
7970 || (it->bidi_p 8020 || (it->bidi_p
7971 && (prev_method == GET_FROM_IMAGE 8021 && (prev_method == GET_FROM_IMAGE
7972 || prev_method == GET_FROM_STRETCH 8022 || prev_method == GET_FROM_STRETCH
diff --git a/test/ChangeLog b/test/ChangeLog
index 11b3d9b5e2d..6ab148358d9 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12011-09-27 Ulf Jasper <ulf.jasper@web.de>
2
3 * automated/newsticker-tests.el: Move newsticker-testsuite.el
4 to automated/newsticker-tests.el. Convert to ERT.
5
12011-07-26 Ulf Jasper <ulf.jasper@web.de> 62011-07-26 Ulf Jasper <ulf.jasper@web.de>
2 7
3 * automated/icalendar-tests.el (icalendar-tests--compare-strings): 8 * automated/icalendar-tests.el (icalendar-tests--compare-strings):
diff --git a/test/newsticker-testsuite.el b/test/automated/newsticker-tests.el
index 99e40a7ef15..76f4345da55 100644
--- a/test/newsticker-testsuite.el
+++ b/test/automated/newsticker-tests.el
@@ -3,12 +3,7 @@
3;; Copyright (C) 2003-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
4 4
5;; Author: Ulf Jasper <ulf.jasper@web.de> 5;; Author: Ulf Jasper <ulf.jasper@web.de>
6;; Filename: newsticker-testsuite.el
7;; URL: http://www.nongnu.org/newsticker
8;; Keywords: News, RSS, Atom 6;; Keywords: News, RSS, Atom
9;; Time-stamp: "14. Juni 2008, 12:09:39 (ulf)"
10
11;; ======================================================================
12 7
13;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
14 9
@@ -25,42 +20,26 @@
25;; You should have received a copy of the GNU General Public License 20;; You should have received a copy of the GNU General Public License
26;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
27 22
28;; ======================================================================
29
30;;; Commentary: 23;;; Commentary:
31 24
32;;; Code: 25;;; Code:
33 26
34(require 'cl) ; assert 27(require 'ert)
35 28(require 'newsticker)
36;; ======================================================================
37;; Entry point
38;; ======================================================================
39(defun newsticker--testsuite ()
40 "Unit test for newsticker.
41Subtests signal errors if something goes wrong."
42 (interactive)
43 (newsticker--test--guid)
44 (newsticker--test--cache-contains)
45 (newsticker--test--decode-iso8601-date)
46 (newsticker--test--decode-rfc822-date)
47 (newsticker--test--group-manage-orphan-feeds)
48 (message "All tests passed successfully."))
49 29
50;; ====================================================================== 30;; ======================================================================
51;; Tests for newsticker-backend 31;; Tests for newsticker-backend
52;; ====================================================================== 32;; ======================================================================
53(defun newsticker--test--guid () 33(ert-deftest newsticker--guid ()
54 "Test `newsticker-guid-*'. 34 "Test for `newsticker--guid-*'.
55Signals an error if something goes wrong." 35Signals an error if something goes wrong."
56 (assert (string= "blah" (newsticker--guid-to-string "blah"))) 36 (should (string= "blah" (newsticker--guid-to-string "blah")))
57 (assert (string= "myguid" (newsticker--guid '("title1" "description1" "link1" 37 (should (string= "myguid" (newsticker--guid '("title1" "description1" "link1"
58 nil 'new 42 nil nil 38 nil 'new 42 nil nil
59 ((guid () "myguid"))))))) 39 ((guid () "myguid")))))))
60 40
61(defun newsticker--test--cache-contains () 41(ert-deftest newsticker--cache-contains ()
62 "Test `newsticker--test--cache-contains'. 42 "Test for `newsticker--cache-contains'."
63Signals an error if something goes wrong."
64 (let ((newsticker--cache '((feed1 43 (let ((newsticker--cache '((feed1
65 ("title1" "description1" "link1" nil 'new 42 44 ("title1" "description1" "link1" nil 'new 42
66 nil nil ((guid () "myguid"))))))) 45 nil nil ((guid () "myguid")))))))
@@ -68,78 +47,68 @@ Signals an error if something goes wrong."
68 (assoc 'guid (newsticker--extra '("title1" "description1" 47 (assoc 'guid (newsticker--extra '("title1" "description1"
69 "link1" nil 'new 42 nil nil 48 "link1" nil 'new 42 nil nil
70 ((guid "myguid")))))) 49 ((guid "myguid"))))))
71 (assert (newsticker--cache-contains newsticker--cache 'feed1 "WRONGTITLE" 50 (should (newsticker--cache-contains newsticker--cache 'feed1 "WRONGTITLE"
72 "description1" "link1" 'new "myguid")) 51 "description1" "link1" 'new "myguid"))
73 (assert (not (newsticker--cache-contains newsticker--cache 'feed1 "title1" 52 (should (not (newsticker--cache-contains newsticker--cache 'feed1 "title1"
74 "description1" "link1" 'new 53 "description1" "link1" 'new
75 "WRONG GUID"))) 54 "WRONG GUID")))
76 (assert (newsticker--cache-contains newsticker--cache 'feed1 "title1" 55 (should (newsticker--cache-contains newsticker--cache 'feed1 "title1"
77 "description1" "link1" 'new "myguid"))) 56 "description1" "link1" 'new "myguid")))
78 (let ((newsticker--cache '((feed1 57 (let ((newsticker--cache '((feed1
79 ("title1" "description1" "link1" nil 'new 42 58 ("title1" "description1" "link1" nil 'new 42
80 nil nil ((guid () "myguid1"))) 59 nil nil ((guid () "myguid1")))
81 ("title1" "description1" "link1" nil 'new 42 60 ("title1" "description1" "link1" nil 'new 42
82 nil nil ((guid () "myguid2"))))))) 61 nil nil ((guid () "myguid2")))))))
83 (assert (not (newsticker--cache-contains newsticker--cache 'feed1 "title1" 62 (should (not (newsticker--cache-contains newsticker--cache 'feed1 "title1"
84 "description1" "link1" 'new 63 "description1" "link1" 'new
85 "myguid"))) 64 "myguid")))
86 (assert (string= "myguid1" 65 (should (string= "myguid1"
87 (newsticker--guid (newsticker--cache-contains 66 (newsticker--guid (newsticker--cache-contains
88 newsticker--cache 'feed1 "title1" 67 newsticker--cache 'feed1 "title1"
89 "description1" "link1" 'new 68 "description1" "link1" 'new
90 "myguid1")))) 69 "myguid1"))))
91 (assert (string= "myguid2" 70 (should (string= "myguid2"
92 (newsticker--guid (newsticker--cache-contains 71 (newsticker--guid (newsticker--cache-contains
93 newsticker--cache 'feed1 "title1" 72 newsticker--cache 'feed1 "title1"
94 "description1" "link1" 'new 73 "description1" "link1" 'new
95 "myguid2")))))) 74 "myguid2"))))))
96 75
97(defun newsticker--do-test--decode-iso8601-date (input expected) 76(defun newsticker-tests--decode-iso8601-date (input expected)
98 "Actually test `newsticker--decode-iso8601-date'. 77 "Actually test `newsticker--decode-iso8601-date'.
99Signals an error if iso8601-encoded INPUT does not match EXPECTED." 78Apply to INPUT and compare with EXPECTED."
100 (let ((result (format-time-string "%Y-%m-%dT%H:%M:%S" 79 (let ((result (format-time-string "%Y-%m-%dT%H:%M:%S"
101 (newsticker--decode-iso8601-date input) 80 (newsticker--decode-iso8601-date input)
102 t))) 81 t)))
103 (assert (string= result expected) 82 (should (string= result expected))))
104 nil "Error decoding '%s': found '%s' but expected '%s'."
105 input result expected)))
106 83
107(defun newsticker--test--decode-iso8601-date () 84(ert-deftest newsticker--decode-iso8601-date ()
108 "Test `newsticker--decode-iso8601-date'." 85 "Test `newsticker--decode-iso8601-date'."
109 (newsticker--decode-iso8601-date "2004-09-17T05:09:49+00:00") 86 (newsticker-tests--decode-iso8601-date "2004"
110 (newsticker--decode-iso8601-date "2004-09-17T05:09+00:00") 87 "2004-01-01T00:00:00")
111 (newsticker--decode-iso8601-date "2004-09-17T05:09:49") 88 (newsticker-tests--decode-iso8601-date "2004-09"
112 (newsticker--decode-iso8601-date "2004-09-17T05:09") 89 "2004-09-01T00:00:00")
113 (newsticker--decode-iso8601-date "2004-09-17") 90 (newsticker-tests--decode-iso8601-date "2004-09-17"
114 (newsticker--decode-iso8601-date "2004-09") 91 "2004-09-17T00:00:00")
115 (newsticker--do-test--decode-iso8601-date "2004" 92 (newsticker-tests--decode-iso8601-date "2004-09-17T05:09"
116 "2004-01-01T00:00:00") 93 "2004-09-17T05:09:00")
117 (newsticker--do-test--decode-iso8601-date "2004-09" 94 (newsticker-tests--decode-iso8601-date "2004-09-17T05:09:49"
118 "2004-09-01T00:00:00") 95 "2004-09-17T05:09:49")
119 (newsticker--do-test--decode-iso8601-date "2004-09-17" 96 (newsticker-tests--decode-iso8601-date "2004-09-17T05:09:49.123"
120 "2004-09-17T00:00:00") 97 "2004-09-17T05:09:49")
121 (newsticker--do-test--decode-iso8601-date "2004-09-17T05:09" 98 (newsticker-tests--decode-iso8601-date "2004-09-17T05:09+01:00"
122 "2004-09-17T05:09:00") 99 "2004-09-17T04:09:00")
123 (newsticker--do-test--decode-iso8601-date "2004-09-17T05:09:49" 100 (newsticker-tests--decode-iso8601-date "2004-09-17T05:09-02:00"
124 "2004-09-17T05:09:49") 101 "2004-09-17T07:09:00"))
125 (newsticker--do-test--decode-iso8601-date "2004-09-17T05:09:49.123"
126 "2004-09-17T05:09:49")
127 (newsticker--do-test--decode-iso8601-date "2004-09-17T05:09+01:00"
128 "2004-09-17T04:09:00")
129 (newsticker--do-test--decode-iso8601-date "2004-09-17T05:09-02:00"
130 "2004-09-17T07:09:00"))
131 102
132(defun newsticker--do-test--decode-rfc822-date (input expected) 103(defun newsticker--do-test--decode-rfc822-date (input expected)
133 "Actually test `newsticker--decode-rfc822-date'. 104 "Actually test `newsticker--decode-rfc822-date'.
134Signals an error if rfc822-encoded INPUT does not match EXPECTED." 105Apply to INPUT and compare with EXPECTED."
135 (let ((result (format-time-string "%Y-%m-%dT%H:%M:%S" 106 (let ((result (format-time-string "%Y-%m-%dT%H:%M:%S"
136 (newsticker--decode-rfc822-date input) 107 (newsticker--decode-rfc822-date input)
137 t))) 108 t)))
138 (assert (string= result expected) 109 (should (string= result expected))))
139 nil "Error decoding '%s': found '%s' but expected '%s'."
140 input result expected)))
141 110
142(defun newsticker--test--decode-rfc822-date () 111(ert-deftest newsticker--decode-rfc822-date ()
143 "Test `newsticker--decode-rfc822-date'." 112 "Test `newsticker--decode-rfc822-date'."
144 (newsticker--do-test--decode-rfc822-date "Mon, 10 Mar 2008 19:27:52 +0100" 113 (newsticker--do-test--decode-rfc822-date "Mon, 10 Mar 2008 19:27:52 +0100"
145 "2008-03-10T18:27:52") 114 "2008-03-10T18:27:52")
@@ -164,16 +133,16 @@ Signals an error if rfc822-encoded INPUT does not match EXPECTED."
164;; ====================================================================== 133;; ======================================================================
165;; Tests for newsticker-treeview 134;; Tests for newsticker-treeview
166;; ====================================================================== 135;; ======================================================================
167(defun newsticker--test--group-manage-orphan-feeds () 136(ert-deftest newsticker--group-manage-orphan-feeds ()
168 "Test `newsticker--group-manage-orphan-feeds'. 137 "Test `newsticker--group-manage-orphan-feeds'.
169Signals an error if something goes wrong." 138Signals an error if something goes wrong."
170 (let ((newsticker-groups '("Feeds")) 139 (let ((newsticker-groups '("Feeds"))
171 (newsticker-url-list-defaults nil) 140 (newsticker-url-list-defaults nil)
172 (newsticker-url-list '(("feed1") ("feed2") ("feed3")))) 141 (newsticker-url-list '(("feed1") ("feed2") ("feed3"))))
173 (newsticker--group-manage-orphan-feeds) 142 (newsticker--group-manage-orphan-feeds)
174 (assert (equal '("Feeds" "feed3" "feed2" "feed1") 143 (should (equal '("Feeds" "feed3" "feed2" "feed1")
175 newsticker-groups)))) 144 newsticker-groups))))
176 145
177(provide 'newsticker-testsuite) 146(provide 'newsticker-tests)
178 147
179;;; newsticker-testsuite.el ends here 148;;; newsticker-tests.el ends here