branch: elpa/web-mode
commit f4ba374108889affe263503272a6e26338e9e654
Author: Ola Nilsson <[email protected]>
Commit: Ola Nilsson <[email protected]>

    Use line-beginning-position and line-end-position
    
    ... instead of obsolete point-at-bol and point-at-eol.
---
 web-mode.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/web-mode.el b/web-mode.el
index 5bd7aa3fb7..44ffc4e041 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -4351,7 +4351,7 @@ Also return non-nil if it is the command 
`self-insert-command' is remapped to."
          )
         ((looking-at-p "[ \n]*{")
          (search-forward "{")
-         (search-forward "=>" (point-at-eol) 't)
+         (search-forward "=>" (line-end-position) 't)
          (if (looking-at-p "[ \n]*[<@]")
              (setq continue nil)
              (backward-char)
@@ -11424,9 +11424,9 @@ Prompt user if TAG-NAME isn't provided."
          (delete-region beg end)
          (deactivate-mark)
          (let (beg end)
-           (setq beg (point-at-bol))
+           (setq beg (line-beginning-position))
            (insert content)
-           (setq end (point-at-eol))
+           (setq end (line-end-position))
            (indent-region beg end)
            )
          ) ;when
@@ -11717,7 +11717,7 @@ Prompt user if TAG-NAME isn't provided."
       (setq counter (1+ counter)))
     (when snippet
       (setq snippet (cdr snippet))
-      (setq beg (point-at-bol))
+      (setq beg (line-beginning-position))
       (insert snippet)
       (setq pos (point)
             end (point))
@@ -11738,7 +11738,7 @@ Prompt user if TAG-NAME isn't provided."
         (setq pos (point)
               end (+ end (length sel))))
       (goto-char end)
-      (setq end (point-at-eol))
+      (setq end (line-end-position))
       (unless sel (goto-char pos))
       (indent-region beg end))
     ))
@@ -11775,9 +11775,9 @@ Prompt user if TAG-NAME isn't provided."
 
 (defun web-mode-insert-and-indent (text)
   (let (beg end)
-    (setq beg (point-at-bol))
+    (setq beg (line-beginning-position))
     (insert text)
-    (setq end (point-at-eol))
+    (setq end (line-end-position))
     (indent-region beg end)
     ))
 

Reply via email to