GNU bug report logs - #24245
25.0.93; AUCTeX TeX-function-p

Previous Next

Package: auctex;

Reported by: <4854nw+cqdha1cwehn9k <at> guerrillamail.com>

Date: Tue, 16 Aug 2016 20:28:01 UTC

Severity: wishlist

Done: Mosè Giordano <mose <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 24245-done <at> debbugs.gnu.org (full text, mbox):

From: Mosè Giordano <mose <at> gnu.org>
To: Robert Cochran <robert-emacs <at> cochranmail.com>
Cc: 24245-done <at> debbugs.gnu.org, 4854nw+cqdha1cwehn9k <at> guerrillamail.com
Subject: Re: bug#24245: 25.0.93; AUCTeX TeX-function-p
Date: Sun, 21 Aug 2016 16:51:00 +0200
Hi

2016-08-19 18:42 GMT+02:00 Robert Cochran <robert-emacs <at> cochranmail.com>:
> <4854nw+cqdha1cwehn9k <at> guerrillamail.com> writes:
>
>> What is the actual purpose of the Lisp function `TeX-function-p' found
>> in AUCTeX ‘tex.el’?
>>
>> (defun TeX-function-p (arg)
>>   "Return non-nil if ARG is callable as a function."
>>   (or (and (fboundp 'byte-code-function-p)
>>        (byte-code-function-p arg))
>>       (and (listp arg)
>>        (eq (car arg) 'lambda))
>>       (and (symbolp arg)
>>          (fboundp arg))))
>>
>> How this code is better of `functionp'?
>> If there is no actual design improvement of `TeX-function-p' over
>> `functionp', the latter is supposed to be faster as it is built-in.
>
> It's not 'better'. A blame of the AUCTeX repository shows that
> `TeX-function-p` was written (and last touched) in 1994. The only
> history that's in the Emacs repository commit-wise about `functionp`
> dates back to 2010, and the files within it show relevant history from
> 2005 (which aren't in the repo as their own commits). Doubtless it's
> hard to pin down without the complete history, but it's likely
> `TeX-function-p` was written before `functionp`.

`functionp' seems to have been introduced in Emacs with commit:

    * a9a44ed (1997-04-12)  (functionp): New function.

so well before GNU Emacs 21.1, that is the oldest version of Emacs we
aim to support.  I agree `functionp' should be able to safely replace
`TeX-function-p', I tested with Emacs 22, 23, and 24.

AUCTeX turned 25 a few months ago, being so old you may find other
such crufts: sometimes they're needed to keep compatibility with old
Emacsens, other times (like this one) they can be replaced with well
established Emacs functions.

Thanks for the report.

Bye,
Mosè




This bug report was last modified 8 years and 316 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.