X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=poe.el;h=10591282e19f3c89d63cc12c11a3a0ecc337a4af;hb=93dbc292d18b23df55796d2b82d865210bcfe7fd;hp=a114a766cc5dde5e2428d3e349999c09f267ea37;hpb=e9b331d11f846f3e097a4254111818204999abb7;p=elisp%2Fapel.git diff --git a/poe.el b/poe.el index a114a76..1059128 100644 --- a/poe.el +++ b/poe.el @@ -204,6 +204,12 @@ See also the function `defconst'." ;;; `eval-when-compile' is defined in "poe-18" under v18 with old compiler. (eval-when-compile (require 'static)) +;; `file-coding' was appeared in the spring of 1998, just before XEmacs +;; 21.0. Therefore it is not provided in XEmacs with MULE versions 20.4 +;; or earlier. +(if (and (featurep 'xemacs) (featurep 'mule)) + (provide 'file-coding)) + ;; imported from emacs-20.3/lisp/emacs-lisp/edebug.el. ;; `def-edebug-spec' is an autoloaded macro in v19 and later. (defmacro-maybe def-edebug-spec (symbol spec) @@ -215,6 +221,17 @@ Both SYMBOL and SPEC are unevaluated. The SPEC can be 0, t, a symbol (def-edebug-spec defun-maybe defun) (def-edebug-spec defmacro-maybe defmacro) (def-edebug-spec defsubst-maybe defun) +(def-edebug-spec defun-maybe-cond + (&define name lambda-list + [&optional stringp] + [&rest ([¬ eval] [&rest sexp])] + [&optional (eval [&optional ("interactive" interactive)] def-body)] + &rest (&rest sexp))) +(def-edebug-spec defmacro-maybe-cond + (&define name lambda-list + [&rest ([¬ eval] [&rest sexp])] + [&optional (eval def-body)] + &rest (&rest sexp))) ;;; Emacs 20.1 emulation @@ -368,8 +385,6 @@ Value is nil if OBJECT is not a buffer or if it has been killed. (cons 'progn body) (list 'select-window 'save-selected-window-window)))) -(autoload (function filename-maybe-truncate-by-size) "filename") - (defun-maybe-cond convert-standard-filename (filename) "Convert a standard file's name to something suitable for the current OS. This function's standard definition is trivial; it just returns the argument. @@ -379,17 +394,17 @@ Under `windows-nt' or `ms-dos', it refers `filename-replacement-alist' and `filename-limit-length' for the basic filename and each parent directory name. \[Emacs 19.31 emulating function]" ((memq system-type '(windows-nt ms-dos)) + (require 'filename) (let* ((names (split-string filename "/")) (drive-name (car names)) (filter (function (lambda (string) (filename-maybe-truncate-by-size (filename-special-filter string)))))) - (concat (if (and (string-match "^[^/]:$" drive-name) - (>= (length names) 2)) - drive-name - (funcall filter drive-name)) - "/" - (mapconcat filter (cdr names) "/")))) + (cond ((eq 1 (length names)) + (funcall filter drive-name)) + ((string-match "^[^/]:$" drive-name) + (concat drive-name "/" (mapconcat filter (cdr names) "/"))) + (t (mapconcat filter names "/"))))) (t filename))