[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: loading local abbrevs
From: |
tomas |
Subject: |
Re: loading local abbrevs |
Date: |
Thu, 29 Jun 2017 11:59:02 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, Jun 29, 2017 at 11:21:35AM +0200, Héctor Lahoz wrote:
> Hi.
>
> I'd like to load a file with local abbrevs when I edit any file in
> a given directory. So I put a local variable like:
>
> eval: (read-abbrev-file "abbrev_defs")
>
> but it can't find the abbrev_defs. I think it has to do with
> load-path. What can I do? I don't want to use an absolute
> path because the path might be changed.
`read-abbrev-file' calls on `load', which uses the variable
`load-path' to decide where to look for the file. So perhaps
one possibility would be to include "." (i.e. the current
directory) in `load-path': I wouldn't recommend that (to be
honest, I'd be a bit scared to do that, but YMMV).
The other possibility would be to provide an absolute path,
along the lines of
(read-abbrev-file
(concat default-directory "abbrev_defs"))
or thereabouts. Season to taste ;-)
cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAllUz2YACgkQBcgs9XrR2kZlowCfSTIFAL/ZPwcjc42HV2OaK4ht
nvMAn1k6WXTrgWGq60lusbUPxvqx8rey
=4gkm
-----END PGP SIGNATURE-----