]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/ztree/ztree-dir.el
Merge remote-tracking branch 'ztree/master'
[gnu-emacs-elpa] / packages / ztree / ztree-dir.el
index d52aef149b292d6100791b8c00b9415d0951ad31..3dd87b7f78e462f598a0b939b6956fc1c52a3c5f 100644 (file)
@@ -1,4 +1,4 @@
-;;; ztree-dir.el --- Text mode directory tree
+;;; ztree-dir.el --- Text mode directory tree -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
 ;;
 
 ;; Copyright (C) 2013-2015  Free Software Foundation, Inc.
 ;;
@@ -84,15 +84,15 @@ user press RETURN on file ")t
   "Insert the header to the ztree buffer."
   (let ((start (point)))
     (insert "Directory tree")
   "Insert the header to the ztree buffer."
   (let ((start (point)))
     (insert "Directory tree")
-    (newline-and-begin)
+    (insert "\n")
     (insert "==============")
     (set-text-properties start (point) '(face ztreep-header-face)))
     (insert "==============")
     (set-text-properties start (point) '(face ztreep-header-face)))
-  (newline-and-begin))
+  (insert "\n"))
 
 (defun ztree-file-not-hidden (filename)
   "Determines if the file with FILENAME should be visible."
   (not (string-match ztree-hidden-files-regexp
 
 (defun ztree-file-not-hidden (filename)
   "Determines if the file with FILENAME should be visible."
   (not (string-match ztree-hidden-files-regexp
-                     (file-short-name filename))))
+                     (ztree-file-short-name filename))))
 
 (defun ztree-find-file (node hard)
   "Find the file at NODE.
 
 (defun ztree-find-file (node hard)
   "Find the file at NODE.
@@ -117,7 +117,7 @@ Otherwise, the ztree window is used to find the file."
                   (expand-file-name (substitute-in-file-name path))
                   'ztree-file-not-hidden
                   'ztree-insert-buffer-header
                   (expand-file-name (substitute-in-file-name path))
                   'ztree-file-not-hidden
                   'ztree-insert-buffer-header
-                  'file-short-name
+                  'ztree-file-short-name
                   'file-directory-p
                   'string-equal
                   '(lambda (x) (directory-files x 'full))
                   'file-directory-p
                   'string-equal
                   '(lambda (x) (directory-files x 'full))