Download
(defvar procomm-mode-hook nil)
(defvar procomm-mode-map
(let ((procomm-mode-map (make-keymap)))
(define-key procomm-mode-map "\C-j" 'newline-and-indent)
procomm-mode-map)
"Keymap for PROCOMM major mode")
(defvar aspect-primary-commands
'(
"call" "CALL" "case" "CASE" "endcase" "ENDCASE" "default" "DEFAULT"
"else" "ELSE" "elseif" "ELSEIF" "exitfor" "EXITFOR" "exitswitch" "EXITSWITCH"
"exitwhile" "EXITWHILE" "for" "FOR" "endfor" "ENDFOR" "func" "FUNC"
"endfunc" "ENDFUNC" "goto" "GOTO" "if" "IF" "endif" "ENDIF"
"loopfor" "LOOPFOR" "loopwhile" "LOOPWHILE" "param" "PARAM" "proc" "PROC"
"endproc" "ENDPROC" "return" "RETURN" "switch" "SWITCH" "endswitch" "ENDSWITCH"
"while" "WHILE" "endwhile" "ENDWHILE"
)
"List of ASPECT primary command keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-types
'(
"float" "FLOAT" "integer" "INTEGER" "long" "LONG" "string" "STRING"
)
"List of ASPECT type keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-clipboard-commands
'(
"cliptofile" "CLIPTOFILE" "cliptostr" "CLIPTOSTR" "filetoclip" "FILETOCLIP" "pastetext" "PASTETEXT"
"strtoclip" "STRTOCLIP"
)
"List of ASPECT Clipboard Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-com-commands
'(
"break" "BREAK" "clearxoff" "CLEARXOFF" "comgetc" "COMGETC" "computc" "COMPUTC"
"comread" "COMREAD" "comwrite" "COMWRITE" "disconnect" "DISCONNECT" "hangup" "HANGUP"
"rget" "RGET" "rxflush" "RXFLUSH" "transmit" "TRANSMIT" "txflush" "TXFLUSH"
"waitfor" "WAITFOR" "waitquiet" "WAITQUIET" "when quiet" "WHEN QUIET" "when target" "WHEN TARGET"
)
"List of ASPECT COM command keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-date-and-time-commands
'(
"intsltime" "INTSLTIME" "ltimeelapsed" "LTIMEELAPSED" "ltimeints" "LTIMEINTS" "ltimemisc" "LTIMEMISC"
"ltimestring" "LTIMESTRING" "ltimestrs" "LTIMESTRS" "monthstr" "MONTHSTR" "strsltime" "STRSLTIME"
"weekdaystr" "WEEKDAYSTR"
)
"List of ASPECT Date and Time Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-dialing-commands
'(
"connect" "CONNECT" "connectmanual" "CONNECTMANUAL" "dial" "DIAL" "dialadd" "DIALADD"
"dialcancel" "DIALCANCEL" "dialclass" "DIALCLASS" "dialcount" "DIALCOUNT" "dialcreate" "DIALCREATE"
"dialdelete" "DIALDELETE" "dialfind" "DIALFIND" "dialinsert" "DIALINSERT" "dialload" "DIALLOAD"
"dialname" "DIALNAME" "dialnumber" "DIALNUMBER" "dialsave" "DIALSAVE" "dialstats" "DIALSTATS"
)
"List of ASPECT Dialing Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-dialog-commands
'(
"bitmap" "BITMAP" "checkbox" "CHECKBOX" "combobox" "COMBOBOX" "dialogbox" "DIALOGBOX"
"enddialog" "ENDDIALOG" "dirlistbox" "DIRLISTBOX" "dirpath" "DIRPATH" "dlgctrlwin" "DLGCTRLWIN"
"dlgdestroy" "DLGDESTROY" "dlgevent" "DLGEVENT" "dlgexists" "DLGEXISTS" "dlglist" "DLGLIST"
"dlgsave" "DLGSAVE" "dlgshow" "DLGSHOW" "dlgupdate" "DLGUPDATE" "dlgwin" "DLGWIN"
"dlgwinctrl" "DLGWINCTRL" "editbox" "EDITBOX" "fcombobox" "FCOMBOBOX" "feditbox" "FEDITBOX"
"flistbox" "FLISTBOX" "ftext" "FTEXT" "groupbox" "GROUPBOX" "icon" "ICON"
"iconbutton" "ICONBUTTON" "listbox" "LISTBOX" "metafile" "METAFILE" "pushbutton" "PUSHBUTTON"
"radiobutton" "RADIOBUTTON" "radiogroup" "RADIOGROUP" "endgroup" "ENDGROUP" "text" "TEXT"
)
"List of ASPECT dialog command keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-dos-or-disk-related-commands
'(
"addfilename" "ADDFILENAME" "chdir" "CHDIR" "copyfile" "COPYFILE" "delfile" "DELFILE"
"dir" "DIR" "diskfree" "DISKFREE" "dos" "DOS" "fileget" "FILEGET"
"fileset" "FILESET" "fileview" "FILEVIEW" "findfirst" "FINDFIRST" "findnext" "FINDNEXT"
"fullpath" "FULLPATH" "getdir" "GETDIR" "getenv" "GETENV" "getfilename" "GETFILENAME"
"getpathname" "GETPATHNAME" "getvolume" "GETVOLUME" "isfile" "ISFILE" "makepath" "MAKEPATH"
"mkdir" "MKDIR" "putenv" "PUTENV" "rename" "RENAME" "rmdir" "RMDIR"
"run" "RUN" "shell" "SHELL" "shortpath" "SHORTPATH" "splitpath" "SPLITPATH"
)
"List of ASPECT DOS- or Disk-Related Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-dynamic-data-exchange-commands
'(
"ddeadvise" "DDEADVISE" "ddeexecute" "DDEEXECUTE" "ddeinit" "DDEINIT" "ddepoke" "DDEPOKE"
"dderequest" "DDEREQUEST" "ddeterminate" "DDETERMINATE" "ddeunadvise" "DDEUNADVISE"
)
"List of ASPECT Dynamic Data Exchange Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-fax-commands
'(
"faxcancel" "FAXCANCEL" "faxlist" "FAXLIST" "faxmodem" "FAXMODEM" "faxpoll" "FAXPOLL"
"faxprint" "FAXPRINT" "faxremove" "FAXREMOVE" "faxsend" "FAXSEND" "faxstatus" "FAXSTATUS"
"faxview" "FAXVIEW"
)
"List of ASPECT Fax Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-file-i-o-commands
'(
"fclear" "FCLEAR" "fclose" "FCLOSE" "fdelblock" "FDELBLOCK" "feof" "FEOF"
"ferror" "FERROR" "fflush" "FFLUSH" "fgetc" "FGETC" "fgets" "FGETS"
"finsblock" "FINSBLOCK" "flength" "FLENGTH" "fopen" "FOPEN" "fputc" "FPUTC"
"fputs" "FPUTS" "fread" "FREAD" "fseek" "FSEEK" "fstrfmt" "FSTRFMT"
"ftell" "FTELL" "ftruncate" "FTRUNCATE" "fwrite" "FWRITE" "rewind" "REWIND"
)
"List of ASPECT File I/O Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-file-transfer-commands
'(
"ftp" "FTP" "getfile" "GETFILE" "kermserve" "KERMSERVE" "sendfile" "SENDFILE"
"xfercancel" "XFERCANCEL"
)
"List of ASPECT File Transfer Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-general-procomm-plus-commands
'(
"alarm" "ALARM" "beep" "BEEP" "capture" "CAPTURE" "capturestr" "CAPTURESTR"
"crc16" "CRC16" "decrypt" "DECRYPT" "encrypt" "ENCRYPT" "errormsg" "ERRORMSG"
"fetch" "FETCH" "help" "HELP" "mapisend" "MAPISEND" "metakey" "METAKEY"
"mspause" "MSPAUSE" "pause" "PAUSE" "playback" "PLAYBACK" "pwexit" "PWEXIT"
"pwmode" "PWMODE" "pwtitlebar" "PWTITLEBAR" "sdlgfopen" "SDLGFOPEN" "sdlginput" "SDLGINPUT"
"sdlgmsgbox" "SDLGMSGBOX" "sdlgsaveas" "SDLGSAVEAS" "set" "SET" "setpointer" "SETPOINTER"
"setup" "SETUP" "statclear" "STATCLEAR" "statmsg" "STATMSG" "usermsg" "USERMSG"
"waituntil" "WAITUNTIL" "when" "WHEN" "xlatin" "XLATIN" "xlatout" "XLATOUT"
"xlatstr" "XLATSTR" "wizard" "WIZARD"
)
"List of ASPECT General Procomm Plus Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-general-windows-commands
'(
"disable" "DISABLE" "dllcall" "DLLCALL" "dllfree" "DLLFREE" "dllload" "DLLLOAD"
"enable" "ENABLE" "exitwindows" "EXITWINDOWS" "mciexec" "MCIEXEC" "mcisend" "MCISEND"
"profilerd" "PROFILERD" "profilewr" "PROFILEWR" "screentowin" "SCREENTOWIN" "sendkey" "SENDKEY"
"sendkeystr" "SENDKEYSTR" "sendvkey" "SENDVKEY" "wintoscreen" "WINTOSCREEN"
)
"List of ASPECT General Windows Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-keyboard-commands
'(
"ansitokey" "ANSITOKEY" "keyflush" "KEYFLUSH" "keyget" "KEYGET" "keystate" "KEYSTATE"
"keytoansi" "KEYTOANSI" "keytooem" "KEYTOOEM" "oemtokey" "OEMTOKEY"
)
"List of ASPECT Keyboard Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-internet-commands
'(
"connect" "CONNECT" "connectmanual" "CONNECTMANUAL" "disconnect" "DISCONNECT" "ftp" "FTP"
)
"List of ASPECT Internet Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-memory-commands
'(
"memaddress" "MEMADDRESS" "memalloc" "MEMALLOC" "memavail" "MEMAVAIL" "memchr" "MEMCHR"
"memcmp" "MEMCMP" "memfree" "MEMFREE" "memgetc" "MEMGETC" "memicmp" "MEMICMP"
"memmove" "MEMMOVE" "memputc" "MEMPUTC" "memread" "MEMREAD" "memrealloc" "MEMREALLOC"
"memset" "MEMSET" "memsize" "MEMSIZE" "memwrite" "MEMWRITE"
)
"List of ASPECT Memory Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-menu-commands
'(
"menubar" "MENUBAR" "menucheck" "MENUCHECK" "menuitem" "MENUITEM" "menuitemcount" "MENUITEMCOUNT"
"menupopup" "MENUPOPUP" "menupopupid" "MENUPOPUPID" "menuselect" "MENUSELECT" "menushow" "MENUSHOW"
"menushowpopup" "MENUSHOWPOPUP" "menustate" "MENUSTATE"
)
"List of ASPECT Menu Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-option-set-commands
'(
"itemcount" "ITEMCOUNT" "itemcreate" "ITEMCREATE" "itemfind" "ITEMFIND" "itemname" "ITEMNAME"
"itemremove" "ITEMREMOVE"
)
"List of ASPECT Option Set Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-numeric-string-conversion-commands
'(
"atof" "ATOF" "atoi" "ATOI" "atol" "ATOL" "ceil" "CEIL"
"floor" "FLOOR" "ftoa" "FTOA" "itoa" "ITOA" "ltoa" "LTOA"
"numtostr" "NUMTOSTR" "rand" "RAND" "strtonum" "STRTONUM"
)
"List of ASPECT Numeric, String Conversion Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-oem-ansi-commands
'(
"ansitokey" "ANSITOKEY" "ansitooem" "ANSITOOEM" "oemtoansi" "OEMTOANSI" "oemtokey" "OEMTOKEY"
)
"List of ASPECT OEM/ANSI Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-packet-mode-commands
'(
"ansitokey" "ANSITOKEY" "ansitooem" "ANSITOOEM" "oemtoansi" "OEMTOANSI" "oemtokey" "OEMTOKEY"
)
"List of ASPECT Packet Mode Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-preprocessor-commands
'(
"#comment" "#COMMENT" "#endcomment" "#ENDCOMMENT" "#define" "#DEFINE" "#else" "#ELSE"
"#elif" "#ELIF" "#elifdef" "#ELIFDEF" "#elifndef" "#ELIFNDEF" "#if" "#IF"
"#ifdef" "#IFDEF" "#endif" "#ENDIF" "#ifndef" "#IFNDEF" "#include" "#INCLUDE"
"#undef " "#UNDEF"
)
"List of ASPECT preprocessor keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-printer-commands
'(
"printalign" "PRINTALIGN" "printattr" "PRINTATTR" "printcapture" "PRINTCAPTURE" "printchar" "PRINTCHAR"
"printer" "PRINTER" "printfit" "PRINTFIT" "printfont" "PRINTFONT" "printmargin" "PRINTMARGIN"
"printstr" "PRINTSTR" "printtabs" "PRINTTABS" "printtabstr" "PRINTTABSTR"
)
"List of ASPECT Printer Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-script-control-commands
'(
"breakpoint" "BREAKPOINT" "chain" "CHAIN" "compile" "COMPILE" "execute" "EXECUTE"
"exit" "EXIT" "halt" "HALT" "longjmp" "LONGJMP" "setjmp" "SETJMP"
"yield" "YIELD"
)
"List of ASPECT Script Control Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-string-commands
'(
"nullstr" "NULLSTR" "rstrcmp" "RSTRCMP" "strcat" "STRCAT" "strchr" "STRCHR"
"strcmp" "STRCMP" "strcpy" "STRCPY" "strcspn" "STRCSPN" "strdelete" "STRDELETE"
"strextract" "STREXTRACT" "strfind" "STRFIND" "strfmt" "STRFMT" "strgetc" "STRGETC"
"stricmp" "STRICMP" "strinsert" "STRINSERT" "strlen" "STRLEN" "strlwr" "STRLWR"
"strncmp" "STRNCMP" "strnicmp" "STRNICMP" "strputc" "STRPUTC" "strquote" "STRQUOTE"
"strrchr" "STRRCHR" "strread" "STRREAD" "strreplace" "STRREPLACE" "strrev" "STRREV"
"strright" "STRRIGHT" "strsearch" "STRSEARCH" "strset" "STRSET" "strspn" "STRSPN"
"strtok" "STRTOK" "strupdt" "STRUPDT" "strupr" "STRUPR" "strwrite" "STRWRITE"
"substr" "SUBSTR"
)
"List of ASPECT string keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-task-window-manipulation-commands
'(
"firsttask" "FIRSTTASK" "nexttask" "NEXTTASK" "taskactivate" "TASKACTIVATE" "taskexists" "TASKEXISTS"
"taskexit" "TASKEXIT" "taskname" "TASKNAME" "taskpath" "TASKPATH" "taskwin" "TASKWIN"
"winactivate" "WINACTIVATE" "winclose" "WINCLOSE" "wincoord" "WINCOORD" "winenabled" "WINENABLED"
"winexists" "WINEXISTS" "winfocus" "WINFOCUS" "winhide" "WINHIDE" "winmaximize" "WINMAXIMIZE"
"winminimize" "WINMINIMIZE" "winmove" "WINMOVE" "winowner" "WINOWNER" "winrestore" "WINRESTORE"
"winshow" "WINSHOW" "winsize" "WINSIZE" "winstate" "WINSTATE" "wintask" "WINTASK"
"wintext" "WINTEXT" "winvisible" "WINVISIBLE"
)
"List of ASPECT Task/Window Manipulation Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-terminal-commands
'(
"clear" "CLEAR" "commandmode" "COMMANDMODE" "getcur" "GETCUR" "locate" "LOCATE"
"sbsave" "SBSAVE" "snapshot" "SNAPSHOT" "termgetc" "TERMGETC" "termgets" "TERMGETS"
"termkey" "TERMKEY" "termmsg" "TERMMSG" "termputc" "TERMPUTC" "termputs" "TERMPUTS"
"termreadc" "TERMREADC" "termreads" "TERMREADS" "termreset" "TERMRESET" "termvkey" "TERMVKEY"
"termwritec" "TERMWRITEC" "termwrites" "TERMWRITES"
)
"List of ASPECT Terminal Commands keywords.
Used to create the `font-lock-keywords' table.")
(defvar aspect-user-window-commands
'(
"bitmap" "BITMAP" "bitmapbkg" "BITMAPBKG" "dllobject" "DLLOBJECT" "dllobjfile" "DLLOBJFILE"
"dllobjupdt" "DLLOBJUPDT" "hotspot" "HOTSPOT" "icon" "ICON" "iconbutton" "ICONBUTTON"
"metafile" "METAFILE" "metafilebkg" "METAFILEBKG" "objcoord" "OBJCOORD" "objhide" "OBJHIDE"
"objmove" "OBJMOVE" "objpaint" "OBJPAINT" "objpointid" "OBJPOINTID" "objremove" "OBJREMOVE"
"objshow" "OBJSHOW" "pushbutton" "PUSHBUTTON" "uwincreate" "UWINCREATE" "uwinpaint" "UWINPAINT"
"uwinremove" "UWINREMOVE" "uwutowin" "UWUTOWIN" "wintouwu" "WINTOUWU"
)
"List of ASPECT User Window Commands keywords.
Used to create the `font-lock-keywords' table.")
(defun aspect-keyword-anywhere-regexp ( word-list )
"Returns a regexp that finds any of the words in WORD-LIST.
But only if the keyword is surrounded by non-word chars."
(concat "\\<"(regexp-opt word-list t)"\\W"))
(defvar procomm-font-lock-keywords
`(
(,(aspect-keyword-anywhere-regexp aspect-primary-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-types) . font-lock-type-face)
(,(aspect-keyword-anywhere-regexp aspect-clipboard-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-com-commands) . font-lock-function-name-face)
(,(aspect-keyword-anywhere-regexp aspect-date-and-time-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-dialing-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-dialog-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-dos-or-disk-related-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-dynamic-data-exchange-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-fax-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-file-i-o-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-file-transfer-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-general-procomm-plus-commands) . font-lock-function-name-face)
(,(aspect-keyword-anywhere-regexp aspect-general-windows-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-keyboard-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-internet-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-memory-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-menu-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-option-set-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-numeric-string-conversion-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-oem-ansi-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-packet-mode-commands) . font-lock-keyword-face)
(,(regexp-opt aspect-preprocessor-commands) . font-lock-builtin-face)
(,(aspect-keyword-anywhere-regexp aspect-printer-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-script-control-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-string-commands) . font-lock-function-name-face)
(,(aspect-keyword-anywhere-regexp aspect-task-window-manipulation-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-terminal-commands) . font-lock-keyword-face)
(,(aspect-keyword-anywhere-regexp aspect-user-window-commands) . font-lock-keyword-face)
))
(defun procomm-indent-line ()
"Indent current line as PROCOMM Aspect script code."
(interactive)
(beginning-of-line)
(if (bobp)
(indent-line-to 0)
(let ((not-indented t) cur-indent (is-case nil))
(if (looking-at "^[ \t]*case")
(setq is-case t))
(if (or (looking-at "^[ \t]*endproc")
(looking-at "^[ \t]*endif")
(looking-at "^[ \t]*else")
(looking-at "^[ \t]*elseif")
(looking-at "^[ \t]*endfor")
(looking-at "^[ \t]*endswitch")
(looking-at "^[ \t]*endcase")
(looking-at "^[ \t]*endwhile")
(looking-at "^[ \t]*enddialog"))
(progn
(save-excursion
(forward-line -1)
(while (looking-at "^$")
(forward-line -1)
)
(if (not (or (looking-at "^[ \t]*proc")
(looking-at "^[ \t]*if")
(looking-at "^[ \t]*else")
(looking-at "^[ \t]*elseif")
(looking-at "^[ \t]*for")
(looking-at "^[ \t]*switch")
(looking-at "^[ \t]*case")
(looking-at "^[ \t]*default")
(looking-at "^[ \t]*while")
(looking-at "^[ \t]*dialogbox")))
(setq cur-indent (- (current-indentation) tab-width))
(setq cur-indent (current-indentation))))
(if (< cur-indent 0)
(setq cur-indent 0)))
(save-excursion
(while not-indented
(forward-line -1)
(if (or (looking-at "^[ \t]*endproc")
(looking-at "^[ \t]*endif")
(looking-at "^[ \t]*endfor")
(looking-at "^[ \t]*endswitch")
(looking-at "^[ \t]*endcase")
(looking-at "^[ \t]*endwhile")
(looking-at "^[ \t]*enddialog"))
(progn
(setq cur-indent (current-indentation))
(setq not-indented nil))
(if (or (looking-at "^[ \t]*proc")
(looking-at "^[ \t]*if")
(looking-at "^[ \t]*else")
(looking-at "^[ \t]*elseif")
(looking-at "^[ \t]*for")
(looking-at "^[ \t]*switch")
(looking-at "^[ \t]*case")
(looking-at "^[ \t]*default")
(looking-at "^[ \t]*while")
(looking-at "^[ \t]*dialogbox"))
(progn
(if (and (looking-at "^[ \t]*case") is-case)
(setq cur-indent (current-indentation) )
(setq cur-indent (+ (current-indentation) tab-width))
)
(setq not-indented nil))
(if (bobp)
(setq not-indented nil)))))))
(if cur-indent
(indent-line-to cur-indent)
(indent-line-to 0)))))
(defvar procomm-mode-syntax-table
(let ((procomm-mode-syntax-table (make-syntax-table)))
(modify-syntax-entry ?_ "w" procomm-mode-syntax-table)
(modify-syntax-entry ?\
(modify-syntax-entry ?\n "> " procomm-mode-syntax-table)
procomm-mode-syntax-table)
"Syntax table for procomm-mode")
(defun procomm-mode ()
(interactive)
(kill-all-local-variables)
(setq major-mode 'procomm-mode)
(use-local-map procomm-mode-map)
(set-syntax-table procomm-mode-syntax-table)
(set (make-local-variable 'font-lock-defaults) '(procomm-font-lock-keywords))
(set (make-local-variable 'indent-line-function) 'procomm-indent-line)
(set (make-local-variable 'comment-start) "\;\;")
(setq major-mode 'procomm-mode)
(setq mode-name "Procomm")
(run-hooks 'procomm-mode-hook)
)
(provide 'procomm-mode)