[MLton-commit] r6590

Vesa Karvonen vesak at mlton.org
Mon Apr 14 09:02:58 PDT 2008


Insert message (type) to kill-ring with a prefix argument.
----------------------------------------------------------------------

U   mlton/trunk/ide/emacs/def-use-mode.el

----------------------------------------------------------------------

Modified: mlton/trunk/ide/emacs/def-use-mode.el
===================================================================
--- mlton/trunk/ide/emacs/def-use-mode.el	2008-04-10 12:30:41 UTC (rev 6589)
+++ mlton/trunk/ide/emacs/def-use-mode.el	2008-04-14 16:02:56 UTC (rev 6590)
@@ -306,13 +306,16 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Info
 
-(defun def-use-show-msg ()
-  "Shows the message for the symbol under the cursor."
-  (interactive)
+(defun def-use-show-msg (&optional copy-to-kill-ring)
+  "Shows the message for the symbol under the cursor.  With a prefix
+argument the message is also inserted to the `kill-ring'."
+  (interactive "P")
   (let ((sym (def-use-current-sym)))
     (when sym
       (message "%s" (or (def-use-sym-msg sym)
-                        "Sorry, no message attached to the symbol.")))))
+                        "Sorry, no message attached to the symbol."))
+      (when (and (def-use-sym-msg sym))
+        (kill-new (def-use-sym-msg sym))))))
 
 (defun def-use-show-info ()
   "Shows info on the symbol under the cursor."




More information about the MLton-commit mailing list