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

Re: The apropos-dialog

I have a useful extension to the apropos dialog that indicates which
symbols have bindings or function bindings by modifying the text
style.  The code is enclosed.  

The other suggestions sound good, but I'd urge whoever implements them
to use dialog items to control the options rather than magic mouse


;;; apropos-style.lisp
(in-package :cl-user)
Indicate bindings in apropos dialog by means of font styles.
Todo:  put a key in the header of the window
(defparameter fbound-style '("monaco" 9 :bold))
(defparameter bound-style '("monaco" 9 :italic))
(defparameter both-bound-style '("monaco" 9 :bold :italic))
(defmethod fontify-apropos-dialog ((d apropos-dialog))
  (with-slots (table-item) d
    (dotimes (cell-v (point-v (table-dimensions table-item)))
      (let ((symbol (cell-contents table-item 0 cell-v)))
          (set-cell-font table-item (make-point 0 cell-v) 
                         (cond ((and (fboundp symbol)
                                     (boundp symbol))
                               ((fboundp symbol)
                               ((boundp symbol)
                               (t nil)))))))
(advise ccl::apropos-search
        (fontify-apropos-dialog (car arglist)) 
        :when :after :name :fontify)