]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-compat.el (tramp-compat-line-beginning-position): New defun.
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 4 Sep 2009 08:15:28 +0000 (08:15 +0000)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 4 Sep 2009 08:15:28 +0000 (08:15 +0000)
lisp/ChangeLog
lisp/net/tramp-compat.el

index 77bd47f3f3027b427748d5c10034dba56d453fc1..3aebf7aa7f90f074c9a21c306117fefe61af8e48 100644 (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
index 3a10a0c3c371ae603c455ad80a5bc06ea8b9caf8..96c8bd86b77dab9dd4911b76db7063f24e4f3dd3 100644 (file)
          (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