Hello,
people who use the setnu-feature of JDE in conjunction with filladapt.el (IMHO a very
usefull package in combination with cc-mode >= 5.26 (base-major-mode of jde-mode!)
live
dangerous. Calling fill-paragraph or fill-region within a comment can hang Emacs if
setnu-mode is on. This is very annoying because filladapt.el makes writing well
formated comments
very easy and convenient.
But there is simple solution:
(defun my-filling ()
"If a region is active then the region will be filled otherwise current
paragraph."
(interactive)
(setq fill-prefix nil)
;; its very impotant to temporaly deactivate line-numbering if you call
;; functions like fill-paragraph or fill-region because otherwise Emacs
;; will hang if nothing is to fill!!
(let ((old-setnu-mode (and (fboundp 'setnu-mode) setnu-mode)))
(if old-setnu-mode (setnu-mode))
(if mark-active
(fill-region (region-beginning) (region-end))
(fill-paragraph nil))
(if old-setnu-mode (setnu-mode 1))))
(global-set-key (kbd "M-q") 'my-filling)
With something like this setnu-mode and filling works perfectly together.
Maybe this helps someone,
Klaus
P.S.
Paul, maybe you could this add to the documentation of jde-setnu-mode-enable?
--
Klaus Berndl mailto: [EMAIL PROTECTED]
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 M�nchen, Germany
Tel +49 89 63812-392, Fax -220