emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch to emacsbug.el proposed..


From: D . Goel
Subject: patch to emacsbug.el proposed..
Date: 31 Aug 2002 15:57:32 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

if i want to insert system-info in a message or article, i always have
to M-x report-emacs-bug and then kill and yank from there...  imho, it
would be nice if the system-info part of M-x report-emacs-bug could be
separated into a nice function called, say insert-system-info..

The patch below does that.  Have tested it, works fine, and does not
affect the functionality of M-x report-emacs-bug at all. 

The new function is currently called
report-emacs-bug-insert-system-info, for the sake of namespace, but i
would really prefer that it be called insert-system-info.  The latter
does not pollute anything, afaiu.



====================================================


cd ~/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/
diff -u 
/home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug-original.el
 /home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug.el
--- 
/home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug-original.el
     2002-08-31 15:37:42.000000000 -0400
+++ 
/home/deego/pub/pub/spcusr/usr/local/share/emacs/21.3.50/lisp/mail/emacsbug.el  
    2002-08-31 15:50:45.000000000 -0400
@@ -69,6 +69,44 @@
   :group 'emacsbug
   :type 'boolean)
 
+
+;;;###autoload
+(defun report-emacs-bug-insert-system-info (&optional recent-keys)
+  (interactive)
+  (insert "\n\n\n")
+  
+  (insert "In " (emacs-version) "\n")
+  (if (and system-configuration-options
+          (not (equal system-configuration-options "")))
+      (insert "configured using `configure "
+             system-configuration-options "'\n\n"))
+  (insert "Important settings:\n")
+  (mapcar
+   '(lambda (var)
+      (insert (format "  value of $%s: %s\n" var (getenv var))))
+   '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
+     "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG"))
+  (insert (format "  locale-coding-system: %s\n" locale-coding-system))
+  (insert (format "  default-enable-multibyte-characters: %s\n"
+                 default-enable-multibyte-characters))
+  (insert "\n")
+  (insert "Recent input:\n")
+  (let ((before-keys (point)))
+    (insert (mapconcat (lambda (key)
+                        (if (or (integerp key)
+                                (symbolp key)
+                                (listp key))
+                            (single-key-description key)
+                          (prin1-to-string key nil)))
+                      (or recent-keys (recent-keys))
+                      " "))
+    (save-restriction
+      (narrow-to-region before-keys (point))
+      (goto-char before-keys)
+      (while (progn (move-to-column 50) (not (eobp)))
+       (search-forward " " nil t)
+       (insert "\n")))))
+  
 ;;;###autoload
 (defun report-emacs-bug (topic &optional recent-keys)
   "Report a bug in GNU Emacs.
@@ -124,39 +162,9 @@
 
     (insert "\n\n")
     (setq user-point (point))
-    (insert "\n\n\n")
+    
+    (report-emacs-bug-insert-system-info recent-keys)
 
-    (insert "In " (emacs-version) "\n")
-    (if (and system-configuration-options
-            (not (equal system-configuration-options "")))
-       (insert "configured using `configure "
-               system-configuration-options "'\n\n"))
-    (insert "Important settings:\n")
-    (mapcar
-     '(lambda (var)
-       (insert (format "  value of $%s: %s\n" var (getenv var))))
-     '("LC_ALL" "LC_COLLATE" "LC_CTYPE" "LC_MESSAGES"
-       "LC_MONETARY" "LC_NUMERIC" "LC_TIME" "LANG"))
-    (insert (format "  locale-coding-system: %s\n" locale-coding-system))
-    (insert (format "  default-enable-multibyte-characters: %s\n"
-                   default-enable-multibyte-characters))
-    (insert "\n")
-    (insert "Recent input:\n")
-    (let ((before-keys (point)))
-      (insert (mapconcat (lambda (key)
-                          (if (or (integerp key)
-                                  (symbolp key)
-                                  (listp key))
-                              (single-key-description key)
-                            (prin1-to-string key nil)))
-                        (or recent-keys (recent-keys))
-                        " "))
-      (save-restriction
-       (narrow-to-region before-keys (point))
-       (goto-char before-keys)
-       (while (progn (move-to-column 50) (not (eobp)))
-         (search-forward " " nil t)
-         (insert "\n"))))
     (let ((message-buf (get-buffer "*Messages*")))
       (if message-buf
          (let (beg-pos

Diff finished at Sat Aug 31 15:50:57




reply via email to

[Prev in Thread] Current Thread [Next in Thread]