Based on my testing, cpp-highlight-mode does something like what I want, but requires user action. It seems like tying into the font-lock functionality is the correct option to make the behavior automatic. For example: (add-hook 'c-mode-common-hook I have successfully followed examples in the GNU documentation to change the face of single-line regular expressions. Perhaps my regular expression is wrong (though it appears to work using M-x re-builder), I've messed up my syntax, or I'm following the wrong approach entirely.īut this code: (add-hook 'c-mode-common-hook '(("\"), that suggested that Emacs must be told specifically to allow for multiline matches. Is there more than one program that is emacs? I'm using Aquamacs 2.1 (which is based on GNU Emacs 23.2.50.1) on OS X 10.6.5, if that makes a difference.Įven if you got the multiline regexp to work, you'd still have problems with nested #ifdef/#endif's since it would stop font-locking at the first #endif.As Oustervote in 2001 concluded that emacs remains the single most widely-used programming editor among Tcl practitioners, although all vi variants together appear to sum to a larger total. Both GNU Emacs and Xemacs are available for Windows.Quite a bit of available elisp implements functionality useful to Tcl coders, including syntax highlighting, a first-class REPL with inferior-tcl. Ok, I'm not really in tune with wiki writing style, so I'll just dump stuff here ( davidw): JBezoar - new emacs package to insert templated code interactively Just drop elisp specific items into the elisp page, mentioned above. The biggest problem is a good tcl-mode for emacs. A little bitty bit of elisp, that looks up tcl man pages can be found on the elisp page.īoth gnumacs and xemacs have some problems with comments, braces, and so on.It is true, that some details of the standard tcl-mode of emacs (I'm talking about GNU emacs, don't know much about Xemacs) could profit of a little bit work by an elisp guru. For example, I'm not that happy with the standard highlight regexp's. I use instead Donal Fellows highlighting code from. And there are other, mostly minor problems. That said, the tcl-mode has some very nice features, that really ease your work, if you are an emacs addict, like me. Have you ever have debugged a tk application? It's very easy to start the whole script from inside emacs (with the tcl mode command tcl-send-buffer, by default bound to C-c M-a). Now you click through your GUI, filling in data here and there. Then you click, let's say, a button, and you have to realize, that there is an error in the command bound to that button. Tk's error message may give you the reason, what's going wrong or at least an idea what debugging 'puts' to insert, to get more insight. Normally, this means exit your application, edit the code, restart your application, click through the GUI again, fill in the necessary data here and there and then you reach the point of interest again. Not so, if you have started your applicatiom from emacs tcl mode. Don't exit your application, after you have encountered the error. Just edit the according proc (and fill some debugging puts in it, if you feel the needs, you will see the output in a special emacs buffer) and send the changed proc with tcl-send-buffer (per default bound to C-c M-a) to the running interpreter. Now - without restarting the application and clicking through again - just retry the malicious GUI action that has triggered the error before and see the outcome. (Of course, this is only possible due to the dynamic nature of tcl, and is not special to the emacs tcl mode. In, Bob Techentin writes the following to someone asking how to write Tcl code in Emacs and get the emacs syntax helps, etc.: Emacs tcl mode only makes it very easy to use this tcl feature.) de. tcl extension, and you should get Tcl mode automatically. If you don't get Tcl mode (perhaps because your file does not have the. tcl extension), use the m-x-tcl-mode command. One emacs trick to exploit is to put the magic code "-*-Tcl-*-" into one of the first lines of the file, so it always is recognized as Tcl source code. Note that dde services ' doesn't list the XEmacs service. This is because XEmacs chooses not to respond to non-specific DDE requests. dde services XEmacs System'' does list the service. WJP One of the nice features of emacs is that it will automatically time-stamp files for you whenever you save them.
0 Comments
Leave a Reply. |