# HG changeset patch # User Werner LEMBERG # Date 1139001188 0 # Node ID 8b39fc927b5ed1aa55e40d47caecd4cb22066cd7 # Parent 164eb9d4f12420f5a57c09c919fd6a7675aee983 * textmodes/nroff-mode.el (nroff-font-lock-keywords): Don't be greedy to find the closing bracket in \*[...] and similar expressions. This is a first rough fix -- many additional refinements are necessary to make this nroff mode really usable with groff. diff -r 164eb9d4f124 -r 8b39fc927b5e lisp/ChangeLog --- a/lisp/ChangeLog Fri Feb 03 20:27:35 2006 +0000 +++ b/lisp/ChangeLog Fri Feb 03 21:13:08 2006 +0000 @@ -1,3 +1,11 @@ +2006-02-03 Werner Lemberg + + * textmodes/nroff-mode.el (nroff-font-lock-keywords): Don't be + greedy to find the closing bracket in \*[...] and similar + expressions. This is a first rough fix -- many additional + refinements are necessary to make this nroff mode really usable with + groff. + 2006-02-03 Jens Petersen (tiny change) * international/mule-cmds.el (set-locale-environment): Add diff -r 164eb9d4f124 -r 8b39fc927b5e lisp/textmodes/nroff-mode.el --- a/lisp/textmodes/nroff-mode.el Fri Feb 03 20:27:35 2006 +0000 +++ b/lisp/textmodes/nroff-mode.el Fri Feb 03 21:13:08 2006 +0000 @@ -1,7 +1,7 @@ ;;; nroff-mode.el --- GNU Emacs major mode for editing nroff source ;; Copyright (C) 1985, 1986, 1994, 1995, 1997, 2001, 2002, 2003, -;; 2004, 2005 Free Software Foundation, Inc. +;; 2004, 2005, 2006 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: wp @@ -86,14 +86,14 @@ ;; variants). This won't currently do groff's \A'foo' and ;; the like properly. One might expect it to highlight an escape's ;; arguments in common cases, like \f. - (concat "\\\\" ; backslash - "\\(" ; followed by various possibilities - (mapconcat 'identity - '("[f*n]*\\[.+]" ; some groff extensions - "(.." ; two chars after ( - "[^(\"]" ; single char escape - ) "\\|") - "\\)") + (concat "\\\\" ; backslash + "\\(" ; followed by various possibilities + (mapconcat 'identity + '("[f*n]*\\[.+?]" ; some groff extensions + "(.." ; two chars after ( + "[^(\"]" ; single char escape + ) "\\|") + "\\)") ) "Font-lock highlighting control in `nroff-mode'." :group 'nroff