all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Hong Xu <hong@topbug.net>
Cc: 24861@debbugs.gnu.org
Subject: bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode
Date: Sat, 19 Nov 2016 09:50:40 +0200	[thread overview]
Message-ID: <83mvgvc3hr.fsf@gnu.org> (raw)
In-Reply-To: <c330f2c6-8845-0bc3-2005-532f549ad579@topbug.net> (message from Hong Xu on Fri, 18 Nov 2016 11:55:28 -0800)

> Cc: 24861@debbugs.gnu.org
> From: Hong Xu <hong@topbug.net>
> Date: Fri, 18 Nov 2016 11:55:28 -0800
> 
> Allow users to customize the maximum frequency that
> `cpp-progress-message' prints messages.
> 
> 	* progmodes/cpp.el (cpp-message-min-time-interval)
> 	(cpp-progress-message): Add variable
> 	`cpp-message-min-time-interval' to indicate the minimum time
> 	interval in seconds that `cpp-progress-message' prints messages.
> 
> 	* progmodes/cpp.el (cpp-progress-time): Initialize to '(0 0 0 0) instead of
> 	0 and improve the documentation.
> 
> 	* progmodes/cpp.el (cpp-highlight-buffer): Use
> 	`cpp-progress-message' instead of `message'.

Thanks, but there are still left-overs:

> +(defcustom cpp-message-min-time-interval 1.0
> +  "Indicate the minimum time interval in seconds that
> +`cpp-progress-message' should print messages.

This should be one line, so the sentence should be shorter to fit.  If
you drop the redundant "Indicate the" part, it will come close.

> -(defvar cpp-progress-time 0)
> -;; Last time we issued a progress message.
> +(defvar cpp-progress-time '(0 0 0 0)

You could leave it at 0, no need to have a list here.

> +  "Indicate the last time `cpp-progress-message' issued a
> +  progress message.")

This should be a single line.  Once again, please drop the uneeded
"Indicate" part.

>  (defun cpp-progress-message (&rest args)
> -  ;; Report progress at most once a second.  Take same ARGS as `message'.
> -  (let ((time (nth 1 (current-time))))
> -    (if (= time cpp-progress-time)
> -	()
> -      (setq cpp-progress-time time)
> -      (apply 'message args))))
> +  "Report progress by printing messages at most once every
> +`cpp-message-min-time-interval' seconds for functions whose names
> +start with \"cpp-\".  If `cpp-message-min-time-interval' is nil,
> +it prints no message.  The ARGS are the same as in `message'."

The first sentence of the doc string should take only one line.





  reply	other threads:[~2016-11-19  7:50 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 18:45 bug#24861: [PATCH] Fix annoying "Parsing...done" message in c++-mode Hong Xu
2016-11-02 20:09 ` Hong Xu
2016-11-02 20:21   ` Eli Zaretskii
2016-11-02 23:34     ` Hong Xu
2016-11-03 18:15       ` Eli Zaretskii
2016-11-03 18:43         ` Hong Xu
2016-11-16  0:03           ` Hong Xu
2016-11-18  9:39             ` Eli Zaretskii
2016-11-18 19:55               ` Hong Xu
2016-11-19  7:50                 ` Eli Zaretskii [this message]
2016-11-20  0:20                   ` Hong Xu
2016-11-25 10:53                     ` Eli Zaretskii
2016-11-02 23:39     ` Hong Xu
2016-11-03 16:39     ` Richard Stallman
2016-11-02 22:05   ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83mvgvc3hr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=24861@debbugs.gnu.org \
    --cc=hong@topbug.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.