GNU bug report logs - #72405
29.4; Doc string of `org-indent-mode'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 31 Jul 2024 20:25:01 UTC

Severity: minor

Found in version 29.4

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 72405 <at> debbugs.gnu.org (full text, mbox):

From: Visuwesh <visuweshm <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 72405 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, drew.adams <at> oracle.com
Subject: Re: bug#72405: 29.4; Doc string of `org-indent-mode'
Date: Wed, 14 Aug 2024 13:34:18 +0530
[Message part 1 (text/plain, inline)]
[புதன் ஆகஸ்ட் 14, 2024] Eli Zaretskii wrote:

>> From: Visuwesh <visuweshm <at> gmail.com>
>> Cc: monnier <at> iro.umontreal.ca,  72405 <at> debbugs.gnu.org,  drew.adams <at> oracle.com
>> Date: Wed, 14 Aug 2024 12:57:17 +0530
>> 
>> >> Is the attached patch fine?  
>> >
>> > Yes, but please use 'if' rather than 'when'.
>> 
>> Sorry, but I'm confused.  I used 'when' because 
>> 
>>     (concat nil "xxx") ;; => "xxx"
>
> Yes, of course.  But 'if' also returns nil if its condition is false:
>
>   (if (symbolp 1) "symbol")
>    => nil
>
> So you can still use the original code, which uses the above behavior
> of 'concat', after replacing 'when' with 'if' in your original code.
>
> The reason I asked to use 'if' is that there's no reason to use 'when'
> here, as the BODY of 'when' will only ever be a single string.

Ah, I understand now.  I find using 'if' without the else-clause
confusing when glancing at the code so I opted to use 'when'.  Thanks
for taking your time to explain what you meant.  Attached patch replaces
'when' with 'if'.

[0001-Disambiguate-minor-mode-variable-in-its-function-doc.patch (text/x-diff, attachment)]

This bug report was last modified 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.