March 21, 2009

GNU Emacs 23, Mac OS X and fonts

After several weeks, had rebuilt theŠ» GNU Emacs from CVS and start to work with it under Mac OS X. In latest builds, use of anti-aliased fonts is disable by default, so text looks very bad :-( In mailing list i got a hint about the ns-antialias-text variable (not available via customize), that should be set to non-nil value, and than anti-aliased fonts will enabled, like in Carbon Emacs.

March 6, 2009

Small addition to sh-mode

Below is piece of code, that could be useful for all, who write shell scripts in Emacs. It provides sh-check-syntax function, that performs syntax checking (currently only for sh/bash/zsh) and navigation between errors, if they found. It's better to bind this function to some key (i use C-c l)
(defun sh-check-finish-hook (buf msg)
"Function, that is executed at the end of sh check"
(when (not (string-match "finished" msg))
(next-error 1 t)))

(define-compilation-mode sh-check-mode "SH"
"Mode for check sh source code."
(set (make-local-variable 'compilation-disable-input) t)
(set (make-local-variable 'compilation-scroll-output) nil)
(set (make-local-variable 'compilation-finish-functions)
(list 'sh-check-finish-hook))
)

(defun sh-check-syntax ()
"Check syntax of current file"
(interactive)
(when (string-match "^\\(ba\\|z\\)sh" (symbol-name sh-shell))
(save-some-buffers t)
(compilation-start (concat (symbol-name sh-shell) " -n " (buffer-file-name))
'sh-check-mode))
)

March 1, 2009

New Cedet pre-release

After almost two years since previous pre-release, Eric M. Ludlam released today a new pre-release version of Cedet - 1.0pre6. This version includes numerous additions of new features, and fixes.