diff lisp/hippie-exp.el @ 97142:c3512b2085a0

* 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.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 31 Jul 2008 05:33:56 +0000
parents ee5932bf781d
children d42aff5ca541
line wrap: on
line diff
--- a/lisp/hippie-exp.el	Thu Jul 31 02:47:32 2008 +0000
+++ b/lisp/hippie-exp.el	Thu Jul 31 05:33:56 2008 +0000
@@ -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 <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))