help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time of last command invoked


From: Emanuel Berg
Subject: Re: Time of last command invoked
Date: Sun, 07 Mar 2021 10:47:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

>>> (defun rcd/emacs-lisp-log (log)
>>>   "Allows functions to log their usage"
>>>   (let* ((function (second (backtrace-frame 5 nil)))
>>>      (timestamp (format-time-string "%Y-%m-%d-%H:%M:%S"))
>>>      (log (format "%s %s %s\n" timestamp function log))
>>>      (save-silently t))    
>>>     (with-temp-buffer
>>>     (insert log)
>>>       (append-to-file (point-min) (point-max) *emacs-lisp-log*))))
>> 
>> OMG! Severe errors found:
>> 
>>   First sentence should end with punctuation
>> 
>>   Argument ‘log’ should appear (as LOG) in the doc string
>> 
>>   Probably "Allows" should be imperative "Allow"
>
> Thanks, I know those. I have functions in development files
> and packaged files (ready). Then functions are moved from
> one to other and verified to those conventions.

OK, but I think that comment referred to the function in the
quotation in particular...

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]