all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <jmbarranquero@wke.es>
Subject: Two questions about thumbs.el
Date: Mon, 26 Apr 2004 15:31:02 +0200	[thread overview]
Message-ID: <20040426104147.5042.JMBARRANQUERO@wke.es> (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

             reply	other threads:[~2004-04-26 13:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 13:31 Juanma Barranquero [this message]
2004-04-26 16:39 ` Two questions about thumbs.el 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040426104147.5042.JMBARRANQUERO@wke.es \
    --to=jmbarranquero@wke.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.