]> git.eshelyaron.com Git - emacs.git/commitdiff
(Info-dir-remove-duplicates): Move point to the
authorJuri Linkov <juri@jurta.org>
Sat, 11 Mar 2006 22:35:51 +0000 (22:35 +0000)
committerJuri Linkov <juri@jurta.org>
Sat, 11 Mar 2006 22:35:51 +0000 (22:35 +0000)
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'.

lisp/ChangeLog
lisp/info.el

index 146398f2de389472709284589ef68fb461a47747..50aa28d3b4a36b5a80dc10643c8a9395cb3e33c3 100644 (file)
@@ -1,3 +1,13 @@
+2006-03-12  Juri Linkov  <juri@jurta.org>
+
+       * battery.el (battery-linux-proc-acpi): Check `capacity' for non-nil
+       before comparing with `low' and `warn'.
+
+       * info.el (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'.
+
 2006-03-11  Luc Teirlinck  <teirllm@auburn.edu>
 
        * simple.el (yank): Fix typo in docstring.
index 43ee5cabcbc73d1fc87819da92791d7d53041931..a4cae9499771a72d16abcee22bfe0d29cc32d6f4 100644 (file)
@@ -1196,7 +1196,9 @@ a case-insensitive match is tried."
                  (point)
                  (if (re-search-forward "^[^* \n\t]" nil t)
                      (match-beginning 0)
-                   (or limit (point-max)))) entries))))
+                   (or limit (point-max))))
+                entries)
+               (forward-line 0))))
          ;; Insert the entries just found.
          (while (= (line-beginning-position 0) (1- (point)))
            (backward-char))
@@ -1207,10 +1209,11 @@ a case-insensitive match is tried."
 
          ;; Now remove duplicate entries under the same heading.
          (let ((seen nil)
-               (limit (point)))
+               (limit (point-marker)))
            (goto-char start)
-           (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
-                                     limit 'move)
+           (while (and (> limit (point))
+                       (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)"
+                                          limit 'move))
              ;; Fold case straight away; `member-ignore-case' here wasteful.
              (let ((x (downcase (match-string 1))))
                (if (member x seen)