* docstring: mail-signature
@ 2023-09-03 1:58 T.V Raman
2023-09-03 2:03 ` Emanuel Berg
2023-09-03 5:45 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: T.V Raman @ 2023-09-03 1:58 UTC (permalink / raw)
To: emacs-devel
from sendmail.el:
Note that the docstring says mail-signature determines what happens,
but also says that the .signature file is used if this var is t or
nil.
Shouldn't the sign not happen if that var is nil?
The code actually checks for (memq t nil)
(defun mail-signature (&optional atpoint)
"Sign letter with signature.
If the variable `mail-signature' is a string, inserts it.
If it is t or nil, inserts the contents of the file `mail-signature-file'.
Otherwise, evals `mail-signature'.
Prefix argument ATPOINT means insert at point rather than the end."
(interactive "*P")
;; Test for an unreadable file here, before we delete trailing
;; whitespace, so that we don't modify the buffer needlessly.
(if (and (memq mail-signature '(t nil))
(not (file-readable-p mail-signature-file)))
(if (called-interactively-p 'interactive)
(message "The signature file `%s' could not be read"
mail-signature-file))
(save-excursion
(unless atpoint
(goto-char (point-max))
;; Delete trailing whitespace and blank lines.
(skip-chars-backward " \t\n")
(end-of-line)
(delete-region (point) (point-max)))
(cond ((stringp mail-signature)
(insert mail-signature))
((memq mail-signature '(t nil))
(insert "\n\n-- \n")
(insert-file-contents (expand-file-name mail-signature-file)))
(t
;; FIXME add condition-case error handling?
(eval mail-signature))))))
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: docstring: mail-signature
2023-09-03 1:58 docstring: mail-signature T.V Raman
@ 2023-09-03 2:03 ` Emanuel Berg
2023-09-03 15:05 ` T.V Raman
2023-09-03 5:45 ` Eli Zaretskii
1 sibling, 1 reply; 4+ messages in thread
From: Emanuel Berg @ 2023-09-03 2:03 UTC (permalink / raw)
To: emacs-devel
T.V Raman wrote:
> --
>
> Thanks,
>
> --Raman(I Search, I Find, I Misplace, I Research)
> ♉ Id: kg:/m/0285kf1 🦮
Something is sure up since your signature appeared twice.
--
underground experts united
https://dataswamp.org/~incal
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: docstring: mail-signature
2023-09-03 2:03 ` Emanuel Berg
@ 2023-09-03 15:05 ` T.V Raman
0 siblings, 0 replies; 4+ messages in thread
From: T.V Raman @ 2023-09-03 15:05 UTC (permalink / raw)
To: emacs-devel
Emanuel Berg <incal@dataswamp.org> writes:
That was the issue I was trying to trace down (duplicate sig) when I
spotted that doc bug.
> T.V Raman wrote:
>
>> --
>>
>> Thanks,
>>
>> --Raman(I Search, I Find, I Misplace, I Research)
>> ♉ Id: kg:/m/0285kf1 🦮
>
> Something is sure up since your signature appeared twice.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: docstring: mail-signature
2023-09-03 1:58 docstring: mail-signature T.V Raman
2023-09-03 2:03 ` Emanuel Berg
@ 2023-09-03 5:45 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-09-03 5:45 UTC (permalink / raw)
To: T.V Raman, Glenn Morris; +Cc: emacs-devel
> From: "T.V Raman" <raman@google.com>
> Date: Sat, 2 Sep 2023 18:58:09 -0700
>
> from sendmail.el:
> Note that the docstring says mail-signature determines what happens,
> but also says that the .signature file is used if this var is t or
> nil.
>
> Shouldn't the sign not happen if that var is nil?
> The code actually checks for (memq t nil)
Yes, it seems to be a bug (because the doc string of the user option
mail-signature says nil means no signature is inserted, even if
mail-signature-file exists and is readable. But it's a very old bug,
and the code installed 14 years ago by Glenn (CC'ed) explicitly
handles nil and t the same, not sure why.
Glenn, any comments?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-03 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-03 1:58 docstring: mail-signature T.V Raman
2023-09-03 2:03 ` Emanuel Berg
2023-09-03 15:05 ` T.V Raman
2023-09-03 5:45 ` Eli Zaretskii
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.