Article View: gnu.emacs.bug
Article #8754019.26: cannot dump add-log.el
From: Tom Tromey
Date: Thu, 22 Sep 1994 05:56
Date: Thu, 22 Sep 1994 05:56
83 lines
4104 bytes
4104 bytes
Emacs 19.26.
add-log.el cannot be dumped, because (eg) add-log-full-name references
something not known at dump time.
Incidentally, I think that (user-full-name) should throw an error
before dumping. That would make problems like this easier to spot.
If there are other functions that cannot be evaluated before dumping,
they should also throw errors.
Appended is a patch to add-log.el that removes the dependencies, so
add-log can now be dumped. Here is a ChangeLog entry:
Wed Sep 21 21:26:21 1994 Tom Tromey <tromey@drip.colorado.edu>
* add-log.el (add-change-log-entry): Set add-log-full-name and
add-log-mailing-address here.
(add-log-full-name): Initialize to nil.
(add-log-mailing-address): Ditto.
Tom
---
tromey@busco.lanl.gov Member, League for Programming Freedom
Be regular and orderly in your life like a bourgeois, so that you
may be violent and original in your work
-- Flaubert
*** add-log.el.~1~ Sat Jul 23 20:47:18 1994
--- add-log.el Wed Sep 21 21:29:08 1994
***************
*** 33,51 ****
"\
*If non-nil, function to guess name of current function from surrounding text.
\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
instead) with no arguments. It returns a string or nil if it cannot guess.")
! ;; This MUST not be autoloaded, since user-login-name
! ;; cannot be known at Emacs dump time.
! (defvar add-log-full-name (user-full-name)
"*Full name of user, for inclusion in ChangeLog daily headers.
This defaults to the value returned by the `user-full-name' function.")
! ;; This MUST not be autoloaded, since user-login-name
! ;; cannot be known at Emacs dump time.
! (defvar add-log-mailing-address user-mail-address
"*Electronic mail address of user, for inclusion in ChangeLog daily headers.
This defaults to the value of `user-mail-address'.")
(defun change-log-name ()
(or change-log-default-name
--- 33,47 ----
"\
*If non-nil, function to guess name of current function from surrounding text.
\\[add-change-log-entry] calls this function (if nil, `add-log-current-defun'
instead) with no arguments. It returns a string or nil if it cannot guess.")
! (defvar add-log-full-name nil
"*Full name of user, for inclusion in ChangeLog daily headers.
This defaults to the value returned by the `user-full-name' function.")
! (defvar add-log-mailing-address nil
"*Electronic mail address of user, for inclusion in ChangeLog daily headers.
This defaults to the value of `user-mail-address'.")
(defun change-log-name ()
(or change-log-default-name
***************
*** 131,140 ****
--- 127,140 ----
;; full name which look silly when inserted. Rather than do
;; anything about that here, let user give prefix argument so that
;; s/he can edit the full name field in prompter if s/he wants.
(setq add-log-mailing-address
(read-input "Mailing address: " add-log-mailing-address))))
+ (or add-log-full-name
+ (setq add-log-full-name (user-full-name)))
+ (or add-log-mailing-address
+ (setq add-log-mailing-address user-mail-address))
(let ((defun (funcall (or add-log-current-defun-function
'add-log-current-defun)))
paragraph-end entry)
(setq file-name (expand-file-name (find-change-log file-name)))
Technical Details
Message-ID:
<9409220548.AA05644@busco.lanl.gov>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!uunet!cis.ohio-state.edu!busco.lanl.gov!tromeyShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,863c416d61dc8da6,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-09-22 07:40:05 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!cs.utexas.edu!uunet!cis.ohio-state.edu!busco.lanl.gov!tromey From: tromey@busco.lanl.gov (Tom Tromey) Newsgroups: gnu.emacs.bug Subject: 19.26: cannot dump add-log.el Date: 22 Sep 1994 01:56:31 -0400 Organization: GNUs Not Usenet Lines: 83 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9409220548.AA05644@busco.lanl.gov>