all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Two questions about thumbs.el
@ 2004-04-26 13:31 Juanma Barranquero
  2004-04-26 16:39 ` Kim F. Storm
  2004-05-24 14:08 ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Juanma Barranquero @ 2004-04-26 13:31 UTC (permalink / raw)


Fist: There are a few .el files with no copyright and no comment about
them being in the public domain.

Most of them are quite small or even trivial:

  forms-d2.el
  forms-pass.el
  patcomp.el
  obsolete/sc.el
  term/apollo.el
  term/bobcat.el
  term/vt*.el

but thumbs.el is a 700+ lines file. Shouldn't it have a copyright line?


Now, the real question:

(when (not (fboundp 'time-less-p))
  (defun time-less-p (t1 t2)
    "Say whether time T1 is less than time T2."
    (or (< (car t1) (car t2))
        (and (= (car t1) (car t2))
             (< (nth 1 t1) (nth 1 t2))))))

This code introduces a symbol time-less-p, which could confuse feature
checks. Wouldn't it be better:

(if (fboundp 'time-less-p)
    (defalias 'thumbs-time-less-p 'time-less-p)
  (defun thumbs-time-less-p (t1 t2)
    "Say whether time T1 is less than time T2."
    (or (< (car t1) (car t2))
        (and (= (car t1) (car t2))
             (< (nth 1 t1) (nth 1 t2)))))))


Third question (yeah, I lied on the subject): There are at least eight
versions of the time-less-p code:

calendar/time-date: time-less-p
calendar/timeclock: timeclock-time-less-p
pcomplete:          pcomplete-time-less-p
speedbar:           speedbar-check-obj-this-line (fragment)
thumbs:             time-less-p
autoload:           autoload-before-p
eshell/esh-util:    eshell-time-less-p
net/tramp-smb:      tramp-smb-time-less-p (fragment)

speedbar, eshell and tramp have a life outside of Emacs, so they need
their own definitions for compatibility, but the others could be
"reunified" by using calendar/time-date's version (time-date.elc is
quite small, about 4K).

Is there any reason not to do it, other than not wanting them to load
calendar/time-date.elc?

Note: I'm not sure about autoload, because without testing it I don't
know if there'll be a problem for autoload to use an autoloaded function.

                                                                Juanma

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-05-24 14:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-26 13:31 Two questions about thumbs.el Juanma Barranquero
2004-04-26 16:39 ` Kim F. Storm
2004-04-26 16:58   ` Juanma Barranquero
2004-04-27 16:29     ` Richard Stallman
2004-04-27 18:09       ` Juanma Barranquero
2004-05-24 14:08 ` Richard Stallman
2004-05-24 14:32   ` Juanma Barranquero

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.