From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Buffer local alias? Date: Wed, 15 Jan 2014 10:30:28 +0100 Message-ID: <86a9exbnij.fsf@somewhere.org> References: <87a9ey5p50.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Nick Dokos wrote: >> I read about defalias and saw that this should be used at the >> point that the original definition is made, so I followed the pointer to >> fset and naively tried this in the local variables: >> >> # eval: (and (boundp 'org-sbe) (not (boundp 'sbe)) (fset 'sbe 'org-sbe)) >> # eval: (sbe "setup-common-lisp) >> >> But this gets me the following error: >> >> File local-variables error: (void-function sbe) >> >> Can someone offer a suggestion? @Thomas: I just launch an idea: group the above two lines in one `progn' construct? > Use fboundp, instead of boundp: the latter checks the variable binding > slot, whereas the former checks the function binding slot. @Nick: I always thought that `boundp' checked in both variable and function slots, not only in the variable slot. An attempt makes me think you're right, but that's not what I understood from the docstring: =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 boundp is a built-in function in `C source code'. =E2=94=82=20 =E2=94=82 (boundp SYMBOL) =E2=94=82=20 =E2=94=82 Return t if SYMBOL's value is not void. =E2=94=82 Note that if `lexical-binding' is in effect, this refers to the =E2=94=82 global value outside of any lexical scope. =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 Best regards, Seb --=20 Sebastien Vauban