summaryrefslogtreecommitdiff
path: root/lisp/progmodes/idlwave.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/idlwave.el')
-rw-r--r--lisp/progmodes/idlwave.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index b290854e1b9..81f74dc1fa1 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2004,7 +2004,7 @@ Returns non-nil if abbrev is left expanded."
Moves to end of line if there is no comment delimiter.
Ignores comment delimiters in strings.
Returns point if comment found and nil otherwise."
- (let ((eos (point-at-eol))
+ (let ((eos (line-end-position))
(data (match-data))
found)
;; Look for first comment delimiter not in a string
@@ -2054,7 +2054,7 @@ Also checks if the correct END statement has been used."
;;(backward-char 1)
(let* ((pos (point-marker))
(last-abbrev-marker (copy-marker last-abbrev-location))
- (eol-pos (point-at-eol))
+ (eol-pos (line-end-position))
begin-pos end-pos end end1 )
(if idlwave-reindent-end (idlwave-indent-line))
(setq last-abbrev-location (marker-position last-abbrev-marker))
@@ -3202,7 +3202,7 @@ ignored."
(beginning-of-line)
(setq bcl (point))
(re-search-forward (concat "^[ \t]*" comment-start "+")
- (point-at-eol) t)
+ (line-end-position) t)
;; Get the comment leader on the line and its length
(setq pre (current-column))
;; the comment leader is the indentation plus exactly the
@@ -3210,7 +3210,8 @@ ignored."
(setq fill-prefix-reg
(concat
(setq fill-prefix
- (regexp-quote (buffer-substring (point-at-bol) (point))))
+ (regexp-quote (buffer-substring (line-beginning-position)
+ (point))))
"[^;]"))
;; Mark the beginning and end of the paragraph
@@ -3264,7 +3265,7 @@ ignored."
(setq indent hang)
(beginning-of-line)
(while (> (point) start)
- (re-search-forward comment-start-skip (point-at-eol) t)
+ (re-search-forward comment-start-skip (line-end-position) t)
(if (> (setq diff (- indent (current-column))) 0)
(progn
(if (>= here (point))
@@ -3286,7 +3287,7 @@ ignored."
(setq indent
(min indent
(progn
- (re-search-forward comment-start-skip (point-at-eol) t)
+ (re-search-forward comment-start-skip (line-end-position) t)
(current-column))))
(forward-line -1)))
(setq fill-prefix (concat fill-prefix
@@ -3296,7 +3297,7 @@ ignored."
(setq first-indent
(max
(progn
- (re-search-forward comment-start-skip (point-at-eol) t)
+ (re-search-forward comment-start-skip (line-end-position) t)
(current-column))
indent))
@@ -3334,11 +3335,11 @@ If not found returns nil."
(if idlwave-use-last-hang-indent
(save-excursion
(end-of-line)
- (if (re-search-backward idlwave-hang-indent-regexp (point-at-bol) t)
+ (if (re-search-backward idlwave-hang-indent-regexp (line-beginning-position) t)
(+ (current-column) (length idlwave-hang-indent-regexp))))
(save-excursion
(beginning-of-line)
- (if (re-search-forward idlwave-hang-indent-regexp (point-at-eol) t)
+ (if (re-search-forward idlwave-hang-indent-regexp (line-end-position) t)
(current-column)))))
(defun idlwave-auto-fill ()
@@ -3386,7 +3387,7 @@ if `idlwave-auto-fill-split-string' is non-nil."
;; Remove whitespace between comment delimiter and
;; text, insert spaces for appropriate indentation.
(beginning-of-line)
- (re-search-forward comment-start-skip (point-at-eol) t)
+ (re-search-forward comment-start-skip (line-end-position) t)
(delete-horizontal-space)
(idlwave-indent-to indent)
(goto-char (- (point-max) here)))))
@@ -3548,7 +3549,7 @@ constants - a double quote followed by an octal digit."
;; Because single and double quotes can quote each other we must
;; search for the string start from the beginning of line.
(let* ((start (point))
- (eol (point-at-eol))
+ (eol (line-end-position))
(bq (progn (beginning-of-line) (point)))
(endq (point))
(data (match-data))
@@ -3626,7 +3627,7 @@ unless the optional second argument NOINDENT is non-nil."
(setq s1 (downcase s1) s2 (downcase s2)))
(idlwave-abbrev-change-case
(setq s1 (upcase s1) s2 (upcase s2))))
- (let ((beg (point-at-bol))
+ (let ((beg (line-beginning-position))
end)
(if (not (looking-at "\\s-*\n"))
(open-line 1))