aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2012-02-08 22:29:41 -0500
committerGlenn Morris <[email protected]>2012-02-08 22:29:41 -0500
commit3f88cd72e9cf0ef3ccde2c0508ec4d9f468d0bca (patch)
tree3f658e885a22a0e82af892b63e999c13dbbbdd39 /lisp
parentd95b247d1d8fbfae4c739f6a1f47069b7807964c (diff)
Doc fixes for emacsbug.el
* lisp/mail/emacsbug.el (report-emacs-bug-can-use-osx-open) (report-emacs-bug-can-use-xdg-email): (report-emacs-bug-insert-to-mailer): Doc fixes. (report-emacs-bug): Message fix. * etc/NEWS: Related edit. * lisp/net/browse-url.el: Comment.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/emacsbug.el16
-rw-r--r--lisp/net/browse-url.el1
3 files changed, 19 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 891b164a55..9ee16e1016 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2012-02-09 Glenn Morris <[email protected]>
+ * mail/emacsbug.el (report-emacs-bug-can-use-osx-open)
+ (report-emacs-bug-can-use-xdg-email):
+ (report-emacs-bug-insert-to-mailer): Doc fixes.
+ (report-emacs-bug): Message fix.
+
* net/browse-url.el (browse-url-can-use-xdg-open)
(browse-url-xdg-open): Doc fixes.
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 29ce1881f5..20b436172b 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -78,13 +78,16 @@ Used for querying duplicates and linking to existing bugs.")
(defvar message-strip-special-text-properties)
(defun report-emacs-bug-can-use-osx-open ()
- "Check if OSX open can be used to insert bug report into mailer"
+ "Return non-nil if the OS X \"open\" command is available for mailing."
(and (featurep 'ns)
(equal (executable-find "open") "/usr/bin/open")
(memq system-type '(darwin))))
+;; FIXME this duplicates much of the logic from browse-url-can-use-xdg-open.
(defun report-emacs-bug-can-use-xdg-email ()
- "Check if xdg-email can be used, i.e. we are on Gnome, KDE or xfce4."
+ "Return non-nil if the \"xdg-email\" command can be used.
+xdg-email is a desktop utility that calls your preferred mail client.
+This requires you to be running either Gnome, KDE, or Xfce4."
(and (getenv "DISPLAY")
(executable-find "xdg-email")
(or (getenv "GNOME_DESKTOP_SESSION_ID")
@@ -98,16 +101,23 @@ Used for querying duplicates and linking to existing bugs.")
"org.gnome.SessionManager.CanShutdown"))
(error nil))
(equal (getenv "KDE_FULL_SESSION") "true")
+ ;; FIXME? browse-url-can-use-xdg-open also accepts LXDE.
+ ;; Is that no good here, or just overlooked?
(condition-case nil
(eq 0 (call-process
"/bin/sh" nil nil nil
"-c"
+ ;; FIXME use string-match rather than grep.
"xprop -root _DT_SAVE_MODE|grep xfce4"))
(error nil)))))
(defun report-emacs-bug-insert-to-mailer ()
+ "Send the message to your preferred mail client.
+This requires either the OS X \"open\" command, or the freedesktop
+\"xdg-email\" command to be available."
(interactive)
(save-excursion
+ ;; FIXME? use mail-fetch-field?
(let* ((to (progn
(goto-char (point-min))
(forward-line)
@@ -319,7 +329,7 @@ usually do not have translators for other languages.\n\n")))
" Type \\[kill-buffer] RET to cancel (don't send it).\n"))
(if can-insert-mail
(princ (substitute-command-keys
- " Type \\[report-emacs-bug-insert-to-mailer] to insert text to you preferred mail program.\n")))
+ " Type \\[report-emacs-bug-insert-to-mailer] to copy text to your preferred mail program.\n")))
(terpri)
(princ (substitute-command-keys
" Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 99f3c53f02..50423208e3 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -969,6 +969,7 @@ This requires you to be running either Gnome, KDE, Xfce4 or LXDE."
(eq 0 (call-process
"/bin/sh" nil nil nil
"-c"
+ ;; FIXME use string-match rather than grep.
"xprop -root _DT_SAVE_MODE|grep xfce4"))
(error nil))
(member (getenv "DESKTOP_SESSION") '("LXDE" "Lubuntu"))