unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ruijie Yu <ruijie@netyu.xyz>
Cc: emacs-devel@gnu.org
Subject: Re: Cannot find a variable that sets the "abbreviation" of a library name/prefix
Date: Sat, 29 Apr 2023 18:14:18 +0300	[thread overview]
Message-ID: <83pm7mpvp1.fsf@gnu.org> (raw)
In-Reply-To: <sdvv8heka7e.fsf@netyu.xyz> (emacs-devel@gnu.org)

> 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	other threads:[~2023-04-29 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29 14:47 Cannot find a variable that sets the "abbreviation" of a library name/prefix Ruijie Yu via Emacs development discussions.
2023-04-29 15:14 ` Eli Zaretskii [this message]
2023-04-29 21:46 ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83pm7mpvp1.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ruijie@netyu.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).