Mercurial > emacs
changeset 50981:b4fef1c0c73b
(ada-in-comment-p, ada-in-string-p)
(ada-in-string-or-comment-p): Use line-beginning-position.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Tue, 13 May 2003 20:48:15 +0000 |
parents | 96a99720aa8b |
children | 5ba37a8fa075 |
files | lisp/progmodes/ada-mode.el |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/ada-mode.el Tue May 13 20:42:19 2003 +0000 +++ b/lisp/progmodes/ada-mode.el Tue May 13 20:48:15 2003 +0000 @@ -956,20 +956,20 @@ "Returns t if inside a comment." (nth 4 (or parse-result (parse-partial-sexp - (save-excursion (beginning-of-line) (point)) (point))))) + (line-beginning-position) (point))))) (defsubst ada-in-string-p (&optional parse-result) "Returns t if point is inside a string. If parse-result is non-nil, use is instead of calling parse-partial-sexp." (nth 3 (or parse-result (parse-partial-sexp - (save-excursion (beginning-of-line) (point)) (point))))) + (line-beginning-position) (point))))) (defsubst ada-in-string-or-comment-p (&optional parse-result) "Returns t if inside a comment or string." (setq parse-result (or parse-result (parse-partial-sexp - (save-excursion (beginning-of-line) (point)) (point)))) + (line-beginning-position) (point)))) (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) @@ -1071,7 +1071,7 @@ ;;;###autoload (defun ada-mode () "Ada mode is the major mode for editing Ada code. -This version was built on $Date: 2003/05/04 13:55:51 $. +This version was built on $Date: 2003/05/04 19:52:34 $. Bindings are as follows: (Note: 'LFD' is control-j.) \\{ada-mode-map}