aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/net
diff options
context:
space:
mode:
authorMichael Albinus2009-09-04 08:15:28 +0000
committerMichael Albinus2009-09-04 08:15:28 +0000
commit73d854cdd53f391afeef974862a27d5fe77338da (patch)
treedc19dfa4211d5ffa6e8ba2f67b0b21952adc7a70 /lisp/net
parent7ba1d9c24dcd163aaabedf92dd766c2100439dbd (diff)
downloademacs-73d854cdd53f391afeef974862a27d5fe77338da.tar.gz
emacs-73d854cdd53f391afeef974862a27d5fe77338da.zip
* net/tramp-compat.el (tramp-compat-line-beginning-position): New defun.
Diffstat (limited to 'lisp/net')
-rw-r--r--lisp/net/tramp-compat.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index 3a10a0c3c37..96c8bd86b77 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -143,6 +143,16 @@
143 (tramp-file-name-handler 143 (tramp-file-name-handler
144 'set-file-times filename time)))))) 144 'set-file-times filename time))))))
145 145
146(defsubst tramp-compat-line-beginning-position ()
147 "Return point at beginning of line (compat function).
148Calls `line-beginning-position' or `point-at-bol' if defined, else
149own implementation."
150 (cond
151 ((fboundp 'line-beginning-position)
152 (funcall (symbol-function 'line-beginning-position)))
153 ((fboundp 'point-at-bol) (funcall (symbol-function 'point-at-bol)))
154 (t (save-excursion (beginning-of-line) (point)))))
155
146(defsubst tramp-compat-line-end-position () 156(defsubst tramp-compat-line-end-position ()
147 "Return point at end of line (compat function). 157 "Return point at end of line (compat function).
148Calls `line-end-position' or `point-at-eol' if defined, else 158Calls `line-end-position' or `point-at-eol' if defined, else