/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.646 by heller, Sat May 16 17:21:12 2009 UTC revision 1.647 by trittweiler, Sun May 17 19:12:53 2009 UTC
# Line 1161  The processing is done in the extent of Line 1161  The processing is done in the extent of
1161         :presentation-start :presentation-end         :presentation-start :presentation-end
1162         :new-package :new-features :ed :%apply :indentation-update         :new-package :new-features :ed :%apply :indentation-update
1163         :eval :eval-no-wait :background-message :inspect :ping         :eval :eval-no-wait :background-message :inspect :ping
1164         :y-or-n-p :read-string :read-aborted)         :y-or-n-p :read-from-minibuffer :read-string :read-aborted)
1165        &rest _)        &rest _)
1166       (declare (ignore _))       (declare (ignore _))
1167       (encode-message event (current-socket-io)))       (encode-message event (current-socket-io)))
# Line 1820  NIL if streams are not globally redirect Line 1820  NIL if streams are not globally redirect
1820          (question (apply #'format nil format-string arguments)))          (question (apply #'format nil format-string arguments)))
1821      (force-output)      (force-output)
1822      (send-to-emacs `(:y-or-n-p ,(current-thread-id) ,tag ,question))      (send-to-emacs `(:y-or-n-p ,(current-thread-id) ,tag ,question))
1823      (caddr (wait-for-event `(:emacs-return ,tag result)))))      (third (wait-for-event `(:emacs-return ,tag result)))))
1824    
1825    (defun read-from-minibuffer-in-emacs (prompt &optional initial-value)
1826      "Ask user a question in Emacs' minibuffer. Returns \"\" when user
1827    entered nothing, returns NIL when user pressed C-g."
1828      (check-type prompt string) (check-type initial-value (or null string))
1829      (let ((tag (make-tag)))
1830        (force-output)
1831        (send-to-emacs `(:read-from-minibuffer ,(current-thread-id) ,tag
1832                                               ,prompt ,initial-value))
1833        (third (wait-for-event `(:emacs-return ,tag result)))))
1834    
1835    
1836  (defun process-form-for-emacs (form)  (defun process-form-for-emacs (form)
1837    "Returns a string which emacs will read as equivalent to    "Returns a string which emacs will read as equivalent to
# Line 1858  converted to lower case." Line 1869  converted to lower case."
1869                 ((:ok value) value)                 ((:ok value) value)
1870                 ((:abort) (abort))))))))                 ((:abort) (abort))))))))
1871    
 ;;; FIXME: This should not use EVAL-IN-EMACS but get its own events.  
 (defun read-from-minibuffer-in-emacs (prompt &optional initial-value)  
   (eval-in-emacs  
    `(condition-case c  
         (slime-read-from-minibuffer ,prompt ,initial-value)  
       (quit nil))))  
   
1872  (defvar *swank-wire-protocol-version* nil  (defvar *swank-wire-protocol-version* nil
1873    "The version of the swank/slime communication protocol.")    "The version of the swank/slime communication protocol.")
1874    

Legend:
Removed from v.1.646  
changed lines
  Added in v.1.647

  ViewVC Help
Powered by ViewVC 1.1.5