[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 115/352: Muutetaan wcheck-mode ja -change-language käyttämään uu
From: |
Stefan Monnier |
Subject: |
[elpa] 115/352: Muutetaan wcheck-mode ja -change-language käyttämään uutta tietokantaa |
Date: |
Mon, 07 Jul 2014 14:03:02 +0000 |
monnier pushed a commit to branch master
in repository elpa.
commit 85d3a10d2c6d529739701fb34483aa2ca09138b8
Author: Teemu Likonen <address@hidden>
Date: Wed Jul 22 08:07:04 2009 +0000
Muutetaan wcheck-mode ja -change-language käyttämään uutta tietokantaa
---
wcheck-mode.el | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/wcheck-mode.el b/wcheck-mode.el
index ec2da3c..99778d6 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -271,7 +271,7 @@ This is used when language does not define face."
"Change language for current buffer (or globally).
Change `wcheck-mode' language to LANGUAGE. The change is
buffer-local but if GLOBAL is non-nil (prefix argument if called
-interactively) then change the default language for new buffers."
+interactively) then change the default language."
(interactive
(let* ((comp (mapcar #'car wcheck-language-data))
(default (cond ((member wcheck-language comp)
@@ -280,20 +280,20 @@ interactively) then change the default language for new
buffers."
(t ""))))
(list (completing-read
(format (if current-prefix-arg
- "Default language for new buffers (%s): "
+ "Global default language (%s): "
"Language for the current buffer (%s): ")
default)
comp nil t nil 'wcheck-change-language-history default)
current-prefix-arg)))
- ;; Change the language, locally or globally, and update buffer-process
- ;; bookkeeping data, if needed.
+ ;; Change the language, locally or globally, and update buffer
+ ;; database, if needed.
(when (stringp language)
(if global
(setq-default wcheck-language language)
(setq wcheck-language language)
(when wcheck-mode
- (wcheck-update-buffer-process-data (current-buffer) language)))
+ (wcheck-update-buffer-data (current-buffer) language)))
;; If this was called interactively do some checks and maintenance.
(when (called-interactively-p)
@@ -311,13 +311,16 @@ interactively) then change the default language for new
buffers."
(wcheck-timer-add-read-request (current-buffer))
(wcheck-remove-overlays)))))
- wcheck-buffer-process-data))
+ (wcheck-get-buffer-data (current-buffer) :language)))
;;;###autoload
(define-minor-mode wcheck-mode
"Interface for external spell-checkers and filtering programs.
+With optional ARG turn on the mode if ARG is positive, turn off
+if negative. if ARG is not given toggle the mode.
+
Wcheck is a minor mode for automatically checking and marking
words or other text elements in Emacs buffer. Wcheck sends (parts
of) buffer's content to an external text-filtering program and,
@@ -362,8 +365,7 @@ information on how to configure Wcheck mode. Interactive
command
(wcheck-mode -1)
(message "Language \"%s\": program \"%s\" is not executable"
wcheck-language
- (wcheck-query-language-data wcheck-language
- 'program)))
+ (wcheck-query-language-data wcheck-language 'program)))
(t
;; We are ready to really turn on the mode.
@@ -376,8 +378,8 @@ information on how to configure Wcheck mode. Interactive
command
;; once but it's no harm to ensure their existence every time.
(wcheck-add-global-hooks)
- ;; Add this buffer to the bookkeeper.
- (wcheck-update-buffer-process-data (current-buffer) wcheck-language)
+ ;; Add this buffer to buffer database.
+ (wcheck-update-buffer-data (current-buffer) wcheck-language)
;; Start idle timer if it's not already started. The timer runs
;; a function which updates buffers which have requested for
@@ -392,16 +394,17 @@ information on how to configure Wcheck mode. Interactive
command
;; Turn off the mode.
- ;; We clear overlays form the buffer, remove the buffer from
- ;; bookkeeper's data and clear the variable holding words received
- ;; from external process.
+ ;; We clear overlays form the buffer, remove the buffer from buffer
+ ;; database and clear the variable holding words received from
+ ;; external process.
(wcheck-remove-overlays)
- (wcheck-update-buffer-process-data (current-buffer) nil)
- (setq wcheck-received-words nil)
+ (wcheck-update-buffer-data (current-buffer) nil)
+ (setq wcheck-received-words nil
+ wcheck-buffer-window-areas nil)
- ;; If there are no buffers using Wcheck mode anymore, stop the idle
+ ;; If there are no buffers using wcheck-mode anymore, stop the idle
;; timer and remove global hooks.
- (when (not wcheck-buffer-process-data)
+ (when (null (wcheck-get-all-data :buffer))
(wcheck-remove-global-hooks)
(when wcheck-timer
(cancel-timer wcheck-timer)
- [elpa] 105/352: wcheck-update-buffer-data uuden tietokannan mukaiseksi, (continued)
- [elpa] 105/352: wcheck-update-buffer-data uuden tietokannan mukaiseksi, Stefan Monnier, 2014/07/07
- [elpa] 110/352: Muutetaan wcheck-send-words hakemaan kielitiedot tietokannasta, Stefan Monnier, 2014/07/07
- [elpa] 107/352: Poistetaan turha wcheck-end-process, Stefan Monnier, 2014/07/07
- [elpa] 104/352: Lisätään matalan tason tietokantafunktiot, Stefan Monnier, 2014/07/07
- [elpa] 114/352: Asetetaan ajastinfunktiot hakemaan tiedot uudesta tietokannasta, Stefan Monnier, 2014/07/07
- [elpa] 108/352: Siirretään koukkujen asennus omiin funktioihinsa, Stefan Monnier, 2014/07/07
- [elpa] 112/352: Muutetaan wcheck-make-overlay hakemaan kielitiedot tietokannasta, Stefan Monnier, 2014/07/07
- [elpa] 116/352: Muutetaan tietokannan kyselyfunktio geneerisemmäksi, Stefan Monnier, 2014/07/07
- [elpa] 109/352: Muutetaan wcheck-read-words hakemaan kielitiedot tietokannasta, Stefan Monnier, 2014/07/07
- [elpa] 120/352: Kielellistä hienosäätöä dokumentteihin, Stefan Monnier, 2014/07/07
- [elpa] 115/352: Muutetaan wcheck-mode ja -change-language käyttämään uutta tietokantaa,
Stefan Monnier <=
- [elpa] 118/352: Lisätään koodin väliotsikoita, Stefan Monnier, 2014/07/07
- [elpa] 111/352: Muutetaan wcheck-paint-words hakemaan kielitiedot tietokannasta, Stefan Monnier, 2014/07/07
- [elpa] 121/352: Välitetään kaikki tiedot funktiolle wcheck-make-overlay, Stefan Monnier, 2014/07/07
- [elpa] 117/352: wcheck-receive-words varmemmaksi, Stefan Monnier, 2014/07/07
- [elpa] 123/352: Kielellistä säätöä kommentteihin ja funktion kuvaukseen, Stefan Monnier, 2014/07/07
- [elpa] 134/352: Korjataan kirjoitusvirhe; hienosäätöä, Stefan Monnier, 2014/07/07
- [elpa] 130/352: Korjataan kirjoitusvirhe, Stefan Monnier, 2014/07/07
- [elpa] 125/352: Yksinkertaistetaan kommenttia, Stefan Monnier, 2014/07/07
- [elpa] 131/352: Tehostetaan append-komentoja, Stefan Monnier, 2014/07/07
- [elpa] 136/352: Käytetään vain PLIST-PUT-funktion arvoa eikä sen sivutuotetta, Stefan Monnier, 2014/07/07