* Comments (SAS) in generic mode?
@ 2011-05-26 16:15 fork
0 siblings, 0 replies; only message in thread
From: fork @ 2011-05-26 16:15 UTC (permalink / raw)
To: help-gnu-emacs
Hi there,
I am defining a generic mode, which seems to work fine, except that I can't get
the "*comment;" notation from sas to work ("*" starts a comment, ";" ends it)
(the c-style works fine). If anyone can take a look and give me pointers that
would be awesome:
(define-generic-mode 'simple-sas-mode
'( ("*" . ";") ("/*" . "*/"))
'("proc" "data" "run" "quit" "if" "end" "else" "begin")
()
'("\\.sas\\'")
(list (lambda () (progn
(local-set-key (kbd "<return>") 'newline-indent-relative)
(local-set-key (kbd "C-<return>") 'newline)
(local-set-key (kbd "<tab>") 'tab-to-tab-stop)
(local-set-key (kbd "C-<tab>") 'indent-relative-maybe)
(modify-syntax-entry ?_ "w"))))
"Major mode for very simple SAS highlighting and indenting.")
Thanks!
PS -- this is where I want to figure out backspacing to the last tab stop, if
anyone has any ideas.
PPS -- I am aware of ESS, but to be honest I think their SAS editing mode leaves
a lot to be desired, and is WAY to long and complex for me to want to modify.
SAS is a lot like SQL, in that it isn't really obvious how to indent, so some
simple keys to go back and forth between indent levels is all I need/ want; in
the Algol and Lisp families of languages it seems much easier to
programmatically determine how to indent.
PPPS -- the syntax entries are used to make dynamic abbreviation work nicely
with underscores which are almost never word boundaries.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-26 16:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 16:15 Comments (SAS) in generic mode? fork
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.