>> Parenthesis shall end together, not like this:
>>
>> (defun manifest--log-message (msg)
>> (save-excursion
>> (set-buffer manifest--buffer)
>> (goto-char (point-max))
>> (setq latest-file (manifest--get-latest-file))
>> (insert msg "\n")
>> )
>> )
>>
>> rather like:
>>
>> (defun manifest--log-message (msg)
>> (save-excursion
>> (set-buffer manifest--buffer)
>> (goto-char (point-max))
>> (setq latest-file (manifest--get-latest-file))
>> (insert msg "\n")))
I dislike those close-parens-on-their-own-lines as well,
I use debugging checkpoints every second line
so the following code cannot be written:
(defun foo ()
(progn
(progn
(zip)
(message "&apple:1")
(zap)
(message "&apple:2")
(boo)
(message "&apple:3")
(bum)
Because the line (message &apple:4")))) will be deleted
using some code that comments out all debugging checkpoints.
Now that I think of it, I think I could get my code to behave
sensibly in this case... It just adds 1 more layer of intelligence
that I need to write.
> but more
importantly:
- should use `with-current-buffer`.
is that instead of (set-buffer buf)?
- should not `setq` on a global variable that doesn't have an appropriate
namespace prefix.
Do you mean the following is not allowed:
(setq apple 'banana)
but the following code is allowed:
(setq dmp-apple 'banana)
Thanks for your valuable time in helping
to make my code more standards compliant.