diff options
| -rw-r--r-- | lisp/gnus/gnus-bookmark.el | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 66ee7c6daac..a16ac531ba0 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el | |||
| @@ -174,17 +174,6 @@ where each BMK is of the form | |||
| 174 | 174 | ||
| 175 | So the cdr of each bookmark is an alist too.") | 175 | So the cdr of each bookmark is an alist too.") |
| 176 | 176 | ||
| 177 | (defmacro gnus-bookmark-mouse-available-p () | ||
| 178 | "Return non-nil if a mouse is available." | ||
| 179 | (if (featurep 'xemacs) | ||
| 180 | '(device-on-window-system-p) | ||
| 181 | '(display-mouse-p))) | ||
| 182 | |||
| 183 | (defun gnus-bookmark-remove-properties (string) | ||
| 184 | "Remove all text properties from STRING." | ||
| 185 | (set-text-properties 0 (length string) nil string) | ||
| 186 | string) | ||
| 187 | |||
| 188 | ;;;###autoload | 177 | ;;;###autoload |
| 189 | (defun gnus-bookmark-set () | 178 | (defun gnus-bookmark-set () |
| 190 | "Set a bookmark for this article." | 179 | "Set a bookmark for this article." |
| @@ -209,7 +198,7 @@ So the cdr of each bookmark is an alist too.") | |||
| 209 | ;; Set the bookmark list | 198 | ;; Set the bookmark list |
| 210 | (setq gnus-bookmark-alist | 199 | (setq gnus-bookmark-alist |
| 211 | (cons | 200 | (cons |
| 212 | (list (gnus-bookmark-remove-properties bmk-name) | 201 | (list (substring-no-properties bmk-name) |
| 213 | (gnus-bookmark-make-record | 202 | (gnus-bookmark-make-record |
| 214 | group message-id author date subject annotation)) | 203 | group message-id author date subject annotation)) |
| 215 | gnus-bookmark-alist)))) | 204 | gnus-bookmark-alist)))) |
| @@ -220,12 +209,12 @@ So the cdr of each bookmark is an alist too.") | |||
| 220 | (group message-id author date subject annotation) | 209 | (group message-id author date subject annotation) |
| 221 | "Return the record part of a new bookmark, given GROUP MESSAGE-ID AUTHOR DATE SUBJECT and ANNOTATION." | 210 | "Return the record part of a new bookmark, given GROUP MESSAGE-ID AUTHOR DATE SUBJECT and ANNOTATION." |
| 222 | (let ((the-record | 211 | (let ((the-record |
| 223 | `((group . ,(gnus-bookmark-remove-properties group)) | 212 | `((group . ,(substring-no-properties group)) |
| 224 | (message-id . ,(gnus-bookmark-remove-properties message-id)) | 213 | (message-id . ,(substring-no-properties message-id)) |
| 225 | (author . ,(gnus-bookmark-remove-properties author)) | 214 | (author . ,(substring-no-properties author)) |
| 226 | (date . ,(gnus-bookmark-remove-properties date)) | 215 | (date . ,(substring-no-properties date)) |
| 227 | (subject . ,(gnus-bookmark-remove-properties subject)) | 216 | (subject . ,(substring-no-properties subject)) |
| 228 | (annotation . ,(gnus-bookmark-remove-properties annotation))))) | 217 | (annotation . ,(substring-no-properties annotation))))) |
| 229 | the-record)) | 218 | the-record)) |
| 230 | 219 | ||
| 231 | (defun gnus-bookmark-set-bookmark-name (group author subject) | 220 | (defun gnus-bookmark-set-bookmark-name (group author subject) |
| @@ -387,7 +376,7 @@ deletion, or > if it is flagged for displaying." | |||
| 387 | (insert (if (member (gnus-bookmark-get-annotation name) (list nil "")) | 376 | (insert (if (member (gnus-bookmark-get-annotation name) (list nil "")) |
| 388 | " " | 377 | " " |
| 389 | " *")) | 378 | " *")) |
| 390 | (if (gnus-bookmark-mouse-available-p) | 379 | (if (display-mouse-p) |
| 391 | (add-text-properties | 380 | (add-text-properties |
| 392 | (prog1 | 381 | (prog1 |
| 393 | (point) | 382 | (point) |
| @@ -536,7 +525,7 @@ Optional argument SHOW means show them unconditionally." | |||
| 536 | (let ((start (point-at-eol))) | 525 | (let ((start (point-at-eol))) |
| 537 | (move-to-column gnus-bookmark-bmenu-file-column t) | 526 | (move-to-column gnus-bookmark-bmenu-file-column t) |
| 538 | ;; Strip off `mouse-face' from the white spaces region. | 527 | ;; Strip off `mouse-face' from the white spaces region. |
| 539 | (if (gnus-bookmark-mouse-available-p) | 528 | (if (display-mouse-p) |
| 540 | (remove-text-properties start (point) | 529 | (remove-text-properties start (point) |
| 541 | '(mouse-face nil help-echo nil)))) | 530 | '(mouse-face nil help-echo nil)))) |
| 542 | (delete-region (point) (progn (end-of-line) (point))) | 531 | (delete-region (point) (progn (end-of-line) (point))) |
| @@ -552,7 +541,7 @@ Optional argument SHOW means show them unconditionally." | |||
| 552 | (insert (gnus-bookmark-get-details | 541 | (insert (gnus-bookmark-get-details |
| 553 | bmk-name | 542 | bmk-name |
| 554 | gnus-bookmark-bookmark-inline-details)) | 543 | gnus-bookmark-bookmark-inline-details)) |
| 555 | (if (gnus-bookmark-mouse-available-p) | 544 | (if (display-mouse-p) |
| 556 | (add-text-properties | 545 | (add-text-properties |
| 557 | start | 546 | start |
| 558 | (save-excursion (re-search-backward | 547 | (save-excursion (re-search-backward |
| @@ -601,7 +590,7 @@ Does not affect the kill ring." | |||
| 601 | (gnus-bookmark-kill-line) | 590 | (gnus-bookmark-kill-line) |
| 602 | (let ((start (point))) | 591 | (let ((start (point))) |
| 603 | (insert (car gnus-bookmark-bmenu-hidden-bookmarks)) | 592 | (insert (car gnus-bookmark-bmenu-hidden-bookmarks)) |
| 604 | (if (gnus-bookmark-mouse-available-p) | 593 | (if (display-mouse-p) |
| 605 | (add-text-properties | 594 | (add-text-properties |
| 606 | start | 595 | start |
| 607 | (save-excursion (re-search-backward | 596 | (save-excursion (re-search-backward |