[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/hippie-exp.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/hippie-exp.el,v |
Date: |
Thu, 31 Jul 2008 05:34:08 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/07/31 05:33:56
Index: lisp/hippie-exp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/hippie-exp.el,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- lisp/hippie-exp.el 6 May 2008 07:57:38 -0000 1.36
+++ lisp/hippie-exp.el 31 Jul 2008 05:33:43 -0000 1.37
@@ -439,13 +439,13 @@
(if (not old)
(progn
(he-init-string (he-file-name-beg) (point))
- (let ((name-part (he-file-name-nondirectory he-search-string))
- (dir-part (expand-file-name (or (he-file-name-directory
+ (let ((name-part (file-name-nondirectory he-search-string))
+ (dir-part (expand-file-name (or (file-name-directory
he-search-string) ""))))
(if (not (he-string-member name-part he-tried-table))
(setq he-tried-table (cons name-part he-tried-table)))
(if (and (not (equal he-search-string ""))
- (he-file-directory-p dir-part))
+ (file-directory-p dir-part))
(setq he-expand-list (sort (file-name-all-completions
name-part
dir-part)
@@ -460,7 +460,7 @@
(if old (he-reset-string))
())
(let ((filename (he-concat-directory-file-name
- (he-file-name-directory he-search-string)
+ (file-name-directory he-search-string)
(car he-expand-list))))
(he-substitute-string filename)
(setq he-tried-table (cons (car he-expand-list) (cdr he-tried-table)))
@@ -476,11 +476,11 @@
(if (not old)
(progn
(he-init-string (he-file-name-beg) (point))
- (let ((name-part (he-file-name-nondirectory he-search-string))
- (dir-part (expand-file-name (or (he-file-name-directory
+ (let ((name-part (file-name-nondirectory he-search-string))
+ (dir-part (expand-file-name (or (file-name-directory
he-search-string) ""))))
(if (and (not (equal he-search-string ""))
- (he-file-directory-p dir-part))
+ (file-directory-p dir-part))
(setq expansion (file-name-completion name-part
dir-part)))
(if (or (eq expansion t)
@@ -493,16 +493,14 @@
(if old (he-reset-string))
())
(let ((filename (he-concat-directory-file-name
- (he-file-name-directory he-search-string)
+ (file-name-directory he-search-string)
expansion)))
(he-substitute-string filename)
(setq he-tried-table (cons expansion (cdr he-tried-table)))
t))))
(defvar he-file-name-chars
- (cond ((memq system-type '(vax-vms axp-vms))
- "-a-zA-Z0-9_/.,~^#$+=:\\[\\]")
- ((memq system-type '(ms-dos windows-nt cygwin))
+ (cond ((memq system-type '(ms-dos windows-nt cygwin))
"-a-zA-Z0-9_/.,~^#$+=:\\\\")
(t ;; More strange file formats ?
"-a-zA-Z0-9_/.,~^#$+="))
@@ -516,43 +514,11 @@
op
(point)))))
-;; Thanks go to Richard Levitte <address@hidden> who helped to make these
-;; work under VMS, and to David Hughes <address@hidden> who
+;; Thanks go to David Hughes <address@hidden> who
;; helped to make it work on PC.
-(defun he-file-name-nondirectory (file)
- "Fix to make `file-name-nondirectory' work for hippie-expand under VMS."
- (if (memq system-type '(axp-vms vax-vms))
- (let ((n (file-name-nondirectory file)))
- (if (string-match "^\\(\\[.*\\)\\.\\([^\\.]*\\)$" n)
- (concat "[." (substring n (match-beginning 2) (match-end 2)))
- n))
- (file-name-nondirectory file)))
-
-(defun he-file-name-directory (file)
- "Fix to make `file-name-directory' work for hippie-expand under VMS."
- (if (memq system-type '(axp-vms vax-vms))
- (let ((n (file-name-nondirectory file))
- (d (file-name-directory file)))
- (if (string-match "^\\(\\[.*\\)\\.\\([^\\.]*\\)$" n)
- (concat d (substring n (match-beginning 1) (match-end 1)) "]")
- d))
- (file-name-directory file)))
-
-(defun he-file-directory-p (file)
- "Fix to make `file-directory-p' work for hippie-expand under VMS."
- (if (memq system-type '(vax-vms axp-vms))
- (or (file-directory-p file)
- (file-directory-p (concat file "[000000]")))
- (file-directory-p file)))
-
(defun he-concat-directory-file-name (dir-part name-part)
"Try to slam together two parts of a file specification, system dependently."
(cond ((null dir-part) name-part)
- ((memq system-type '(axp-vms vax-vms))
- (if (and (string= (substring dir-part -1) "]")
- (string= (substring name-part 0 2) "[."))
- (concat (substring dir-part 0 -1) (substring name-part 1))
- (concat dir-part name-part)))
((memq system-type '(ms-dos w32))
(if (and (string-match "\\\\" dir-part)
(not (string-match "/" dir-part))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/hippie-exp.el,v,
Dan Nicolaescu <=