-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use lisp-style parens and indentation #3
Comments
Also, the message "Initializing WakaTime v1.0.0" happens very often, |
I think you might be misunderstaning the (if cond
then
else...) The correct way to have more than one expression in the (defun wakatime-init ()
(if (not wakatime-initialized)
(progn
(message "Initializing WakaTime v%s" wakatime-version)
(if (or (not wakatime-api-key) (string= "" wakatime-api-key))
(wakatime-prompt-api-key))
...
(setq wakatime-initialized t)))) Since you don't have any (defun wakatime-init ()
(when (not wakatime-initialized)
(message "Initializing WakaTime v%s" wakatime-version)
(if (or (not wakatime-api-key) (string= "" wakatime-api-key))
(wakatime-prompt-api-key))
...
(setq wakatime-initialized t)))
And finally, there is also an inversed version of the (defun wakatime-init ()
(unless wakatime-initialized
(message "Initializing WakaTime v%s" wakatime-version)
(if (or (not wakatime-api-key) (string= "" wakatime-api-key))
(wakatime-prompt-api-key))
...
(setq wakatime-initialized t))) |
Also, many emacs users get any changes at once when they are committed to master because melpa auto packages them http://melpa.org/ |
You should probably not try to protect from recursive miibuffer calls.. The default value of |
With I've removed the initializing message. I thought it went to the These changes are fixed with 7f2aafe. Thanks! |
ah, I see. thats a good one then. |
The shell command The |
The Given the current layout the indentation should look like (defun wakatime-call (command)
"Call WakaTime COMMAND."
(let
(
(process
(start-process
"Shell"
(generate-new-buffer " *WakaTime messages*")
shell-file-name
shell-command-switch
command
)
)
)
(set-process-sentinel process
(lambda (process signal)
(when (memq (process-status process) '(exit signal))
(let ((exit-status (process-exit-status process)))
(when (and (not (= 0 exit-status)) (not (= 102 exit-status)))
(error "WakaTime Error (%s)" exit-status)
)
)
)
)
)
(set-process-query-on-exit-flag process nil)
)
) The old formatting was more idiomatic in every way. |
Ok, I'll use lisp-style parens. Leaving this open as a reminder. Thanks for the executable find function, that's much better than |
It's just annoying. Use it for errors, nothing else.
The text was updated successfully, but these errors were encountered: