*SLIME Description*バッファに色付けする

M-x slime-documentation や M-x slime-describe-symbol などを実行すると *SLIME Description* バッファにそのシンボルの説明が出てくる。これは便利だが色がついてないので俺は見辛く感じる。

CAR is an external symbol in #<PACKAGE "COMMON-LISP">.
Function: #<FUNCTION CAR>
Its associated name (as in FUNCTION-LAMBDA-EXPRESSION) is CAR.
The function's arguments are:  (LIST)
Function documentation:
  Return the 1st object in a list.
Its declared argument types are:
  (LIST)
Its result type is:
  (VALUES T &OPTIONAL)
On Fri, Jun 1, 2007 06:13:36 AM [-9] it was compiled from:
SYS:SRC;CODE;LIST.LISP
  Created: Monday, January 29, 2007 04:05:21 PM [-9]

そこでhi-lockで色付けをしてみる。faceは俺はhi-green-bを使っているが、もちろん他のでもかまわない。

(defun slime-description-fontify ()
  "Fontify sections of SLIME Description."
  (with-current-buffer "*SLIME Description*"
    (highlight-regexp
     (concat "^Function:\\|"
             "^Macro-function:\\|"
             "^Its associated name.+?) is\\|"
             "^The .+'s arguments are:\\|"
             "^Function documentation:$\\|"
             "^Its.+\\(is\\|are\\):\\|"
             "^On.+it was compiled from:$")
     'hi-green-b)))

(defadvice slime-show-description (after slime-description-fontify activate)
  "Fontify sections of SLIME Description."
  (slime-description-fontify))

以下の部分に色付けをするようになる。

Function: 
Its associated name (as in FUNCTION-LAMBDA-EXPRESSION) is
The function's arguments are:
Function documentation:
Its declared argument types are:
Its result type is:
On Fri, Jun 1, 2007 06:13:36 AM [-9] it was compiled from: