diff options
author | 2000-04-04 13:20:54 +0000 | |
---|---|---|
committer | 2000-04-04 13:20:54 +0000 | |
commit | 160c6293ac3be9a0ce48731902af78f31674d58b (patch) | |
tree | e7cc3446727c1d47417485ca62c9e72c7d5c5635 /generic/proof-syntax.el | |
parent | bf79ae1a4e40f30b547aa5180c820d30e5dfd0e3 (diff) |
Altered proof-format-filename to add %e and %r specifiers.
Diffstat (limited to 'generic/proof-syntax.el')
-rw-r--r-- | generic/proof-syntax.el | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/generic/proof-syntax.el b/generic/proof-syntax.el index ae57888c..39a1d930 100644 --- a/generic/proof-syntax.el +++ b/generic/proof-syntax.el @@ -140,6 +140,8 @@ may assign this function to `after-change-function'." ;; Functions for doing something like "format" but with customizable ;; control characters. ;; +;; Added for version 3.1 to help quote funny characters in filenames. +;; (defun proof-format (alist string) "Format a string by matching regexps in ALIST against STRING" @@ -155,13 +157,23 @@ may assign this function to `after-change-function'." string) (defun proof-format-filename (string filename) - "Format STRING by replacing %s or %e by expanded version of FILENAME. -%e is special form meaning use proof-shell-string-escapes.. + "Format STRING by replacing %e, %r by escaped version of FILENAME. + +%e uses the canonicalized expanded version of filename (including +directory, using default-directory -- see `expand-file-name'). + +%r uses the unadjusted (possibly relative) version of FILENAME. + +%s means the same as %e. -We use expand-file-name to avoid problems with dumb -proof assistants and ~" +Using %e can avoid problems with dumb proof assistants who don't +understand ~, for example." (proof-format (list (cons "%s" (proof-format proof-shell-filename-escapes + (expand-file-name filename))) + (cons "%e" (proof-format proof-shell-filename-escapes + (expand-file-name filename))) + (cons "%r" (proof-format proof-shell-filename-escapes (expand-file-name filename)))) string)) |