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

Re: adding command to dired comtab



    Date: 24 Apr 91 06:39:47 GMT
    From: ncramer@bbn.com (Nichael Cramer)

    In article <9104232242.AA15431@ceratiidae.cs.sandia.gov> drstrip@CS.SANDIA.GOV (David R Strip) writes:
    >I want to add a command to dired. I know how to write the lisp code.
...
    >What I want to know is, is there some way to do a command-store
    >to the mode comtab? How do I reference the mode comtab if I am 
    >not currently in that mode?


...
    (defmacro set!-major-mode-comtab-return-undo (MODE-KEYWORD SPECS)
      `(let ((*-*OLD-USER-FORMS*-* (send (major-mode-from-keyword ,MODE-KEYWORD) :user-mode-forms)))
	 (major-mode-set-comtab ,MODE-KEYWORD ,SPECS)
	 `(progn
	    (setf (send (major-mode-from-keyword ,',MODE-KEYWORD) :user-mode-forms)
		  ,(and *-*OLD-USER-FORMS*-* `',*-*OLD-USER-FORMS*-*))))
      )
...

Actually, I find that LOGIN-FORMS works quite well with
MAJOR-MODE-SET-COMTAB.
		- Pat