branch: externals/debbugs
commit b5a64327ab7d42aecfd0cf83a456e1a9d81625ef
Author: Lars Magne Ingebrigtsen <[email protected]>
Commit: Lars Magne Ingebrigtsen <[email protected]>
(debbugs-toggle-sort): Allow sorting from the final line.
---
ChangeLog | 1 +
debbugs-gnu.el | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 81678d4..d90daad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 <[email protected]>
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 4de2c80..b18efce 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -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)