aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2003-05-13 20:48:15 +0000
committerStefan Monnier2003-05-13 20:48:15 +0000
commitf7a2f2c6543d35057fa994c91f47271d6c951ec3 (patch)
treebf23a0e550fd66dceb4bc0081d67474ea495e98f
parentea6a015d2ec79ac6ce3614f0ef3cb62d8baa2e7b (diff)
downloademacs-f7a2f2c6543d35057fa994c91f47271d6c951ec3.tar.gz
emacs-f7a2f2c6543d35057fa994c91f47271d6c951ec3.zip
(ada-in-comment-p, ada-in-string-p)
(ada-in-string-or-comment-p): Use line-beginning-position.
-rw-r--r--lisp/progmodes/ada-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index e9fd8c06cc3..1e81b22d412 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -956,20 +956,20 @@ OLD-LEN indicates what the length of the replaced text was."
956 "Returns t if inside a comment." 956 "Returns t if inside a comment."
957 (nth 4 (or parse-result 957 (nth 4 (or parse-result
958 (parse-partial-sexp 958 (parse-partial-sexp
959 (save-excursion (beginning-of-line) (point)) (point))))) 959 (line-beginning-position) (point)))))
960 960
961(defsubst ada-in-string-p (&optional parse-result) 961(defsubst ada-in-string-p (&optional parse-result)
962 "Returns t if point is inside a string. 962 "Returns t if point is inside a string.
963If parse-result is non-nil, use is instead of calling parse-partial-sexp." 963If parse-result is non-nil, use is instead of calling parse-partial-sexp."
964 (nth 3 (or parse-result 964 (nth 3 (or parse-result
965 (parse-partial-sexp 965 (parse-partial-sexp
966 (save-excursion (beginning-of-line) (point)) (point))))) 966 (line-beginning-position) (point)))))
967 967
968(defsubst ada-in-string-or-comment-p (&optional parse-result) 968(defsubst ada-in-string-or-comment-p (&optional parse-result)
969 "Returns t if inside a comment or string." 969 "Returns t if inside a comment or string."
970 (setq parse-result (or parse-result 970 (setq parse-result (or parse-result
971 (parse-partial-sexp 971 (parse-partial-sexp
972 (save-excursion (beginning-of-line) (point)) (point)))) 972 (line-beginning-position) (point))))
973 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result))) 973 (or (ada-in-string-p parse-result) (ada-in-comment-p parse-result)))
974 974
975 975
@@ -1071,7 +1071,7 @@ name"
1071;;;###autoload 1071;;;###autoload
1072(defun ada-mode () 1072(defun ada-mode ()
1073 "Ada mode is the major mode for editing Ada code. 1073 "Ada mode is the major mode for editing Ada code.
1074This version was built on $Date: 2003/05/04 13:55:51 $. 1074This version was built on $Date: 2003/05/04 19:52:34 $.
1075 1075
1076Bindings are as follows: (Note: 'LFD' is control-j.) 1076Bindings are as follows: (Note: 'LFD' is control-j.)
1077\\{ada-mode-map} 1077\\{ada-mode-map}