Ar an triú lá déag de mí Eanair, scríobh Stephen J. Turnbull:
Aidan Kehoe writes:
> + (,(lambda (limit)
> + (re-search-forward (concat "^\\("
> + message-cite-prefix-regexp
> + "\\).*")
> + limit t))
Since a lambda form evaluates to itself, I don't think that has any
advantages over
+ ((lambda (limit)
+ (re-search-forward (concat "^\\("
+ message-cite-prefix-regexp
+ "\\).*")
+ limit t))
Byte compile the unmodified file without the comma, it gives this:
(defvar message-font-lock-keywords (byte-code
"ÂÃÄ P!ÅBÃÆ P!ÇBÃÈ P!ÉBÃÊ P!ËBÃÌ P!ÍBÃÎ P!ÏBÐÑk?ÒÓ!ÔQÕBCÖ\")BBBBBB"
[mail-header-separator content "[ ]*\\(.+\\(\n[ ].*\\)*\\)\n?"
message-font-lock-make-header-matcher "^\\([Tt]o:\\)" ((1
'message-header-name-face) (2 'message-header-to-face nil t))
"^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" ((1 'message-header-name-face)
(2 'message-header-cc-face nil t)) "^\\([Ss]ubject:\\)" ((1
'message-header-name-face) (2 'message-header-subject-face nil t))
"^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" ((1 'message-header-name-face) (2
'message-header-newsgroups-face nil t)) "^\\([A-Z][^: \n ]+:\\)" ((1
'message-header-name-face) (2 'message-header-other-face nil t))
"^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" ((1 'message-header-name-face) (2
'message-header-name-face)) append "" "^\\(" regexp-quote
"\\)$" (1 'message-separator-face) (((lambda (limit) (re-search-forward
(concat "^\\(" message-cite-pref!
ix-regexp "\\).*") limit t)) (0 'message-cited-text-face))
("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" (0
'message-mml-face)))] 10) (#$ . 41612))
Byte compile the file with the comma, it gives this:
(defvar message-font-lock-keywords (byte-code
"ÂÃÄ P!ÅBÃÆ P!ÇBÃÈ P!ÉBÃÊ P!ËBÃÌ P!ÍBÃÎ P!ÏBÐÑk?ÒÓ!ÔQÕBCÖ×BØB\")BBBBBB"
[mail-header-separator content "[ ]*\\(.+\\(\n[ ].*\\)*\\)\n?"
message-font-lock-make-header-matcher "^\\([Tt]o:\\)" ((1
'message-header-name-face) (2 'message-header-to-face nil t))
"^\\(^[GBF]?[Cc][Cc]:\\|^[Rr]eply-[Tt]o:\\)" ((1 'message-header-name-face)
(2 'message-header-cc-face nil t)) "^\\([Ss]ubject:\\)" ((1
'message-header-name-face) (2 'message-header-subject-face nil t))
"^\\([Nn]ewsgroups:\\|Followup-[Tt]o:\\)" ((1 'message-header-name-face) (2
'message-header-newsgroups-face nil t)) "^\\([A-Z][^: \n ]+:\\)" ((1
'message-header-name-face) (2 'message-header-other-face nil t))
"^\\(X-[A-Za-z0-9-]+:\\|In-Reply-To:\\)" ((1 'message-header-name-face) (2
'message-header-name-face)) append "" "^\\(" regexp-quote
"\\)$" (1 'message-separator-face) #[(limit) "ÂÃ ÄQÅ#" [limit
message-cite-prefix-regexp re!
-search-forward "^\\(" "\\).*" t] 4] ((0
'message-cited-text-face))
(("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" (0
'message-mml-face)))] 10) (#$ . 41612))
It seems the lambda is too deep for the automatic compilation that happens
for lambda forms to kick in. And we want the automatic compilation to kick
in, since this function will be called from font-lock, quite possibly with
funcall, which, as we saw, can’t handle an uncompiled lambda form.
--
When I was in the scouts, the leader told me to pitch a tent. I couldn't
find any pitch, so I used creosote.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta