aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2006-03-11 22:35:51 +0000
committerJuri Linkov2006-03-11 22:35:51 +0000
commit2d19a2a4368d4d0d55f6bcb4e0680a555c3adf14 (patch)
treeb3505d6b1f65345504aa3588464be78c1040c553
parentc93b1b4b30b107b1b54c663e5de092a1641e93b9 (diff)
downloademacs-2d19a2a4368d4d0d55f6bcb4e0680a555c3adf14.tar.gz
emacs-2d19a2a4368d4d0d55f6bcb4e0680a555c3adf14.zip
(Info-dir-remove-duplicates): Move point to the
beginning of the current line after deleting the entries from redundant heading. Use marker for `limit' and compare it with point before calling `re-search-forward'.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/info.el11
2 files changed, 17 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 146398f2de3..50aa28d3b4a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
12006-03-12 Juri Linkov <juri@jurta.org>
2
3 * battery.el (battery-linux-proc-acpi): Check `capacity' for non-nil
4 before comparing with `low' and `warn'.
5
6 * info.el (Info-dir-remove-duplicates): Move point to the
7 beginning of the current line after deleting the entries from
8 redundant heading. Use marker for `limit' and compare it with
9 point before calling `re-search-forward'.
10
12006-03-11 Luc Teirlinck <teirllm@auburn.edu> 112006-03-11 Luc Teirlinck <teirllm@auburn.edu>
2 12
3 * simple.el (yank): Fix typo in docstring. 13 * simple.el (yank): Fix typo in docstring.
diff --git a/lisp/info.el b/lisp/info.el
index 43ee5cabcbc..a4cae949977 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1196,7 +1196,9 @@ a case-insensitive match is tried."
1196 (point) 1196 (point)
1197 (if (re-search-forward "^[^* \n\t]" nil t) 1197 (if (re-search-forward "^[^* \n\t]" nil t)
1198 (match-beginning 0) 1198 (match-beginning 0)
1199 (or limit (point-max)))) entries)))) 1199 (or limit (point-max))))
1200 entries)
1201 (forward-line 0))))
1200 ;; Insert the entries just found. 1202 ;; Insert the entries just found.
1201 (while (= (line-beginning-position 0) (1- (point))) 1203 (while (= (line-beginning-position 0) (1- (point)))
1202 (backward-char)) 1204 (backward-char))
@@ -1207,10 +1209,11 @@ a case-insensitive match is tried."
1207 1209
1208 ;; Now remove duplicate entries under the same heading. 1210 ;; Now remove duplicate entries under the same heading.
1209 (let ((seen nil) 1211 (let ((seen nil)
1210 (limit (point))) 1212 (limit (point-marker)))
1211 (goto-char start) 1213 (goto-char start)
1212 (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)" 1214 (while (and (> limit (point))
1213 limit 'move) 1215 (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
1216 limit 'move))
1214 ;; Fold case straight away; `member-ignore-case' here wasteful. 1217 ;; Fold case straight away; `member-ignore-case' here wasteful.
1215 (let ((x (downcase (match-string 1)))) 1218 (let ((x (downcase (match-string 1))))
1216 (if (member x seen) 1219 (if (member x seen)