emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#24245: closed (25.0.93; AUCTeX TeX-function-p)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#24245: closed (25.0.93; AUCTeX TeX-function-p)
Date: Sun, 21 Aug 2016 14:52:02 +0000

Your message dated Sun, 21 Aug 2016 16:51:00 +0200
with message-id <address@hidden>
and subject line Re: bug#24245: 25.0.93; AUCTeX TeX-function-p
has caused the debbugs.gnu.org bug report #24245,
regarding 25.0.93; AUCTeX TeX-function-p
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
24245: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24245
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.93; AUCTeX TeX-function-p Date: Tue, 16 Aug 2016 20:16:12 +0000
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.

A similar function, `message-functionp', in `message.el' has been
removed. See Debian Bug report log #223493.

- a.

In GNU Emacs 25.0.93.1 (x86_64-w64-mingw32)
 of 2016-04-23 built on KAEL
Windowing system distributor 'Microsoft Corp.', version 10.0.14393
Configured using:
 'configure --prefix=/tmp/emacs --without-imagemagick 'CFLAGS=-O2
 -fomit-frame-pointer -g0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS





----
Sent using GuerrillaMail.com
Block or report abuse: 
https://www.guerrillamail.com/abuse/?a=Q1RzSAoOVvkQhQ%2B3414YfAGJQtiX






--- End Message ---
--- Begin Message --- 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 <address@hidden>:
> <address@hidden> 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è


--- End Message ---

reply via email to

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