*** info.el.~1.541.~ 2008-08-31 09:48:43.390625000 +0200 --- info.el 2008-09-03 08:33:07.734375000 +0200 *************** *** 1213,1231 **** (delete-region (1- (point)) (point)))) ;; Now remove duplicate entries under the same heading. ! (let ((seen nil) ! (limit (point-marker))) ! (goto-char start) ! (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) ! (delete-region (match-beginning 0) ! (progn (re-search-forward "^[^ \t]" nil t) ! (match-beginning 0))) ! (push x seen)))))))))) ;; Note that on entry to this function the current-buffer must be the ;; *info* buffer; not the info tags buffer. --- 1213,1232 ---- (delete-region (1- (point)) (point)))) ;; Now remove duplicate entries under the same heading. ! (let (seen) ! (save-restriction ! (narrow-to-region start (point)) ! (goto-char (point-min)) ! (while (re-search-forward "^* \\([^:\n]+:\\(:\\|[^.\n]+\\).\\)" nil 'move) ! ;; Fold case straight away; `member-ignore-case' here wasteful. ! (let ((x (downcase (match-string 1)))) ! (if (member x seen) ! (delete-region ! (match-beginning 0) ! (if (re-search-forward "^[^ \t]" nil 'move) ! (goto-char (match-beginning 0)) ! (point-max))) ! (push x seen))))))))))) ;; Note that on entry to this function the current-buffer must be the ;; *info* buffer; not the info tags buffer.