Commit 36e6631c authored by Roland McGrath's avatar Roland McGrath
Browse files

*** empty log message ***

parent 9c95ac44
...@@ -287,28 +287,34 @@ Has a preference of looking backwards." ...@@ -287,28 +287,34 @@ Has a preference of looking backwards."
(progn (forward-sexp 1) (point)))) (progn (forward-sexp 1) (point))))
;; Ordinary C function syntax. ;; Ordinary C function syntax.
(setq beg (point)) (setq beg (point))
(down-list 1) ; into arglist (if (condition-case nil
(backward-up-list 1) ;; Protect against "Unbalanced parens" error.
(skip-chars-backward " \t") (progn
;; Verify initial pos was after real start of function. (down-list 1) ; into arglist
(if (and (save-excursion (backward-up-list 1)
(goto-char beg) (skip-chars-backward " \t")
;; For this purpose, include the line t)
;; that has the decl keywords. (error nil))
;; This may also include some of the comments ;; Verify initial pos was after
;; before the function. ;; real start of function.
(while (and (not (bobp)) (if (and (save-excursion
(save-excursion (goto-char beg)
(forward-line -1) ;; For this purpose, include the line
(looking-at "[^\n\f]"))) ;; that has the decl keywords. This
(forward-line -1)) ;; may also include some of the
(>= location (point))) ;; comments before the function.
;; Consistency check: going down and up (while (and (not (bobp))
;; shouldn't take us back before BEG. (save-excursion
(> (point) beg)) (forward-line -1)
(buffer-substring (point) (looking-at "[^\n\f]")))
(progn (backward-sexp 1) (forward-line -1))
(point))))))))) (>= location (point)))
;; Consistency check: going down and up
;; shouldn't take us back before BEG.
(> (point) beg))
(buffer-substring (point)
(progn (backward-sexp 1)
(point))))))))))
((memq major-mode ((memq major-mode
'(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el '(TeX-mode plain-TeX-mode LaTeX-mode;; tex-mode.el
plain-tex-mode latex-mode;; cmutex.el plain-tex-mode latex-mode;; cmutex.el
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment