diff options
| author | Michael Albinus | 2009-09-04 08:15:28 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-09-04 08:15:28 +0000 |
| commit | 73d854cdd53f391afeef974862a27d5fe77338da (patch) | |
| tree | dc19dfa4211d5ffa6e8ba2f67b0b21952adc7a70 | |
| parent | 7ba1d9c24dcd163aaabedf92dd766c2100439dbd (diff) | |
| download | emacs-73d854cdd53f391afeef974862a27d5fe77338da.tar.gz emacs-73d854cdd53f391afeef974862a27d5fe77338da.zip | |
* net/tramp-compat.el (tramp-compat-line-beginning-position): New defun.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/net/tramp-compat.el | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 77bd47f3f30..3aebf7aa7f9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-09-04 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-handle-insert-directory): Handle "--dired" | ||
| 4 | also when adding a new directory. | ||
| 5 | |||
| 6 | * net/tramp-compat.el (tramp-compat-line-beginning-position): New | ||
| 7 | defun. | ||
| 8 | |||
| 1 | 2009-09-04 Stefan Monnier <monnier@iro.umontreal.ca> | 9 | 2009-09-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 10 | ||
| 3 | * files.el (locate-file-completion-table): Make it provide boundary | 11 | * files.el (locate-file-completion-table): Make it provide boundary |
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). | ||
| 148 | Calls `line-beginning-position' or `point-at-bol' if defined, else | ||
| 149 | own 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). |
| 148 | Calls `line-end-position' or `point-at-eol' if defined, else | 158 | Calls `line-end-position' or `point-at-eol' if defined, else |