[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Initialisation of dired-x for install-info guessing
From: |
Vincent Belaïche |
Subject: |
Re: Initialisation of dired-x for install-info guessing |
Date: |
Wed, 13 May 2009 07:15:37 +0200 |
Hello,
I have found a way to get rid of the `for', and also to be less bash
specific. This way the guess will work even for old Windows versions.
I just wrote it as follows:
(list "\\.info$"
'(concat "install-info \"" file "\" \""
(file-name-directory file)
"dir\" "
(cond
((eq system-type 'windows-nt) "&& Rem ")
(t "; # "))))
The trick is:
1) I get the directory in Lisp (note that I need no convert filename and
directory to system dependent syntax because install-info accepts `/' as
a file separator)
2) I append a tailing "&& Rem " so that the argument, say foo.info, that
is appended after the command name is ignored.
The full command line is then
install-info some/directory/foo.info some/directory/dir && Rem
some/directory/foo.info
This "&& Rem " is replaced by "; # " if the system is not window. So
that the fill command line will be
install-info some/directory/foo.info some/directory/dir ; #
some/directory/foo.info
Just a remark: if the dired mode could interprete some list (where CMD
is a string):
(litterally CMD)
As a command CMD to which the file name does not have to be appended,
then there would not be any need to cheat the OS with the tailing
comment (Rem or #). The guess displayed to the user would also be nicer.
Vincent.
- Re: Initialisation of dired-x for install-info guessing ,
Vincent Belaïche <=