emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot find a variable that sets the "abbreviation" of a library nam


From: Eli Zaretskii
Subject: Re: Cannot find a variable that sets the "abbreviation" of a library name/prefix
Date: Sat, 29 Apr 2023 18:14:18 +0300

> Date: Sat, 29 Apr 2023 22:47:49 +0800
> From:  Ruijie Yu via "Emacs development discussions." <emacs-devel@gnu.org>
> 
> I'm definitely not dreaming, but I saw a variable from a patch somewhere
> the other day, that works like this:
> 
> When one sets this variable to an alist of full-name (string) ->
> short-name (string), the file itself defines symbols with short names,
> while the loader pretends they are using the long names.  For example,
> lets say the full name is "library", and short name is "lib".  Then, you
> can define functions or variables like this:
> 
> ```emacs-lisp
> ;; library.el --- example
> (defvar lib-foo nil)
> (defun lib-bar () t)
> 
> (provide 'library)
> ;; Local variables:
> ;; i-dont-know-what-this-variable-is-called: (("library" . "lib"))
> ;; End:
> ```
> 
> And the outside Elisp environment, when loading this file, now pretends
> that the variable `library-foo' and the function `library-bar' are
> defined.
> 
> ```emacs-lisp
> (require 'library)
> (progn library-foo (library-bar))
> ```
> 
> However, when I search for "abbrev" using M-x apropos-command, I cannot
> find anything.  Have I actually been dreaming?  Thanks.

You are talking about read-symbol-shorthands, I think.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]