summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsg <>2003-10-02 03:23:57 +0000
committerpsg <>2003-10-02 03:23:57 +0000
commit8193f8e5a8e0a0ebccb470f854550c79736a400e (patch)
tree79aeabcc97c5363a51aaa800568ce9327de086fb
parent609ca62f14d9e2d25d631343d7628b406134d25d (diff)
Make debian-bug accept P or F without a carriage return.
-rw-r--r--debian-bug.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/debian-bug.el b/debian-bug.el
index e44f54c..3e5c3c0 100644
--- a/debian-bug.el
+++ b/debian-bug.el
@@ -227,6 +227,8 @@
;; V1.47 20Sep2003 Peter S Galbraith <psg@debian.org>
;; - debian-bug-search-file: Use dlocate if available when filename is
;; given. thanks to Jeff Sheinberg (Closes: #211598).
+;; V1.48 01Oct2003 Peter S Galbraith <psg@debian.org>
+;; - Make debian-bug accept P or F without a carriage return.
;; ----------------------------------------------------------------------------
;;; Todo (Peter's list):
@@ -1805,13 +1807,17 @@ Call this function from the mode setup with MINOR-MODE-MAP."
(defun debian-bug ()
"Submit a Debian bug report."
(interactive)
- (let ((type (read-string
- "Report a bug for a [P]ackage or [F]ile: (default P) ")))
+ (let* ((cursor-in-echo-area t)
+ (type (capitalize
+ (and (message
+ "Report a bug for a [P]ackage or [F]ile: (default P) ")
+ (read-char-exclusive)))))
(cond
- ((or (string-equal "" type)
- (string-match "^[pP]" type))
+ ((or (equal 13 type) ; <CR>
+ (equal 32 type) ; <space>
+ (equal ?P type))
(debian-bug-package))
- ((string-match "^[fF]" type)
+ ((equal ?F type)
(debian-bug-filename))
(t
(message "Sorry, try that again")))))