Changeset 2735

Show
Ignore:
Timestamp:
03/14/08 16:37:10 (10 months ago)
Author:
hans
Message:

update slime yet again

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/thirdparty/slime/CVS/Entries

    r2731 r2735  
    2828/swank-source-path-parser.lisp/1.18/Tue Mar 11 05:01:33 2008// 
    2929/swank.asd/1.8/Wed Mar 12 07:05:29 2008// 
    30 /swank.lisp/1.538/Result of merge// 
    3130/test-all.sh/1.2/Tue Mar 11 05:01:33 2008// 
    3231/test.sh/1.10/Wed Mar 12 07:05:31 2008// 
    3332/xref.lisp/1.2/Tue Mar 11 05:01:33 2008// 
    34 /ChangeLog/1.1318/Thu Mar 13 19:55:28 2008// 
    35 /slime.el/1.922/Thu Mar 13 19:55:28 2008// 
     33/slime.el/1.923/Fri Mar 14 05:12:48 2008// 
     34/ChangeLog/1.1320/Fri Mar 14 15:35:49 2008// 
     35/swank.lisp/1.539/Result of merge// 
  • trunk/thirdparty/slime/ChangeLog

    r2731 r2735  
     12008-03-14  Tobias C. Rittweiler  <tcr@freebits.de> 
     2 
     3        * swank.lisp (classify-symbol, symbol-classification->string): Add 
     4        classification of symbols denoting type specifier, and denoting 
     5        constants. 
     6         
     72008-03-13  Tobias C. Rittweiler  <tcr@freebits.de> 
     8 
     9        * slime.el (slime-eval-macroexpand): Indent expansion. 
     10         
    1112008-03-13  Tobias C. Rittweiler  <tcr@freebits.de> 
    212 
  • trunk/thirdparty/slime/contrib/CVS/Entries

    r2721 r2735  
    1 /ChangeLog/1.97/Wed Mar 12 07:05:36 2008// 
    21/README/1.3/Tue Mar 11 05:01:33 2008// 
    32/bridge.el/1.1/Tue Mar 11 05:01:33 2008// 
     
    109/slime-fancy-inspector.el/1.3/Tue Mar 11 05:01:33 2008// 
    1110/slime-fancy.el/1.5/Tue Mar 11 05:01:33 2008// 
    12 /slime-fuzzy.el/1.6/Tue Mar 11 05:01:33 2008// 
    1311/slime-highlight-edits.el/1.3/Tue Mar 11 05:01:33 2008// 
    1412/slime-indentation.el/1.1/Tue Mar 11 05:01:33 2008// 
     
    2624/swank-asdf.lisp/1.1/Tue Mar 11 05:01:33 2008// 
    2725/swank-c-p-c.lisp/1.2/Tue Mar 11 05:01:33 2008// 
    28 /swank-fancy-inspector.lisp/1.12/Wed Mar 12 07:05:37 2008// 
    29 /swank-fuzzy.lisp/1.7/Tue Mar 11 05:01:33 2008// 
    3026/swank-goo.goo/1.1/Tue Mar 11 05:01:33 2008// 
    3127/swank-indentation.lisp/1.1/Tue Mar 11 05:01:33 2008// 
     
    3632/swank-presentation-streams.lisp/1.5/Tue Mar 11 05:01:33 2008// 
    3733/swank-presentations.lisp/1.5/Tue Mar 11 05:01:33 2008// 
     34/ChangeLog/1.100/Fri Mar 14 15:35:51 2008// 
     35/slime-fuzzy.el/1.7/Fri Mar 14 15:35:51 2008// 
     36/swank-fancy-inspector.lisp/1.14/Fri Mar 14 15:35:51 2008// 
     37/swank-fuzzy.lisp/1.8/Fri Mar 14 15:35:52 2008// 
    3838D 
  • trunk/thirdparty/slime/contrib/ChangeLog

    r2721 r2735  
     12008-03-14  Tobias C. Rittweiler  <tcr@freebits.de> 
     2 
     3        * swank-fancy-inspector.lisp (add-slots-for-inspector): Remove 
     4        IGNORE declaration of non-existing argument. 
     5 
     62008-03-14  Tobias C. Rittweiler  <tcr@freebits.de> 
     7 
     8        * swank-fuzzy.lisp (fuzzy-convert-matching-for-emacs): Return a 
     9        string representation of the classifications rather than the 
     10        classifications themselves. (Notice this propagates up to (and 
     11        consequently changes the return value of) the RPC function 
     12        FUZZY-COMPLETIONS. (incompatible api change.)   
     13 
     14        Rationale: The number of supported classification can be changed 
     15        without having to adapt its display at the client. 
     16 
     17        * slime-fuzzy.lisp (slime-fuzzy-insert-completion-choice): 
     18        (slime-fuzzy-fill-completions-buffer): Adapted to API change. 
     19         
     202008-03-14  Tobias C. Rittweiler  <tcr@freebits.de> 
     21 
     22        * swank-fancy-inspector.lisp (make-symbols-listing :classification): 
     23        Add support for typespec and constant classification; don't 
     24        silently ignore symbols that can't be usefully classified, but 
     25        group them under "MISC". 
     26 
    1272008-03-08  Helmut Eller  <heller@common-lisp.net> 
    228 
  • trunk/thirdparty/slime/contrib/slime-fuzzy.el

    r2410 r2735  
    295295completion choice into the current buffer, and mark it with the 
    296296proper text properties." 
    297   (let ((start (point)) 
    298         (symbol-name (first completion)) 
    299         (score (second completion)) 
    300         (chunks (third completion)) 
    301         (flags (fourth completion))) 
    302     (insert symbol-name) 
    303     (let ((end (point))) 
     297  (destructuring-bind (symbol-name score chunks classification-string) completion 
     298    (let ((start (point)) 
     299          (end)) 
     300      (insert symbol-name) 
     301      (setq end (point)) 
    304302      (dolist (chunk chunks) 
    305         (put-text-property (+ start (first chunk))  
    306                            (+ start (first chunk)  
    307                               (length (second chunk))) 
    308                            'face 'bold)) 
     303       (put-text-property (+ start (first chunk))  
     304                          (+ start (first chunk)  
     305                             (length (second chunk))) 
     306                          'face 'bold)) 
    309307      (put-text-property start (point) 'mouse-face 'highlight) 
    310308      (dotimes (i (- max-length (- end start))) 
    311         (insert " ")) 
    312       (insert (format " %s%s%s%s%s%s%s %8.2f" 
    313                       (if (member :boundp flags) "b" "-") 
    314                       (if (member :fboundp flags) "f" "-") 
    315                       (if (member :generic-function flags) "g" "-") 
    316                       (if (member :class flags) "c" "-") 
    317                       (if (member :macro flags) "m" "-") 
    318                       (if (member :special-operator flags) "s" "-") 
    319                       (if (member :package flags) "p" "-") 
    320                       score)) 
     309        (insert " ")) 
     310      (insert (format " %s %-8.2f" 
     311                      classification-string 
     312                      score)) 
    321313      (insert "\n") 
    322314      (put-text-property start (point) 'completion completion)))) 
     
    387379      (insert "Completion:") 
    388380      (dotimes (i (- max-length 10)) (insert " ")) 
    389       ;;     Flags:  Score: 
    390       ;; ... ------- -------- 
    391       ;;     bfgcmsp  
    392       (insert "Flags:  Score:\n") 
    393       (dotimes (i max-length) (insert "-")) 
    394       (insert " ------- --------\n") 
    395       (setq slime-fuzzy-first (point)) 
     381      ;;     Flags:   Score: 
     382      ;; ... -------  -------- 
     383      ;;     bfgctmsp 
     384      (let* ((example-classification-string (fourth (first completions))) 
     385             (classification-length (length example-classification-string)) 
     386             (spaces (- classification-length (length "Flags:")))) 
     387        (insert "Flags:") 
     388        (dotimes (i spaces) (insert " ")) 
     389        (insert " Score:\n") 
     390        (dotimes (i max-length) (insert "-")) 
     391        (insert " ") 
     392        (dotimes (i classification-length) (insert "-")) 
     393        (insert " --------\n") 
     394        (setq slime-fuzzy-first (point))) 
    396395 
    397396      (dolist (completion completions) 
  • trunk/thirdparty/slime/contrib/swank-fancy-inspector.lisp

    r2721 r2735  
    189189(defgeneric all-slots-for-inspector (object) 
    190190  (:method ((object standard-object)) 
    191     (declare (ignore inspector)) 
    192191    (append '("--------------------" (:newline) 
    193192              "All Slots:" (:newline)) 
     
    343342;; Wrapper structure over the list of symbols of a package that should 
    344343;; be displayed with their respective classification flags. This is 
    345 ;; because we need a unique type to dispatch on in INSPECT-FOR-EMACS
     344;; because we need a unique type to dispatch on in EMACS-INSPECT
    346345;; Used by the Inspector for packages. 
    347346(defstruct (%package-symbols-container (:conc-name   %container.) 
     
    382381                      (make-string (+ max-length distance -1) :initial-element #\-) 
    383382                      " " 
    384                       (let* ((dummy (classify-symbol (gensym))) 
     383                      (let* ((dummy (classify-symbol :foo)) 
    385384                             (dummy (symbol-classification->string dummy)) 
    386385                             (classification-length (length dummy))) 
     
    403402instead there are the three explicit FUNCTION, MACRO and 
    404403SPECIAL-OPERATOR groups." 
    405   (let ((table (make-hash-table :test #'eq))) 
    406     (flet ((maybe-convert-fboundps (classifications) 
    407              ;; Convert an :FBOUNDP in CLASSIFICATIONS to :FUNCTION if possible. 
    408              (if (and (member :fboundp classifications) 
    409                       (not (member :macro classifications)) 
    410                       (not (member :special-operator classifications))) 
    411                  (substitute :function :fboundp classifications) 
    412                  (remove :fboundp classifications)))) 
     404  (let ((table (make-hash-table :test #'eq)) 
     405        (+default-classification+ :misc)) 
     406    (flet ((normalize-classifications (classifications) 
     407             (cond ((null classifications) `(,+default-classification+)) 
     408                   ;; Convert an :FBOUNDP in CLASSIFICATIONS to :FUNCTION if possible. 
     409                   ((and (member :fboundp classifications) 
     410                         (not (member :macro classifications)) 
     411                         (not (member :special-operator classifications))) 
     412                      (substitute :function :fboundp classifications)) 
     413                   (t (remove :fboundp classifications))))) 
    413414      (loop for symbol in symbols do 
    414             (loop for classification in (maybe-convert-fboundps (classify-symbol symbol)) 
     415            (loop for classification in (normalize-classifications (classify-symbol symbol)) 
    415416                  ;; SYMBOLS are supposed to be sorted alphabetically; 
    416417                  ;; this property is preserved here except for reversing. 
    417418                  do (push symbol (gethash classification table))))) 
    418419    (let* ((classifications (loop for k being each hash-key in table collect k)) 
    419            (classifications (sort classifications #'string<))) 
     420           (classifications (sort classifications 
     421                                  ;; Sort alphabetically, except +DEFAULT-CLASSIFICATION+ 
     422                                  ;; which sort to the end. 
     423                                  #'(lambda (a b) 
     424                                      (cond ((eql a +default-classification+) nil) 
     425                                            ((eql b +default-classification+) t) 
     426                                            (t (string< a b))))))) 
    420427      (loop for classification in classifications 
    421428            for symbols = (gethash classification table) 
  • trunk/thirdparty/slime/contrib/swank-fuzzy.lisp

    r2410 r2735  
    3131object is: 
    3232 
    33     (COMPLETED-STRING SCORE (&rest CHUNKS) FLAGS
     33    (COMPLETED-STRING SCORE (&rest CHUNKS) CLASSIFICATION-STRING
    3434 
    3535where a CHUNK is a description of a matched substring: 
     
    3737    (OFFSET SUBSTRING) 
    3838 
    39 and FLAGS is a list of keywords describing properties of the  
    40 symbol (see CLASSIFY-SYMBOL). 
     39and FLAGS is short string describing properties of the symbol (see 
     40CLASSIFY-SYMBOL and STRING-CLASSIFICATION->STRING). 
    4141 
    4242E.g., completing \"mvb\" in a package that uses COMMON-LISP would 
     
    132132 
    133133(defun fuzzy-convert-matching-for-emacs (fuzzy-matching user-input-string) 
    134   "Converts a result from the fuzzy completion core into 
    135 something that emacs is expecting.  Converts symbols to strings, 
    136 fixes case issues, and adds information describing if the symbol 
    137 is :bound, :fbound, a :class, a :macro, a :generic-function, 
    138 a :special-operator, or a :package." 
     134  "Converts a result from the fuzzy completion core into something 
     135that emacs is expecting.  Converts symbols to strings, fixes case 
     136issues, and adds information (as a string) describing if the symbol is 
     137bound, fbound, a class, a macro, a generic-function, a 
     138special-operator, or a package." 
    139139  (with-struct (fuzzy-matching. symbol score package-chunks symbol-chunks) fuzzy-matching 
    140140    (multiple-value-bind (name added-length) 
     
    149149                                  (list (+ added-length offset) string)))  
    150150                            symbol-chunks)) 
    151             (classify-symbol symbol))))) 
     151            (symbol-classification->string (classify-symbol symbol)))))) 
    152152 
    153153(defun fuzzy-completion-set (string default-package-name &key limit time-limit-in-msec) 
  • trunk/thirdparty/slime/slime.el

    r2731 r2735  
    62686268         (erase-buffer) 
    62696269         (insert expansion) 
     6270         (goto-char (point-min)) 
     6271         (indent-sexp) 
    62706272         (font-lock-fontify-buffer)))))) 
    62716273 
  • trunk/thirdparty/slime/swank.lisp

    r2721 r2735  
    501501 
    502502(defun classify-symbol (symbol) 
    503   "Returns a list of classifiers that classify SYMBOL according 
    504 to its underneath objects (e.g. :BOUNDP if SYMBOL constitutes a 
    505 special variable.) The list may contain the following classification 
    506 keywords: :BOUNDP, :FBOUNDP, :GENERIC-FUNCTION, :CLASS, :MACRO,  
    507 :SPECIAL-OPERATOR, and/or :PACKAGE" 
     503  "Returns a list of classifiers that classify SYMBOL according to its 
     504underneath objects (e.g. :BOUNDP if SYMBOL constitutes a special 
     505variable.) The list may contain the following classification 
     506keywords: :BOUNDP, :FBOUNDP, :CONSTANT, :GENERIC-FUNCTION, 
     507:TYPESPEC, :CLASS, :MACRO, :SPECIAL-OPERATOR, and/or :PACKAGE" 
    508508  (check-type symbol symbol) 
    509   (let (result) 
    510     (when (boundp symbol)             (push :boundp result)) 
    511     (when (fboundp symbol)            (push :fboundp result)) 
    512     (when (find-class symbol nil)     (push :class result)) 
    513     (when (macro-function symbol)     (push :macro result)) 
    514     (when (special-operator-p symbol) (push :special-operator result)) 
    515     (when (find-package symbol)       (push :package result)) 
    516     (when (typep (ignore-errors (fdefinition symbol)) 
    517                  'generic-function) 
    518       (push :generic-function result)) 
    519     result)) 
     509  (flet ((type-specifier-p (s) 
     510           (or (documentation s 'type) 
     511               (not (eq (type-specifier-arglist s) :not-available))))) 
     512    (let (result) 
     513      (when (boundp symbol)             (push (if (constantp symbol) 
     514                                                  :constant :boundp) result)) 
     515      (when (fboundp symbol)            (push :fboundp result)) 
     516      (when (type-specifier-p symbol)   (push :typespec result)) 
     517      (when (find-class symbol nil)     (push :class result)) 
     518      (when (macro-function symbol)     (push :macro result)) 
     519      (when (special-operator-p symbol) (push :special-operator result)) 
     520      (when (find-package symbol)       (push :package result)) 
     521      (when (typep (ignore-errors (fdefinition symbol)) 
     522                   'generic-function) 
     523        (push :generic-function result)) 
     524 
     525      result))) 
    520526 
    521527(defun symbol-classification->string (flags) 
    522   (format nil "~A~A~A~A~A~A~A" 
    523           (if (member :boundp flags) "b" "-") 
     528  (format nil "~A~A~A~A~A~A~A~A" 
     529          (if (or (member :boundp flags) 
     530                  (member :constant flags)) "b" "-") 
    524531          (if (member :fboundp flags) "f" "-") 
    525532          (if (member :generic-function flags) "g" "-") 
    526533          (if (member :class flags) "c" "-") 
     534          (if (member :typespec flags) "t" "-") 
    527535          (if (member :macro flags) "m" "-") 
    528536          (if (member :special-operator flags) "s" "-")