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

Diff of /slime/swank.lisp

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

revision 1.69 by lgorrie, Fri Nov 28 19:54:15 2003 UTC revision 1.70 by lgorrie, Fri Nov 28 20:54:02 2003 UTC
# Line 1  Line 1 
1  ;;;; -*- Mode: lisp; outline-regexp: ";;;;+"; indent-tabs-mode: nil -*-  ;;;; -*- Mode: lisp; outline-regexp: ";;;;;*"; indent-tabs-mode: nil -*-
2  ;;;  ;;;
3  ;;; swank.lisp --- the portable bits  ;;; swank.lisp --- the portable bits
4  ;;;  ;;;
# Line 419  Record compiler notes signalled as `comp Line 419  Record compiler notes signalled as `comp
419            (format nil "~,2F" (/ usecs 1000000.0)))))            (format nil "~,2F" (/ usecs 1000000.0)))))
420    
421    
422  ;;; Macroexpansion  ;;;; Macroexpansion
423    
424  (defun apply-macro-expander (expander string)  (defun apply-macro-expander (expander string)
425    (let ((*print-pretty* t)    (let ((*print-pretty* t)
# Line 440  Record compiler notes signalled as `comp Line 440  Record compiler notes signalled as `comp
440    (apply-macro-expander #'macroexpand-all string))    (apply-macro-expander #'macroexpand-all string))
441    
442    
443  ;;; Completion  ;;;; Completion
444    
445  (defun case-convert (string)  (defun case-convert (string)
446    "Convert STRING according to the current readtable-case."    "Convert STRING according to the current readtable-case."
# Line 456  Record compiler notes signalled as `comp Line 456  Record compiler notes signalled as `comp
456  (defslimefun completions (string default-package-name)  (defslimefun completions (string default-package-name)
457    "Return a list of completions for a symbol designator STRING.    "Return a list of completions for a symbol designator STRING.
458    
459  The result is a list of strings.  If STRING is package qualified the  The result is the list (COMPLETION-SET
460  result list will also be qualified.  If string is non-qualified the  COMPLETED-PREFIX). COMPLETION-SET is the list of all matching
461  result strings are also not qualified and are considered relative to  completions, and COMPLETED-PREFIX is the best (partial)
462    completion of the input string.
463    
464    If STRING is package qualified the result list will also be
465    qualified.  If string is non-qualified the result strings are
466    also not qualified and are considered relative to
467  DEFAULT-PACKAGE-NAME.  DEFAULT-PACKAGE-NAME.
468    
469  The way symbols are matched depends on the symbol designator's  The way symbols are matched depends on the symbol designator's
# Line 533  If PACKAGE is not specified, the home pa Line 538  If PACKAGE is not specified, the home pa
538      (eq status :external)))      (eq status :external)))
539    
540    
541  ;;;; Subword-word matching  ;;;;; Subword-word matching
542    
543  (defun subword-prefix-p (s1 s2 &key (start1 0) end1 (start2 0))  (defun subword-prefix-p (s1 s2 &key (start1 0) end1 (start2 0))
544    "Return true if the subsequence in S1 bounded by START1 and END1    "Return true if the subsequence in S1 bounded by START1 and END1
# Line 571  Examples: Line 576  Examples:
576                                         :start2 start2))))))                                         :start2 start2))))))
577    
578    
579  ;;;; Extending the input string by completion  ;;;;; Extending the input string by completion
580    
581  (defun longest-completion (completions)  (defun longest-completion (completions)
582    "Return the longest prefix for all COMPLETIONS."    "Return the longest prefix for all COMPLETIONS."
# Line 599  Examples: Line 604  Examples:
604          (reduce #'common-prefix strings))))          (reduce #'common-prefix strings))))
605    
606  (defun transpose-matrix (matrix)  (defun transpose-matrix (matrix)
607    "Turn a matrix (of any sequence type) on its side."    "Turn a matrix (of any sequence type) on its side.
608    If the rows are of unequal length, truncate uniformly to the shortest."
609    ;; A cute function from PAIP p.574    ;; A cute function from PAIP p.574
610    (if matrix (apply #'mapcar #'list matrix)))    (if matrix (apply #'mapcar #'list matrix)))
611    

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.70

  ViewVC Help
Powered by ViewVC 1.1.5