]> code.delx.au - gnu-emacs-elpa/commitdiff
(debbugs-toggle-sort): Allow sorting from the final line.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 2 Jul 2011 23:38:26 +0000 (01:38 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 2 Jul 2011 23:38:26 +0000 (01:38 +0200)
packages/debbugs/ChangeLog
packages/debbugs/debbugs-gnu.el

index 81678d416ce2fa84ee44245842b3e9ddf31df44c..d90daad59e361d4aa5f5d52f89f5e1bf413a2a20 100644 (file)
@@ -15,6 +15,7 @@
        entry, so that we don't have to rely on subject header mangling,
        which is fragile.
        (debbugs-emacs): Display multiple merges prettier.
+       (debbugs-toggle-sort): Allow sorting from the final line.
 
 2011-07-02  Michael Albinus  <michael.albinus@gmx.de>
 
index 4de2c803eb0366dee60533b8678eb65bf2cae5df..b18efce48308b10bb543f4d19914e98fde583675 100644 (file)
@@ -244,7 +244,8 @@ The following commands are available:
   (interactive)
   (beginning-of-line)
   (let ((buffer-read-only nil)
-       (current-bug (buffer-substring (point) (+ (point) 5))))
+       (current-bug (and (not (eobp))
+                         (buffer-substring (point) (+ (point) 5)))))
     (goto-char (point-min))
     (setq debbugs-sort-state
          (if (eq debbugs-sort-state 'number)
@@ -258,8 +259,10 @@ The following commands are available:
         (or (cdr (assq (get-text-property (+ (point) 7) 'face)
                        debbugs-state-preference))
             10))))
-    (goto-char (point-min))
-    (re-search-forward (concat "^" current-bug) nil t)))
+    (if (not current-bug)
+       (goto-char (point-max))
+      (goto-char (point-min))
+      (re-search-forward (concat "^" current-bug) nil t))))
 
 (defvar debbugs-bug-number nil)