* net/tramp-compat.el (tramp-compat-line-beginning-position): New defun.

This commit is contained in:
Michael Albinus 2009-09-04 08:15:28 +00:00
parent 7ba1d9c24d
commit 73d854cdd5
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2009-09-04 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-handle-insert-directory): Handle "--dired"
also when adding a new directory.
* net/tramp-compat.el (tramp-compat-line-beginning-position): New
defun.
2009-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
* files.el (locate-file-completion-table): Make it provide boundary

View file

@ -143,6 +143,16 @@
(tramp-file-name-handler
'set-file-times filename time))))))
(defsubst tramp-compat-line-beginning-position ()
"Return point at beginning of line (compat function).
Calls `line-beginning-position' or `point-at-bol' if defined, else
own implementation."
(cond
((fboundp 'line-beginning-position)
(funcall (symbol-function 'line-beginning-position)))
((fboundp 'point-at-bol) (funcall (symbol-function 'point-at-bol)))
(t (save-excursion (beginning-of-line) (point)))))
(defsubst tramp-compat-line-end-position ()
"Return point at end of line (compat function).
Calls `line-end-position' or `point-at-eol' if defined, else