[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: adding command to dired comtab
Here's a scrap of code I wrote about 10 years ago. I hope the comment
is correct and does what you want.
;;; when you enter the mode, zmacs magically executes these.
;;; Well there is a way to clear mode forms (as far as I know undocmumented). If
;;; you change the :mode-forms method, do
;;; (SEND (MODE-OF-FLAVOR 'GYPSY-MODE) :CLEAR-MODE-FORMS-CACHE).
(DEFMETHOD (:MODE-FORMS GYPSY-MODE) ()
'((SET-CHAR-SYNTAX WORD-ALPHABETIC *MODE-WORD-SYNTAX-TABLE* #/_) ;; these are required for forward-word.
(SET-CHAR-SYNTAX WORD-ALPHABETIC *MODE-WORD-SYNTAX-TABLE* #/') ;; word-table as opposed to list-table.
(SET-SYNTAX-TABLE-INDIRECTION *MODE-LIST-SYNTAX-TABLE* *GYPSY-MODE-LIST-SYNTAX-TABLE*)
(SET-COMTAB *MODE-COMTAB*
'(#\TAB COM-GYPSY-INDENT
#\c-m-B COM-GYPSY-BACKWARD-EXPR
...