2

Is there any way to disable just this one warning? Two spaces seems like overkill but maybe that is the lisp standard?

Andrew Swann
  • 3,436
  • 2
  • 15
  • 43
eflanigan00
  • 785
  • 4
  • 11
  • 3
    What is your value of option `sentence-end-double-space`? Have you tried setting it to `nil`? – Drew Nov 08 '16 at 19:16
  • I tried that, it doesn't work with flycheck. Do you know if 2 spaces is a lisp standard? – eflanigan00 Nov 09 '16 at 00:13
  • 1
    It has nothing to do with Lisp. It is a convention for plain text, inherited from typewriter days. [Please read the doc](http://www.gnu.org/software/emacs/manual/html_node/emacs/Sentences.html) about `sentence-end-double-space`. – Drew Nov 09 '16 at 18:18

2 Answers2

2

UPDATE as of 2017-02-14: With this pull-request merged, now you just have to set sentence-end-double-space to nil and that's it. More information here.

ninrod
  • 1,436
  • 2
  • 13
  • 28
1

Flycheck uses checkdoc-current-buffer to implement the emacs-lisp-checkdoc checker which (in general) takes sentence-end-double-space into account. However, the checker itself is implemented by calling an emacs subprocess and only passing along the variables whitelisted in flycheck-emacs-lisp-checkdoc-variables, which doesn't include sentence-end-double-space. You can (but since it's a defconst shouldn't) add sentence-end-double-space to flycheck-emacs-lisp-checkdoc-variables to pass it along as well:

(setq-local flycheck-emacs-lisp-checkdoc-variables (cons 'sentence-end-double-space flycheck-emacs-lisp-checkdoc-variables))
Wieland
  • 545
  • 3
  • 7
  • I just tried this, it seems like the right direction from everything else I've read. But this didn't fix the problem. For now I will use 2 spaces. Is that a lisp standard? – eflanigan00 Nov 09 '16 at 00:14
  • Two spaces after a sentence is a convention in Emacs Lisp, see https://www.gnu.org/software/emacs/manual/html_node/eintr/sentence_002dend.html. The above `setq-local` command and setting `sentence-end-double-space` to `nil` followed by `flycheck-buffer` removed the warning here. – Wieland Nov 09 '16 at 17:48
  • @Wieland, what's exactly `flycheck-buffer`? I don't understand. I tried adding `(setq-local flycheck-emacs-lisp-checkdoc-variables (cons 'sentence-end-double-space flycheck-emacs-lisp-checkdoc-variables))` plus setting `sentence-end-double-space` to nil. The missing piece is `flycheck-buffer`. But I don't know what do you mean by that? thanks! – ninrod Feb 13 '17 at 21:33
  • `flycheck-buffer` is an interactive function, so you can call it with `M-x`. However, my pull request to respect the value of `sentence-end-double-space` by default has been merged a few days ago (https://github.com/flycheck/flycheck/pull/1199), so this should work automatically with flycheck versions that contain it! – Wieland Feb 14 '17 at 10:15