Mercurial > emacs
changeset 92529:7b55b0a875cc
(make-legal-file-name): New obsolete alias.
(make-valid-file-name): Rename from `make-legal-file-name'.
(make-auto-save-file-name): Use it.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 06 Mar 2008 15:00:14 +0000 |
parents | ee48946b8267 |
children | 04183df0b71f |
files | lisp/vms-patch.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vms-patch.el Thu Mar 06 11:01:53 2008 +0000 +++ b/lisp/vms-patch.el Thu Mar 06 15:00:14 2008 +0000 @@ -43,9 +43,9 @@ otherwise a string <2> or <3> or ... is appended to get an unused name." (generate-new-buffer (downcase (file-name-nondirectory filename)))) -;;; Given a string FN, return a similar name which is a legal VMS filename. +;;; Given a string FN, return a similar name which is a valid VMS filename. ;;; This is used to avoid invalid auto save file names. -(defun make-legal-file-name (fn) +(defun make-valid-file-name (fn) (setq fn (copy-sequence fn)) (let ((dot nil) (indx 0) (len (length fn)) chr) (while (< indx len) @@ -59,6 +59,8 @@ (setq indx (1+ indx)))) fn) +(define-obsolete-function-alias 'make-legal-file-name 'make-valid-file-name "23.1") + ;;; Auto save filesnames start with _$ and end with $. (defun make-auto-save-file-name () @@ -73,7 +75,7 @@ "_$" (file-name-nondirectory buffer-file-name) "$") - (expand-file-name (concat "_$_" (make-legal-file-name (buffer-name)) "$")))) + (expand-file-name (concat "_$_" (make-valid-file-name (buffer-name)) "$")))) (defun auto-save-file-name-p (filename) "Return t if FILENAME can be yielded by `make-auto-save-file-name'.