Giacomo Boffi <[EMAIL PROTECTED]> writes:
> ;; At present, it works with a "~/.signature" file, where (possibly
> ;; multiline) stuff is separated by a line containing ONLY a "%"
> ;;
> ;; Change the filename in expand-file-name and the separator in
> ;; split-string below as you feel appropriate, and drop in your
> ;; "~/.gnus"
> ;;
> (defun sig_rand ()
> (with-temp-buffer
> (insert-file-contents-literally (expand-file-name "~/.signature"))
> (let ((lista (split-string (buffer-string (current-buffer)) "\n%\n")))
(let ((lista (split-string (buffer-string ) "\n%\n")))
> (elt lista (random (length lista))))))
> (setq message-signature 'sig_rand)
sorry, the original version is good for XEmacs, but does not run in
Emacs, where
,----
| buffer-string is a built-in function in `C source code'.
| (buffer-string)
|
| Return the contents of the current buffer as a string.
| If narrowing is in effect, this function returns only the visible part
| of the buffer.
`----
the corrected version works in XEmacs too, as the BUFFER argument is
optional
--
Sarebbe essere un atto di pieta'.
Contro i miei principi. -- whip, in IFMdI
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english