* (require 'mailabbrev)
@ 2002-02-07 19:26 ShengHuo ZHU
2002-02-08 23:24 ` Richard Stallman
0 siblings, 1 reply; 5+ messages in thread
From: ShengHuo ZHU @ 2002-02-07 19:26 UTC (permalink / raw)
(require 'mailabbrev) barfs. It should require sendmail at run time
too.
The backtrace:
Debugger entered--Lisp error: (void-variable mail-mode-map)
byte-code(...)
require(mailabbrev)
eval((require (quote mailabbrev)))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
The related change:
2002-02-06 Richard M. Stallman <rms@gnu.org>
* mail/mailabbrev.el: Require sendmail only at compile time.
ShengHuo
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (require 'mailabbrev)
2002-02-07 19:26 (require 'mailabbrev) ShengHuo ZHU
@ 2002-02-08 23:24 ` Richard Stallman
2002-02-09 4:02 ` ShengHuo ZHU
2002-02-09 4:33 ` ShengHuo ZHU
0 siblings, 2 replies; 5+ messages in thread
From: Richard Stallman @ 2002-02-08 23:24 UTC (permalink / raw)
Cc: emacs-devel
Does this change fix the problem?
I am thinking that it is wasteful to load sendmail.el
if the user is using message.el instead.
*** mailabbrev.el.~1.62.~ Sat Feb 2 23:07:59 2002
--- mailabbrev.el Fri Feb 8 10:33:03 2002
***************
*** 598,606 ****
(setq this-command 'end-of-buffer)
(end-of-buffer arg))
! (define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
! (define-key mail-mode-map "\e\t" ; like lisp-complete-symbol
! 'mail-abbrev-complete-alias)
;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
--- 598,608 ----
(setq this-command 'end-of-buffer)
(end-of-buffer arg))
! (eval-after-load "sendmail"
! (progn
! (define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
! (define-key mail-mode-map "\e\t" ; like lisp-complete-symbol
! 'mail-abbrev-complete-alias)))
;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (require 'mailabbrev)
2002-02-08 23:24 ` Richard Stallman
@ 2002-02-09 4:02 ` ShengHuo ZHU
2002-02-09 4:33 ` ShengHuo ZHU
1 sibling, 0 replies; 5+ messages in thread
From: ShengHuo ZHU @ 2002-02-09 4:02 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Does this change fix the problem?
>
> I am thinking that it is wasteful to load sendmail.el
> if the user is using message.el instead.
>
> *** mailabbrev.el.~1.62.~ Sat Feb 2 23:07:59 2002
> --- mailabbrev.el Fri Feb 8 10:33:03 2002
> ***************
> *** 598,606 ****
> (setq this-command 'end-of-buffer)
> (end-of-buffer arg))
>
> ! (define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
> ! (define-key mail-mode-map "\e\t" ; like lisp-complete-symbol
> ! 'mail-abbrev-complete-alias)
>
> ;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
> ;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
> --- 598,608 ----
> (setq this-command 'end-of-buffer)
> (end-of-buffer arg))
>
> ! (eval-after-load "sendmail"
> ! (progn
> ! (define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
> ! (define-key mail-mode-map "\e\t" ; like lisp-complete-symbol
> ! 'mail-abbrev-complete-alias)))
>
> ;;(define-key mail-mode-map "\C-n" 'mail-abbrev-next-line)
> ;;(define-key mail-mode-map "\M->" 'mail-abbrev-end-of-buffer)
It doesn't fix the problem. But the following code will do (a quote
mark before progn).
(eval-after-load "sendmail"
'(progn
(define-key mail-mode-map "\C-c\C-a" 'mail-abbrev-insert-alias)
(define-key mail-mode-map "\e\t" ; like lisp-complete-symbol
'mail-abbrev-complete-alias)))
ShengHuo
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (require 'mailabbrev)
2002-02-08 23:24 ` Richard Stallman
2002-02-09 4:02 ` ShengHuo ZHU
@ 2002-02-09 4:33 ` ShengHuo ZHU
2002-02-10 5:18 ` Richard Stallman
1 sibling, 1 reply; 5+ messages in thread
From: ShengHuo ZHU @ 2002-02-09 4:33 UTC (permalink / raw)
Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> Does this change fix the problem?
>
> I am thinking that it is wasteful to load sendmail.el
> if the user is using message.el instead.
Furthermore, mail-abbrev-in-expansion-header-p calls mail-header-end,
which is defined in sendmail.el. So probably mail-header-end should
be autoloaded if sendmail.el is not required by mailabbrev.
ShengHuo
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (require 'mailabbrev)
2002-02-09 4:33 ` ShengHuo ZHU
@ 2002-02-10 5:18 ` Richard Stallman
0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2002-02-10 5:18 UTC (permalink / raw)
Cc: emacs-devel
It would be wasteful to load a substantial file just to use 5 lines of
code. Does this patch fix it?
*** mailabbrev.el.~1.63.~ Sat Feb 9 04:45:14 2002
--- mailabbrev.el Sat Feb 9 05:24:37 2002
***************
*** 418,424 ****
(looking-at mail-abbrev-mode-regexp))
;;
;; ...and are we in the headers?
! (< (point) (mail-header-end)))))
(defvar mail-mode-abbrev-table) ; quiet the compiler
--- 418,429 ----
(looking-at mail-abbrev-mode-regexp))
;;
;; ...and are we in the headers?
! (< (point)
! (save-restriction
! (widen)
! (save-excursion
! (rfc822-goto-eoh)
! (point)))))))
(defvar mail-mode-abbrev-table) ; quiet the compiler
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-02-10 5:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-07 19:26 (require 'mailabbrev) ShengHuo ZHU
2002-02-08 23:24 ` Richard Stallman
2002-02-09 4:02 ` ShengHuo ZHU
2002-02-09 4:33 ` ShengHuo ZHU
2002-02-10 5:18 ` Richard Stallman
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).