🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gmane.emacs.devel
4 messages
4 total messages Started by "T.V Raman" Sat, 02 Sep 2023 18:58
docstring: mail-signature
#307897
Author: "T.V Raman"
Date: Sat, 02 Sep 2023 18:58
54 lines
1668 bytes
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  🦮

Re: docstring: mail-signature
#307898
Author: Emanuel Berg
Date: Sun, 03 Sep 2023 04:03
16 lines
242 bytes
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


Re: docstring: mail-signature
#307951
Author: "T.V Raman"
Date: Sun, 03 Sep 2023 08:05
23 lines
453 bytes
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  🦮

Re: docstring: mail-signature
#307902
Author: Eli Zaretskii
Date: Sun, 03 Sep 2023 08:45
19 lines
680 bytes
> 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?

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads