[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kill ring menu
From: |
Miles Bader |
Subject: |
Re: kill ring menu |
Date: |
22 May 2002 12:46:09 +0900 |
Colin Walters <address@hidden> writes:
> The only way I can think of to implement said `font-lock-face-category'
> is to loop through all the symbols in `font-lock-category-alist' and use
> `symbol-name' to compare their string names. That just seemed too
> inefficient.
Um, how about this (in the font-lock code; untested):
(defun ...do-stuff-to-setup-categories... ()
...
(set (make-local-variable 'font-lock-category-property)
;; you could also embed the buffer name in the name of this
;; symbol, if you want the plist to be more clear
(make-symbol "font-lock-category"))
...
(dolist (cat-name list-of-mode-category-names)
(put cat-name
font-lock-category-property
(make-symbol (symbol-name cat-name))))
...)
(defun font-lock-face-category (cat-name)
(get cat-name font-lock-category-property))
Looks pretty efficient to me ... (or you could use Stefan's idea of
buffer-local variables, with the caveats I noted).
-Miles
--
o The existentialist, not having a pillow, goes everywhere with the book by
Sullivan, _I am going to spit on your graves_.
- Re: kill ring menu, (continued)
- Re: kill ring menu, Richard Stallman, 2002/05/20
- Re: kill ring menu, Colin Walters, 2002/05/20
- Re: kill ring menu, Richard Stallman, 2002/05/21
- Re: kill ring menu, Colin Walters, 2002/05/21
- Re: kill ring menu, Miles Bader, 2002/05/21
- Re: kill ring menu, Stefan Monnier, 2002/05/21
- Re: kill ring menu, Miles Bader, 2002/05/21
- Re: kill ring menu, Colin Walters, 2002/05/21
- Re: kill ring menu,
Miles Bader <=
- Re: kill ring menu, Miles Bader, 2002/05/21
- Re: kill ring menu, Miles Bader, 2002/05/22
- Re: kill ring menu, Colin Walters, 2002/05/22
- Re: kill ring menu, Miles Bader, 2002/05/23
- Re: kill ring menu, Colin Walters, 2002/05/23
- Re: kill ring menu, Miles Bader, 2002/05/23
- Re: kill ring menu, Miles Bader, 2002/05/23
- Re: kill ring menu, Richard Stallman, 2002/05/24
- Re: kill ring menu, Colin Walters, 2002/05/30
- Re: kill ring menu, Miles Bader, 2002/05/30