From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Cannot find a variable that sets the "abbreviation" of a library name/prefix Date: Sat, 29 Apr 2023 22:46:54 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24324"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Ruijie Yu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 29 23:45:49 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pssO3-00067N-UL for ged-emacs-devel@m.gmane-mx.org; Sat, 29 Apr 2023 23:45:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pssNG-0008UK-VP; Sat, 29 Apr 2023 17:44:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pssNF-0008UA-HI for emacs-devel@gnu.org; Sat, 29 Apr 2023 17:44:57 -0400 Original-Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pssND-0003oU-NO for emacs-devel@gnu.org; Sat, 29 Apr 2023 17:44:57 -0400 Original-Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-38e7ce73ca0so824526b6e.2 for ; Sat, 29 Apr 2023 14:44:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682804694; x=1685396694; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cy0PhsS7aEEn+AK/OxWcTLC6eJdHd74mq0cfzQkw/jI=; b=k+375eJ/QhnfMN1k9l70PQ0H++tsJybPuwyJndr07Jzk6rWaMobvkRvuV4vFBG9l3r D0lUm8hqa9DeXdEKvB/Iy+JRS3Giuv6YZaPPKCJo6uQf4h8ALGAAJySvHRtVO5QxrRZ0 zB153YO1dpM4wpmNlTa3ZXeigM4xqsX0dTaSpnsHcUbnT3CTnliuMruSVqg0ecPmCL1M rvrWdK9fI7+aB+ZjZi2Y2vn0KvnRT6hqMkylENZ/GnsfiU/QEKaLCCr7ZC/S3IRjPU+9 nc4FOmbRD00iEzfSigSHep7ALgcAv+CrAx9fUDGyG+5KuHZcUoxIjFB7tqO9lvZEfWg6 9AgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682804694; x=1685396694; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cy0PhsS7aEEn+AK/OxWcTLC6eJdHd74mq0cfzQkw/jI=; b=laj+hzSttsjYvvHHvDegBvrMjhNqvkEKWQb98SRwXns6c1lQEICtekZPWcADp+0yvN SouL1hbuXLbxs8ueBs85yNSg0BbymPMtBZfi++TVU2yuqdVeWGoSfhDUc3kYUU5E5/MQ Ro4pRmbELKp1fkVFx85KnFBbmbx8MmhQbwbFffoYSID8wtN44KMASreZzT58FMaoXAzz lmeDSqJmq2ZHGyZzEYo7DqJM+TWJ9HNBzjXzm5S+Nm6qytSAOc3wyf7OpkBjxOTu2DaC v0vfqXCkvWZ7tP4J2U8zEpepgSK8ljtnvO2QTZCEBfAr7hEitI/Xiu2UdNKUL/0trKqw Mxog== X-Gm-Message-State: AC+VfDyfbWVI/pwJ2egru9hsCMykTPeJ8mmF4bE4iClbGQq+oyPyySBl sinU/t7OtKvc69xTR10pZjInMWSCREh5tcBgi4Bw32LzhsA= X-Google-Smtp-Source: ACHHUZ6lUV+pyT1zVeLsmKaTUnnOVwa43Gn8r0bdinD4QBt0i+HBD4xnto5COw6noqquXVDP4DSNhvL4NopDHg8Q/Wo= X-Received: by 2002:a05:6808:2b0a:b0:38c:3c53:9e15 with SMTP id fe10-20020a0568082b0a00b0038c3c539e15mr4694882oib.13.1682804693961; Sat, 29 Apr 2023 14:44:53 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::22f; envelope-from=joaotavora@gmail.com; helo=mail-oi1-x22f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305724 Archived-At: On Sat, Apr 29, 2023 at 3:58=E2=80=AFPM Ruijie Yu via Emacs development discussions. wrote: > > Hello, > > 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: This would be read-symbol-shorthands. Look in up in the manual and see the following for a practical example of a library that uses it: https://github.com/joaotavora/beardbolt/edit/master/beardbolt.el > And the outside Elisp environment, when loading this file, now pretends > that the variable `library-foo' and the function `library-bar' are > defined. It's actually the other way round. It's `lib-foo` and `lib-bar` that were never really names of symbols. They were always `library-foo` and `library-bar` underneath, they're just written in abbreviated shorthand form. It's not only when loading the file from the "outside": it's also when compiling definitions from inside, and looking up ElDoc documentation, etc. Jo=C3=A3o