bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3000: 23.0.60; outline.el/(hide-sublevels): Invalid search bound (wr


From: William Xu
Subject: bug#3000: 23.0.60; outline.el/(hide-sublevels): Invalid search bound (wrong side of point)
Date: Wed, 15 Apr 2009 12:35:01 +0800

Steps to reproduce:

1. emacs -Q
2. open any text buffers, like this mail buffer (without any outline markers, outline-regexp)
3. M-: (hide-sublevels 1)

Debugger entered--Lisp error: (error "Invalid search bound (wrong side of point)")
  re-search-forward("^\\(?:[*\f]+\\)" #<marker at 886 in *mail to emacs-pretest-bug@gnu.org*> t)
  outline-map-region((lambda nil (if (<= ... levels) (outline-show-heading))) 887 886)
  (let* (outline-view-change-hook (beg ...) (end ...)) (outline-flag-region beg end t) (outline-map-region (lambda nil ...) beg end))
  (save-excursion (let* (outline-view-change-hook ... ...) (outline-flag-region beg end t) (outline-map-region ... beg end)))
  hide-sublevels(1)
  eval((hide-sublevels 1))
  eval-_expression_((hide-sublevels 1) nil)
  call-interactively(eval-_expression_ nil nil)

The following patch seems fixing it:

--- outline.el.orig    2008-12-14 10:47:40.000000000 +0800
+++ outline.el    2009-04-15 12:28:37.642828900 +0800
@@ -905,6 +905,8 @@
                   (goto-char (point-max))
                   ;; Keep empty last line, if available.
                   (if (bolp) (1- (point)) (point)))))
+      (if (< end beg)
+          (setq beg (prog1 end (setq end beg))))
       ;; First hide everything.
       (outline-flag-region beg end t)
       ;; Then unhide the top level headers.


In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-12-14 on BREPNB
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

--
William

http://xwl.appspot.com


reply via email to

[Prev in Thread] Current Thread [Next in Thread]