summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
committerMiles Bader <miles@gnu.org>2007-10-19 00:00:21 +0000
commit9c8020a8df03dc67a56d7df15664dcf7ace54bf0 (patch)
tree09b0646addff3c39f9e96ba89c04bdcc038a87a7 /lisp/progmodes
parentdfc3268dfa133a2e0a677f1af7c1ee548eae065d (diff)
parentbd3164743080f3eb5fc316aca7cc5322ca58fe33 (diff)
downloademacs-9c8020a8df03dc67a56d7df15664dcf7ace54bf0.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 890-898) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 122-128) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 257-258) - Merge from emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-270
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/cc-menus.el4
-rw-r--r--lisp/progmodes/compile.el15
-rw-r--r--lisp/progmodes/delphi.el2
3 files changed, 14 insertions, 7 deletions
diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el
index 95359689b9f..eced014d4e6 100644
--- a/lisp/progmodes/cc-menus.el
+++ b/lisp/progmodes/cc-menus.el
@@ -106,7 +106,9 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.")
(nil
,(concat
"^\\<" ; line MUST start with word char
- "[^()]*" ; no parentheses before
+ ;; \n added to prevent overflow in regexp matcher.
+ ;; http://lists.gnu.org/archive/html/emacs-pretest-bug/2007-02/msg00021.html
+ "[^()\n]*" ; no parentheses before
"[^" c-alnum "_:<>~]" ; match any non-identifier char
"\\([" c-alpha "_][" c-alnum "_:<>~]*\\)" ; match function name
"\\([ \t\n]\\|\\\\\n\\)*(" ; see above, BUT the arg list
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 9ed7ba09de9..482cfee1b9b 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1658,10 +1658,15 @@ This is the value of `next-error-function' in Compilation buffers."
;; in the same process and buffer).
;; So, recalculate all markers for that file.
(unless (and (nth 3 loc) (marker-buffer (nth 3 loc))
- (equal (nth 4 loc)
- (setq timestamp
- (with-current-buffer (marker-buffer (nth 3 loc))
- (visited-file-modtime)))))
+ ;; There may be no timestamp info if the loc is a `fake-loc'.
+ ;; So we skip the time-check here, although we should maybe
+ ;; change `compilation-fake-loc' to add timestamp info.
+ (or (null (nth 4 loc))
+ (equal (nth 4 loc)
+ (setq timestamp
+ (with-current-buffer
+ (marker-buffer (nth 3 loc))
+ (visited-file-modtime))))))
(with-current-buffer (compilation-find-file marker (caar (nth 2 loc))
(cadr (car (nth 2 loc))))
(save-restriction
@@ -1711,7 +1716,7 @@ region and the first line of the next region."
(or (consp file) (setq file (list file)))
(setq file (compilation-get-file-structure file))
;; Between the current call to compilation-fake-loc and the first occurrence
- ;; of an error message referring to `file', the data is only kept is the
+ ;; of an error message referring to `file', the data is only kept in the
;; weak hash-table compilation-locs, so we need to prevent this entry
;; in compilation-locs from being GC'd away. --Stef
(push file compilation-gcpro)
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 6cbef6f426d..7c2417fde1a 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -1642,7 +1642,7 @@ before the indent, the point is moved to the indent."
(when delphi-newline-always-indents
;; Indent both the (now) previous and current line first.
(save-excursion
- (previous-line 1)
+ (forward-line -1)
(delphi-indent-line))
(delphi-indent-line)))