all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* flyspell duplicate exceptions
@ 2020-07-19  8:45 Colin Baxter
  2020-07-19 10:01 ` Kévin Le Gouguec
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Baxter @ 2020-07-19  8:45 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

Is there any way to add "myexception" to the default list of the variable
'flyspell-mark-duplications-exceptions'? An emacs-init setq in the manner of

#+begin_src elisp
(setq flyspell-mark-duplications-exceptions
  '((nil . ("that" "had" "myexception")) ;; Defaults + myexception
    ("\\`francais" . ("nous" "vous"))    ;; French defaults
)) ;; End brackets
#+end_src

works, but a repeat of default settings seems wasteful to me.

Best wishes,

Colin

-- 
Colin Baxter
URL: http://www.Colin-Baxter.com




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: flyspell duplicate exceptions
  2020-07-19  8:45 flyspell duplicate exceptions Colin Baxter
@ 2020-07-19 10:01 ` Kévin Le Gouguec
  2020-07-19 11:12   ` Colin Baxter
  0 siblings, 1 reply; 5+ messages in thread
From: Kévin Le Gouguec @ 2020-07-19 10:01 UTC (permalink / raw)
  To: Colin Baxter; +Cc: help-gnu-emacs

Colin Baxter <m43cap@yandex.com> writes:

> Is there any way to add "myexception" to the default list of the variable
> 'flyspell-mark-duplications-exceptions'?

If I understand generalized variables correctly:

#+begin_src elisp
(push "myexception"
      (alist-get nil flyspell-mark-duplications-exceptions))
#+end_src



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: flyspell duplicate exceptions
  2020-07-19 10:01 ` Kévin Le Gouguec
@ 2020-07-19 11:12   ` Colin Baxter
  2020-07-19 12:02     ` Dmitry Alexandrov
  0 siblings, 1 reply; 5+ messages in thread
From: Colin Baxter @ 2020-07-19 11:12 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: help-gnu-emacs

Dear Kévin,
>>>>> Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:

    > Colin Baxter <m43cap@yandex.com> writes:
    >> Is there any way to add "myexception" to the default list of the
    >> variable 'flyspell-mark-duplications-exceptions'?

    > If I understand generalized variables correctly:

    > #+begin_src elisp (push "myexception" (alist-get nil
    > flyspell-mark-duplications-exceptions))
    > #+end_src

Great, this works. I ended up actually using it in a '.dir-locals.el'
since flyspell must be loaded first to ensure that the variable 
'flyspell-mark-duplications-exceptions' is recognised.

Thanks again.

Best wishes,

Colin.

-- 
Colin Baxter
URL: http://www.Colin-Baxter.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: flyspell duplicate exceptions
  2020-07-19 11:12   ` Colin Baxter
@ 2020-07-19 12:02     ` Dmitry Alexandrov
  2020-07-19 13:05       ` Colin Baxter
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Alexandrov @ 2020-07-19 12:02 UTC (permalink / raw)
  To: Colin Baxter; +Cc: help-gnu-emacs, Kévin Le Gouguec

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Colin Baxter <m43cap@yandex.com> wrote:
> I ended up actually using it in a '.dir-locals.el' since flyspell must be loaded first to ensure that the variable  'flyspell-mark-duplications-exceptions' is recognised.

	(with-eval-after-load 'flyspell …)

or just

	(require 'flyspell)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: flyspell duplicate exceptions
  2020-07-19 12:02     ` Dmitry Alexandrov
@ 2020-07-19 13:05       ` Colin Baxter
  0 siblings, 0 replies; 5+ messages in thread
From: Colin Baxter @ 2020-07-19 13:05 UTC (permalink / raw)
  To: Dmitry Alexandrov; +Cc: help-gnu-emacs, Kévin Le Gouguec

Dear Dmitry
>>>>> Dmitry Alexandrov <dag@gnui.org> writes:

    > Colin Baxter <m43cap@yandex.com> wrote:
    >> I ended up actually using it in a '.dir-locals.el' since flyspell
    >> must be loaded first to ensure that the variable
    >> 'flyspell-mark-duplications-exceptions' is recognised.

    > 	(with-eval-after-load 'flyspell …)

    > or just

    > 	(require 'flyspell)

I used

#+begin_src elisp
(with-eval-after-load 'flyspell
  (push "myexception" ;; Remember to use lower case!
  (alist-get nil flyspell-mark-duplications-exceptions)))
#+end_src

Best wishes,


Colin.

-- 
Colin Baxter
URL: http://www.Colin-Baxter.com



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-19 13:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-19  8:45 flyspell duplicate exceptions Colin Baxter
2020-07-19 10:01 ` Kévin Le Gouguec
2020-07-19 11:12   ` Colin Baxter
2020-07-19 12:02     ` Dmitry Alexandrov
2020-07-19 13:05       ` Colin Baxter

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.