emacs-pretest-bug
[Top][All Lists]
Advanced

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

ispell-change-dictionary does not change global dictionary


From: Michal Nazarewicz
Subject: ispell-change-dictionary does not change global dictionary
Date: Thu, 21 Sep 2006 13:45:07 +0200
User-agent: Opera Mail/9.01 (Linux)

`ispell-change-dictionary' does not change the global dictionary if
the local dictionary has the value we try to change to.  For instance,
the following code should return "en_GB" (as the 3rd call to
`ispell-change-dictionary' changed global dictionary to "en_GB") but
the result is "en".

Moreover, after the second time global dictionary is /changed/
to "en" there should be no messages as global dictionary is already
set to "en" so no change should be made but we see a "Global Ispell
dictionary set to en" message.

#v+
(progn
  (ispell-change-dictionary nil)       ; set local to default
  (ispell-change-dictionary "en" t)    ; set global to "en"
  (ispell-change-dictionary "en_GB")   ; set local to "en_GB"
  (ispell-change-dictionary "en" t)    ; this should do nothing
  (ispell-change-dictionary "en_GB" t) ; this should set global to "en_GB"
  ispell-dictionary)                   ; but ispell-dictionary is "en"
#v-

Patch follows:

#v+
--- lisp/textmodes/ispell.el.orig       2006-09-21 01:38:38.000000000 +0000
+++ lisp/textmodes/ispell.el    2006-09-21 01:41:11.000000000 +0000
@@ -2615,8 +2615,9 @@
   (cond ((equal dict "")
         (ispell-internal-change-dictionary)
         (message "Using %s dictionary"
-                 (or ispell-local-dictionary ispell-dictionary "default")))
-       ((equal dict (or ispell-local-dictionary
+                 (or (and (not arg) ispell-local-dictionary)
+                     ispell-dictionary "default")))
+       ((equal dict (or (and (not arg) ispell-local-dictionary)
                         ispell-dictionary "default"))
         ;; Specified dictionary is the default already. Could reload
         ;; the dictionaries if needed.
#v-

In GNU Emacs 22.0.50.1 (i686-pc-linux-gnu, X toolkit)
 of 2006-05-22 on erwin
server distributor `The X.Org Foundation', version 11.0.60900000
configured using `configure '--with-x-toolkit=lucid' '--with-x'
  '--without-pop' '--without-sound' '--without-toolkit-scroll-bars'
  '--disable-largefile' 'CC=gcc' 'CPPFLAGS=-march=athlon64 -pipe
  -DNDEBUG -DG_DISABLE_ASSERT -s -O3 -falign-loops=1 -falign-labels=1
  -frename-registers -funit-at-a-time  -msse -msse2 -mmmx -m3dnow'
  'LDFLAGS=-s -z combreloc''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: C
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: en_GB
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: pl_PL.ISO8859-2
  locale-coding-system: iso-latin-2
  default-enable-multibyte-characters: t

Major mode:
  Lisp Interaction

Minor modes in effect:
  shell-dirtrack-mode: t
  encoded-kbd-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
  Local Ispell dictionary set to nil
  Global Ispell dictionary set to nil
  Global Ispell dictionary set to en
  Local Ispell dictionary set to en_GB
  Global Ispell dictionary set to en
  "en"


--
Best regards,                                         _     _
 .o. | Liege of Serenly Enlightened Majesty of      o' \,=./ `o
 ..o | Computer Science,  Michal "mina86" Nazarewicz   (o o)
 ooo +--<mina86*tlen.pl>--<jid:mina86*jabber.org>--ooO--(_)--Ooo--




reply via email to

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