[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnubol: which list, and cobol.el
Which is the official list nowadays? :) Good to have a home. I've had
a temporary position change at work (going to do 2nd tier support for a
while--blech!), so I think I'll have a little more time to devote to
coding.
Made a couple small but noticeable improvements to cobol.el. Noteably,
added a change log:
;; - Changed a '-' in the cobol-mode-syntax table to be a word
;; character instead of a punctuation character, because a
;; '-' is so often used in data item and paragraph names
;; - Changed the syntax highlighting so that successive categories
;; do not overlay previously evaluated categories of syntax
Indenting works somewhat better, I think, so I'm going to leave it alone
for a while. I'm still looking for a better way to do syntax
highlighting--as much as I love and worship regular expressions, they
sure do take a long time!
If you want to use this all the time for editing COBOL with emacs,
here's some basic instructions, in case you're not sure how.
Place cobol.el in your emacs lisp/progmodes directory, and open it with
emacs. Do a Emacs-Lisp|Byte-Compile this File. This will leave a
cobol.elc in the lisp/progmodes directory.
In you .emacs, add/modify the following. The auto-mode-alist IS case
sensitive (not sure why, when some many other things AREN'T!!):
(autoload 'cobol-mode "cobol" "Mode for editing COBOL source files" t)
(add-hook 'cobol-mode-hook
'(lambda ()
(set (make-local-variable 'dabbrev-case-fold-search) t)
(set (make-local-variable 'dabbrev-case-replace) t)))
(if first-time
(setq auto-mode-alist
(append '(("\\.cpp$" . c++-mode)
("\\.hpp$" . c++-mode)
("\\.lsp$" . lisp-mode)
("\\.scm$" . scheme-mode)
("\\.pl$" . cperl-mode)
("\\.cbl$" . cobol-mode)
("\\.CBL$" . cobol-mode)
("\\.cob$" . cobol-mode)
("\\.COB$" . cobol-mode)
("\\.CPY$" . cobol-mode)
("\\.cpy$" . cobol-mode)
) auto-mode-alist)))
;; Auto font lock mode
(defvar font-lock-auto-mode-list
(list 'c-mode 'c++-mode 'c++-c-mode 'emacs-lisp-mode 'lisp-mode
'cperl-mode
'scheme-mode 'scribe-mode 'shell-script-mode 'cobol-mode 'dired-mode)
"List of modes to always start in font-lock-mode")
(defvar font-lock-mode-keyword-alist
'((c++-c-mode . c-font-lock-keywords)
(cperl-mode . perl-font-lock-keywords)
(cobol-mode . cobol-font-lock-keywords)
(dired-mode . dired-font-lock-keywords))
"Associations between modes and keywords")
Re-eval your .emacs and open a cobol file. Should work just peachy--if
not, try exiting emacs and restarting it.
ciao,
--
Matthew Vanecek
perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
********************************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me.
I'm always getting in the way of something...
cobol.el.gz
- Prev by Date:
gnubol: re:from Lorraine - Philippines $0.23, Japan $.09,china $.31,malaysia$.18 and more,cant bet these rates.
- Next by Date:
Re: gnubol: which list, and cobol.el
- Prev by thread:
gnubol: re:from Lorraine - Philippines $0.23, Japan $.09,china $.31,malaysia$.18 and more,cant bet these rates.
- Next by thread:
Re: gnubol: which list, and cobol.el
- Index(es):