summaryrefslogtreecommitdiff
path: root/lisp/hippie-exp.el
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2008-07-31 05:33:56 +0000
committerDan Nicolaescu <dann@ics.uci.edu>2008-07-31 05:33:56 +0000
commit7c2fb837ec2f0e0a509f22ccc35f9b43476a6119 (patch)
tree7ec796ef1f109e43c8be2cc8cfb8dc579cfa8033 /lisp/hippie-exp.el
parent69ab3201ca6f6ef1414d678fd9cb13dd4d6f6b95 (diff)
downloademacs-7c2fb837ec2f0e0a509f22ccc35f9b43476a6119.tar.gz
* bitmaps/README:
* xfns.c: * termcap.c: * term.c: * syswait.h: * systty.h: * systime.h: * syssignal.h: * sysdep.c: * process.h: * process.c: * print.c: * ndir.h: * lread.c: * keyboard.c: * getpagesize.h: * floatfns.c: * fileio.c: * emacs.c: * doc.c: * dispnew.c: * dired.c: * data.c: * callproc.c: * buffer.c: * README: * Makefile.in: * s/template.h: * s/msdos.h: * m/vax.h: Remove VMS support. * s/vms.h: * vlimit.h: * uaf.h: * temacs.opt: * param.h: * ioctl.h: Remove file. * descrip.mms: * compile.com: Remove file. * Create.c: Remove VMS support. * message.el (Module): * gnus-start.el (Module): * gnus-registry.el (Module): * textmodes/texinfmt.el: * nxml/nxml-enc.el: * mail/feedmail.el: * international/mule.el: * international/latexenc.el: * emulation/viper-util.el: * emulation/viper-init.el: * emulation/viper-ex.el: * emacs-lisp/bytecomp.el: * version.el: * subr.el: * startup.el: * sort.el: * shadowfile.el: * recentf.el: * printing.el: * paths.el: * minibuffer.el: * ls-lisp.el: * loadup.el: * hippie-exp.el: * finder.el: * files.el: * ediff-util.el: * ediff-ptch.el: * ediff-init.el: * ediff-diff.el: * dired.el: * dired-aux.el: * cus-edit.el: * bindings.el: * arc-mode.el: * add-log.el: Remove VMS support. * obsolete/vmsproc.el: * obsolete/vms-pmail.el: * obsolete/vms-patch.el: Remove file. * etags.c: * emacsclient.c: Remove VMS support. * termcap.src: Remove file. * README: * PROBLEMS: * MACHINES: Remove VMS info. * ediff.texi: Remove VMS support. * os.texi: * intro.texi: * files.texi: Remove VMS support. * emacs.texi: Remove VMS support. * make-dist: * README: Remove VMS support. * vms: Remove directory.
Diffstat (limited to 'lisp/hippie-exp.el')
-rw-r--r--lisp/hippie-exp.el54
1 files changed, 10 insertions, 44 deletions
diff --git a/lisp/hippie-exp.el b/lisp/hippie-exp.el
index 69674f508bb..c8722df46b3 100644
--- a/lisp/hippie-exp.el
+++ b/lisp/hippie-exp.el
@@ -439,13 +439,13 @@ string). It returns t if a new completion is found, nil otherwise."
(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 @@ string). It returns t if a new completion is found, nil otherwise."
(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 @@ otherwise."
(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 @@ otherwise."
(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 @@ otherwise."
op
(point)))))
-;; Thanks go to Richard Levitte <levitte@e.kth.se> who helped to make these
-;; work under VMS, and to David Hughes <ukchugd@ukpmr.cs.philips.nl> who
+;; Thanks go to David Hughes <ukchugd@ukpmr.cs.philips.nl> 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))