diff options
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/eudc.el | 2 | ||||
-rw-r--r-- | lisp/net/imap.el | 2 | ||||
-rw-r--r-- | lisp/net/ldap.el | 2 | ||||
-rw-r--r-- | lisp/net/newst-treeview.el | 7 | ||||
-rw-r--r-- | lisp/net/pop3.el | 2 | ||||
-rw-r--r-- | lisp/net/rcirc.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp-adb.el | 4 | ||||
-rw-r--r-- | lisp/net/tramp-cmds.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp-crypt.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp-sh.el | 27 | ||||
-rw-r--r-- | lisp/net/tramp-smb.el | 4 | ||||
-rw-r--r-- | lisp/net/tramp-sshfs.el | 2 | ||||
-rw-r--r-- | lisp/net/tramp-sudoedit.el | 6 | ||||
-rw-r--r-- | lisp/net/tramp.el | 18 |
14 files changed, 42 insertions, 40 deletions
diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index eb440ba6144..40cb25fca20 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -856,7 +856,7 @@ non-nil, collect results from all servers." (let* ((end (point)) (beg (save-excursion (if (re-search-backward "\\([:,]\\|^\\)[ \t]*" - (point-at-bol) 'move) + (line-beginning-position) 'move) (goto-char (match-end 0))) (point))) (query-words (split-string (buffer-substring-no-properties beg end) diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 0b6488292de..fe78fbe8339 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -2556,7 +2556,7 @@ Return nil if no complete line has arrived." ;; next line for Courier IMAP bug. (skip-chars-forward " ") (point))) - (> (skip-chars-forward "^ )" (point-at-eol)) 0)) + (> (skip-chars-forward "^ )" (line-end-position)) 0)) (push (buffer-substring start (point)) flag-list)) (cl-assert (eq (char-after) ?\)) nil "In imap-parse-flag-list 2") (imap-forward) diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 0f2943cbb03..5e14589d19b 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -694,7 +694,7 @@ an alist of attribute/value pairs." (while (progn (skip-chars-forward " \t\n") (not (eobp))) - (setq dn (buffer-substring (point) (point-at-eol))) + (setq dn (buffer-substring (point) (line-end-position))) (forward-line 1) (while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\ \\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\ diff --git a/lisp/net/newst-treeview.el b/lisp/net/newst-treeview.el index e98767ae7c7..a1ac55bc7af 100644 --- a/lisp/net/newst-treeview.el +++ b/lisp/net/newst-treeview.el @@ -541,7 +541,7 @@ The sort function is chosen according to the value of (let ((inhibit-read-only t)) (goto-char (point-min)) (while (not (eobp)) - (let* ((pos (point-at-eol)) + (let* ((pos (line-end-position)) (item (get-text-property (point) :nt-item)) (age (newsticker--age item)) (selected (get-text-property (point) :nt-selected)) @@ -579,7 +579,8 @@ The sort function is chosen according to the value of (newsticker--treeview-list-clear-highlight) (with-current-buffer (newsticker--treeview-list-buffer) (let ((inhibit-read-only t)) - (put-text-property (point-at-bol) (point-at-eol) :nt-selected t)) + (put-text-property (line-beginning-position) (line-end-position) + :nt-selected t)) (newsticker--treeview-list-update-faces))) (defun newsticker--treeview-list-highlight-start () @@ -1080,7 +1081,7 @@ Arguments are ignored." (with-current-buffer (newsticker--treeview-tree-buffer) (goto-char pos) (move-overlay newsticker--tree-selection-overlay - (point-at-bol) (1+ (point-at-eol)) + (line-beginning-position) (1+ (line-end-position)) (current-buffer))) (if (window-live-p (newsticker--treeview-tree-window)) (set-window-point (newsticker--treeview-tree-window) pos))))) diff --git a/lisp/net/pop3.el b/lisp/net/pop3.el index de225d76dcc..9d59ddf978d 100644 --- a/lisp/net/pop3.el +++ b/lisp/net/pop3.el @@ -469,7 +469,7 @@ Return non-nil if it is necessary to update the local UIDL file." (delete-char -3) (if (eq (char-before) ?\)) (insert ")\n ") - (goto-char (1+ (point-at-bol))) + (goto-char (1+ (line-beginning-position))) (delete-region (point) (point-max))))) (when (eq (char-before) ? ) (delete-char -2)) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 065398b64af..71505dcaa39 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1640,7 +1640,7 @@ Create the buffer if it doesn't exist." (goto-char (point-max)) (when (not (equal 0 (- (point) rcirc-prompt-end-marker))) ;; delete a trailing newline - (when (eq (point) (point-at-bol)) + (when (eq (point) (line-beginning-position)) (delete-char -1)) (let ((input (buffer-substring-no-properties rcirc-prompt-end-marker (point)))) diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 170583f608c..be231fcba63 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -1198,12 +1198,12 @@ FMT and ARGS are passed to `error'." (let ((inhibit-read-only t)) (goto-char (point-min)) ;; ADB terminal sends "^H" sequences. - (when (re-search-forward "<\b+" (point-at-eol) t) + (when (re-search-forward "<\b+" (line-end-position) t) (forward-line 1) (delete-region (point-min) (point))) ;; Delete the prompt. (goto-char (point-min)) - (when (re-search-forward prompt (point-at-eol) t) + (when (re-search-forward prompt (line-end-position) t) (forward-line 1) (delete-region (point-min) (point))) (when (tramp-search-regexp prompt) diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index f7704864ec6..b2a68fc5eba 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -694,7 +694,7 @@ buffer in your bug report. (setq buffer-read-only nil) (goto-char (point-min)) (while (not (eobp)) - (if (re-search-forward tramp-buf-regexp (point-at-eol) t) + (if (re-search-forward tramp-buf-regexp (line-end-position) t) (forward-line 1) (forward-line 0) (let ((start (point))) diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el index 27b359d439b..657437b283c 100644 --- a/lisp/net/tramp-crypt.el +++ b/lisp/net/tramp-crypt.el @@ -437,7 +437,7 @@ Otherwise, return NAME." (if (eq op 'encrypt) "Encoding" "Decoding") name)) (with-current-buffer (tramp-get-connection-buffer crypt-vec) (goto-char (point-min)) - (buffer-substring (point-min) (point-at-eol))))))) + (buffer-substring (point-min) (line-end-position))))))) ;; Nothing to do. name)) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5075394d432..ca08c6f0b3d 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1188,7 +1188,7 @@ component is used as the target of the symlink." (tramp-shell-quote-argument localname))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-min)) - (buffer-substring (point-min) (point-at-eol)))) + (buffer-substring (point-min) (line-end-position)))) ;; Use Perl implementation. ((and (tramp-get-remote-perl v) @@ -1334,7 +1334,7 @@ component is used as the target of the symlink." (setq res-symlink-target (if (looking-at-p "\"") (read (current-buffer)) - (buffer-substring (point) (point-at-eol))))) + (buffer-substring (point) (line-end-position))))) (forward-line) ;; ... file mode flags (read (current-buffer)) @@ -1416,7 +1416,7 @@ component is used as the target of the symlink." (format "%s -ild %s" (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) - (setq attr (buffer-substring (point) (point-at-eol)))) + (setq attr (buffer-substring (point) (line-end-position)))) (tramp-set-file-property v localname "visited-file-modtime-ild" attr)) (setq last-coding-system-used coding-system-used) @@ -1460,7 +1460,7 @@ of." (tramp-get-ls-command v) (tramp-shell-quote-argument localname))) (with-current-buffer (tramp-get-buffer v) - (setq attr (buffer-substring (point) (point-at-eol)))) + (setq attr (buffer-substring (point) (line-end-position)))) (equal attr (tramp-get-file-property @@ -1517,7 +1517,7 @@ VEC or USER, or if there is no home directory, return nil." (concat "~" (or user (tramp-file-name-user vec)))))) (with-current-buffer (tramp-get-buffer vec) (goto-char (point-min)) - (buffer-substring (point) (point-at-eol))))) + (buffer-substring (point) (line-end-position))))) (defun tramp-sh-handle-get-remote-uid (vec id-format) "The uid of the remote connection VEC, in ID-FORMAT. @@ -1582,7 +1582,7 @@ ID-FORMAT valid values are `string' and `integer'." (tramp-shell-quote-argument localname)))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-min)) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq context (list (match-string 1) (match-string 2) (match-string 3) (match-string 4)))))) ;; Return the context. @@ -1817,7 +1817,7 @@ ID-FORMAT valid values are `string' and `integer'." (tramp-error v 'file-error "tramp-sh-handle-file-name-all-completions: %s" - (buffer-substring (point) (point-at-eol)))) + (buffer-substring (point) (line-end-position)))) ;; For peace of mind, if buffer doesn't end in `fail' ;; then it should end in `ok'. If neither are in the ;; buffer something went seriously wrong on the remote @@ -1830,7 +1830,7 @@ ID-FORMAT valid values are `string' and `integer'." (tramp-shell-quote-argument localname) (buffer-string)))) (while (zerop (forward-line -1)) - (push (buffer-substring (point) (point-at-eol)) result))) + (push (buffer-substring (point) (line-end-position)) result))) result)))))) ;; cp, mv and ln @@ -3124,7 +3124,8 @@ implementation will be used." (tramp-shell-quote-argument (format "kill -%d $$" i)))) (with-current-buffer (tramp-get-connection-buffer vec) (goto-char (point-min)) - (buffer-substring (point-at-bol) (point-at-eol))))) + (buffer-substring (line-beginning-position) + (line-end-position))))) (if (string-empty-p res) (format "Signal %d" i) res))) @@ -4087,8 +4088,8 @@ This function expects to be in the right *tramp* buffer." (when (search-backward "tramp_executable " nil t) (skip-chars-forward "^ ") (skip-chars-forward " ") - (setq result (buffer-substring (point) (point-at-eol))))) - result))) + (setq result (buffer-substring (point) (line-end-position))))) + result))) ;; On hydra.nixos.org, the $PATH environment variable is too long to ;; send it. This is likely not due to PATH_MAX, but PIPE_BUF. We @@ -5276,7 +5277,7 @@ function waits for output unless NOOUTPUT is set." ;; A simple-minded busybox has sent " ^H" sequences. ;; Delete them. (goto-char (point-min)) - (when (re-search-forward "^\\(.\b\\)+$" (point-at-eol) t) + (when (re-search-forward "^\\(.\b\\)+$" (line-end-position) t) (forward-line 1) (delete-region (point-min) (point))) ;; Delete the prompt. @@ -5368,7 +5369,7 @@ raises an error." (unless noerror signal-hook-function))) (read (current-buffer))) ;; Error handling. - (when (re-search-forward "\\S-" (point-at-eol) t) + (when (re-search-forward "\\S-" (line-end-position) t) (error nil))) (error (unless noerror (tramp-error diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index a81a8f13636..ba0a1d3598f 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -1763,7 +1763,7 @@ If SHARE is result, entries are of type dir. Otherwise, shares are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." ;; We are called from `tramp-smb-get-file-entries', which sets the ;; current buffer. - (let ((line (buffer-substring (point) (point-at-eol))) + (let ((line (buffer-substring (point) (line-end-position))) localname mode size month day hour min sec year mtime) (if (not share) @@ -1877,7 +1877,7 @@ are listed. Result is the list (LOCALNAME MODE SIZE MTIME)." (member "pathnames" (split-string - (buffer-substring (point) (point-at-eol)) nil 'omit))))))))) + (buffer-substring (point) (line-end-position)) nil 'omit))))))))) (defun tramp-smb-get-stat-capability (vec) "Check whether the SMB server supports the `stat' command." diff --git a/lisp/net/tramp-sshfs.el b/lisp/net/tramp-sshfs.el index a9225db434e..4e3b94277be 100644 --- a/lisp/net/tramp-sshfs.el +++ b/lisp/net/tramp-sshfs.el @@ -215,7 +215,7 @@ arguments to pass to the OPERATION." (progn ;; Read the expression. (goto-char (point-min)) - (buffer-substring (point) (point-at-eol))) + (buffer-substring (point) (line-end-position))) ":" 'omit)))) ;; The equivalent to `exec-directory'. `(,(tramp-file-local-name (expand-file-name default-directory))))) diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el index 0de2e0ef69a..643b5f35c0f 100644 --- a/lisp/net/tramp-sudoedit.el +++ b/lisp/net/tramp-sudoedit.el @@ -512,7 +512,7 @@ the result will be a local, non-Tramp, file name." (tramp-compat-file-name-unquote localname))) (with-current-buffer (tramp-get-connection-buffer v) (goto-char (point-min)) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq context (list (match-string 1) (match-string 2) (match-string 3) (match-string 4)))))) ;; Return the context. @@ -752,7 +752,7 @@ ID-FORMAT valid values are `string' and `integer'." (delete-region (point-min) (point)) ;; Delete empty lines. (goto-char (point-min)) - (while (and (not (eobp)) (= (point) (point-at-eol))) + (while (and (not (eobp)) (= (point) (line-end-position))) (forward-line)) (delete-region (point-min) (point)) (tramp-message vec 3 "Process has finished.") @@ -841,7 +841,7 @@ In case there is no valid Lisp expression, it raises an error." (condition-case nil (prog1 (read (current-buffer)) ;; Error handling. - (when (re-search-forward "\\S-" (point-at-eol) t) + (when (re-search-forward "\\S-" (line-end-position) t) (error nil))) (error (tramp-error vec 'file-error diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ed40245e8a0..238ec50c40f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3203,7 +3203,7 @@ for all methods. Resulting data are derived from default settings." "Return a (user host) tuple allowed to access. User is always nil." (let (result) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq result (list nil (match-string match-level)))) (or (> (skip-chars-forward skip-chars) 0) @@ -3236,7 +3236,7 @@ Either user or host may be nil." (concat "^\\(" tramp-host-regexp "\\)" "\\([ \t]+" "\\(" tramp-user-regexp "\\)" "\\)?"))) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq result (append (list (match-string 3) (match-string 1))))) (forward-line 1) result)) @@ -3318,7 +3318,7 @@ Host is always \"localhost\"." Host is always \"localhost\"." (let (result (regexp (concat "^\\(" tramp-user-regexp "\\):"))) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq result (list (match-string 1) "localhost"))) (forward-line 1) result)) @@ -3339,7 +3339,7 @@ Host is always \"localhost\"." "Return a (group host) tuple allowed to access. Host is always \"localhost\"." (let (result - (split (split-string (buffer-substring (point) (point-at-eol)) ":"))) + (split (split-string (buffer-substring (point) (line-end-position)) ":"))) (when (member (user-login-name) (split-string (nth 3 split) "," 'omit)) (setq result (list (nth 0 split) "localhost"))) (forward-line 1) @@ -3374,7 +3374,7 @@ User is always nil." User is always nil." (let (result (regexp (concat (regexp-quote registry) "\\\\\\(.+\\)"))) - (when (re-search-forward regexp (point-at-eol) t) + (when (re-search-forward regexp (line-end-position) t) (setq result (list nil (match-string 1)))) (forward-line 1) result)) @@ -4142,12 +4142,12 @@ Let-bind it when necessary.") (goto-char (point-min)) (while (setq start (text-property-not-all - (point) (point-at-eol) 'dired-filename t)) + (point) (line-end-position) 'dired-filename t)) (delete-region start - (or (text-property-any start (point-at-eol) 'dired-filename t) - (point-at-eol))) - (if (= (point-at-bol) (point-at-eol)) + (or (text-property-any start (line-end-position) 'dired-filename t) + (line-end-position))) + (if (= (line-beginning-position) (line-end-position)) ;; Empty line. (delete-region (point) (progn (forward-line) (point))) (forward-line))))))))) |