diff options
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/mail/emacsbug.el | 30 |
2 files changed, 13 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b78aad8baff..d6d7b18955e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2012-12-11 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * mail/emacsbug.el (report-emacs-bug): Move the intangible text to | ||
| 4 | a display text-property. | ||
| 5 | (report-emacs-bug-hook): Don't bother deleting it any more. | ||
| 6 | |||
| 3 | * hilit-chg.el (highlight-save-buffer-state): Delete. | 7 | * hilit-chg.el (highlight-save-buffer-state): Delete. |
| 4 | Use with-silent-modifications instead. | 8 | Use with-silent-modifications instead. |
| 5 | (hilit-chg-set-face-on-change): Only fixup the text that's modified. | 9 | (hilit-chg-set-face-on-change): Only fixup the text that's modified. |
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 1d9d098e71c..68a47d91023 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el | |||
| @@ -156,11 +156,6 @@ Prompts for bug subject. Leaves you in a mail buffer." | |||
| 156 | (when (string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) | 156 | (when (string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) |
| 157 | (setq topic (concat (match-string 1 emacs-version) "; " topic)))) | 157 | (setq topic (concat (match-string 1 emacs-version) "; " topic)))) |
| 158 | (let ((from-buffer (current-buffer)) | 158 | (let ((from-buffer (current-buffer)) |
| 159 | ;; Put these properties on semantically-void text. | ||
| 160 | ;; report-emacs-bug-hook deletes these regions before sending. | ||
| 161 | (prompt-properties '(field emacsbug-prompt | ||
| 162 | intangible but-helpful | ||
| 163 | rear-nonsticky t)) | ||
| 164 | (can-insert-mail (or (report-emacs-bug-can-use-xdg-email) | 159 | (can-insert-mail (or (report-emacs-bug-can-use-xdg-email) |
| 165 | (report-emacs-bug-can-use-osx-open))) | 160 | (report-emacs-bug-can-use-osx-open))) |
| 166 | user-point message-end-point) | 161 | user-point message-end-point) |
| @@ -190,7 +185,7 @@ Prompts for bug subject. Leaves you in a mail buffer." | |||
| 190 | (insert (format "The report will be sent to %s.\n\n" | 185 | (insert (format "The report will be sent to %s.\n\n" |
| 191 | report-emacs-bug-address)) | 186 | report-emacs-bug-address)) |
| 192 | (insert "This bug report will be sent to the ") | 187 | (insert "This bug report will be sent to the ") |
| 193 | (insert-button | 188 | (insert-text-button |
| 194 | "Bug-GNU-Emacs" | 189 | "Bug-GNU-Emacs" |
| 195 | 'face 'link | 190 | 'face 'link |
| 196 | 'help-echo (concat "mouse-2, RET: Follow this link") | 191 | 'help-echo (concat "mouse-2, RET: Follow this link") |
| @@ -198,7 +193,7 @@ Prompts for bug subject. Leaves you in a mail buffer." | |||
| 198 | (browse-url "http://lists.gnu.org/archive/html/bug-gnu-emacs/")) | 193 | (browse-url "http://lists.gnu.org/archive/html/bug-gnu-emacs/")) |
| 199 | 'follow-link t) | 194 | 'follow-link t) |
| 200 | (insert " mailing list\nand the GNU bug tracker at ") | 195 | (insert " mailing list\nand the GNU bug tracker at ") |
| 201 | (insert-button | 196 | (insert-text-button |
| 202 | "debbugs.gnu.org" | 197 | "debbugs.gnu.org" |
| 203 | 'face 'link | 198 | 'face 'link |
| 204 | 'help-echo (concat "mouse-2, RET: Follow this link") | 199 | 'help-echo (concat "mouse-2, RET: Follow this link") |
| @@ -216,11 +211,10 @@ usually do not have translators for other languages.\n\n"))) | |||
| 216 | (insert "Please describe exactly what actions triggered the bug, and\n" | 211 | (insert "Please describe exactly what actions triggered the bug, and\n" |
| 217 | "the precise symptoms of the bug. If you can, give a recipe\n" | 212 | "the precise symptoms of the bug. If you can, give a recipe\n" |
| 218 | "starting from `emacs -Q':\n\n") | 213 | "starting from `emacs -Q':\n\n") |
| 219 | (add-text-properties (save-excursion | 214 | (let ((txt (delete-and-extract-region |
| 220 | (rfc822-goto-eoh) | 215 | (save-excursion (rfc822-goto-eoh) (line-beginning-position 2)) |
| 221 | (line-beginning-position 2)) | 216 | (point)))) |
| 222 | (point) | 217 | (insert (propertize "\n" 'display txt))) |
| 223 | prompt-properties) | ||
| 224 | (setq user-point (point)) | 218 | (setq user-point (point)) |
| 225 | (insert "\n\n") | 219 | (insert "\n\n") |
| 226 | 220 | ||
| @@ -232,7 +226,8 @@ usually do not have translators for other languages.\n\n"))) | |||
| 232 | (if (file-readable-p debug-file) | 226 | (if (file-readable-p debug-file) |
| 233 | (insert "For information about debugging Emacs, please read the file\n" | 227 | (insert "For information about debugging Emacs, please read the file\n" |
| 234 | debug-file ".\n"))) | 228 | debug-file ".\n"))) |
| 235 | (add-text-properties (1+ user-point) (point) prompt-properties) | 229 | (let ((txt (delete-and-extract-region (1+ user-point) (point)))) |
| 230 | (insert (propertize "\n" 'display txt))) | ||
| 236 | 231 | ||
| 237 | (insert "\n\nIn " (emacs-version) "\n") | 232 | (insert "\n\nIn " (emacs-version) "\n") |
| 238 | (if (stringp emacs-bzr-version) | 233 | (if (stringp emacs-bzr-version) |
| @@ -430,14 +425,7 @@ and send the mail again%s." | |||
| 430 | from)) | 425 | from)) |
| 431 | (not (yes-or-no-p | 426 | (not (yes-or-no-p |
| 432 | (format "Is `%s' really your email address? " from))) | 427 | (format "Is `%s' really your email address? " from))) |
| 433 | (error "Please edit the From address and try again")))) | 428 | (error "Please edit the From address and try again")))))) |
| 434 | ;; Delete the uninteresting text that was just to help fill out the report. | ||
| 435 | (rfc822-goto-eoh) | ||
| 436 | (forward-line 1) | ||
| 437 | (let ((pos (1- (point)))) | ||
| 438 | (while (setq pos (text-property-any pos (point-max) | ||
| 439 | 'field 'emacsbug-prompt)) | ||
| 440 | (delete-region pos (field-end (1+ pos))))))) | ||
| 441 | 429 | ||
| 442 | 430 | ||
| 443 | (provide 'emacsbug) | 431 | (provide 'emacsbug) |