Commit 0d54f2f5 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/textmodes/flyspell.el (flyspell-word): Defvar.

Fixes: debbugs:19844

(flyspell-generic-check-word-p): Mark as obsolete.
* lisp/erc/erc-spelling.el (erc-spelling-init):
Use flyspell-generic-check-word-predicate.
parent 03306795
2015-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/flyspell.el (flyspell-word): Defvar (bug#19844).
(flyspell-generic-check-word-p): Mark as obsolete.
2015-02-13 Artur Malabarba <bruce.connor.am@gmail.com> 2015-02-13 Artur Malabarba <bruce.connor.am@gmail.com>
   
* emacs-lisp/package.el (package--compatibility-table): New var. * emacs-lisp/package.el (package--compatibility-table): New var.
...@@ -14,8 +19,8 @@ ...@@ -14,8 +19,8 @@
   
* net/sasl-scram-rfc.el: New file. * net/sasl-scram-rfc.el: New file.
   
* net/sasl.el (sasl-mechanisms): Remove SCRAM-MD5. Add * net/sasl.el (sasl-mechanisms): Remove SCRAM-MD5.
SCRAM-SHA-1 first. Add SCRAM-SHA-1 first.
(sasl-mechanism-alist): Remove SCRAM-MD5 entry. Add SCRAM-SHA-1 (sasl-mechanism-alist): Remove SCRAM-MD5 entry. Add SCRAM-SHA-1
entry (bug#17636). entry (bug#17636).
   
...@@ -34,8 +39,8 @@ ...@@ -34,8 +39,8 @@
   
python.el: Allow killing shell buffer if process is dead. (Bug#19823) python.el: Allow killing shell buffer if process is dead. (Bug#19823)
   
* progmodes/python.el (python-shell-font-lock-kill-buffer): Don't * progmodes/python.el (python-shell-font-lock-kill-buffer):
require a running process. Don't require a running process.
(python-shell-font-lock-post-command-hook): Fontify only if the (python-shell-font-lock-post-command-hook): Fontify only if the
shell process is running. shell process is running.
   
......
2015-02-14 Stefan Monnier <monnier@iro.umontreal.ca>
* erc-spelling.el (erc-spelling-init):
Use flyspell-generic-check-word-predicate.
2015-01-28 Dima Kogan <dima@secretsauce.net> 2015-01-28 Dima Kogan <dima@secretsauce.net>
* erc-backend.el (define-erc-response-handler): Give hook-name * erc-backend.el (define-erc-response-handler): Give hook-name
......
...@@ -71,7 +71,7 @@ The current buffer is given by BUFFER." ...@@ -71,7 +71,7 @@ The current buffer is given by BUFFER."
(if dicts (if dicts
(cadr (car dicts)) (cadr (car dicts))
(erc-with-server-buffer ispell-local-dictionary))))) (erc-with-server-buffer ispell-local-dictionary)))))
(setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify) (setq flyspell-generic-check-word-predicate #'erc-spelling-flyspell-verify)
(flyspell-mode 1))) (flyspell-mode 1)))
(defun erc-spelling-unhighlight-word (word) (defun erc-spelling-unhighlight-word (word)
...@@ -85,6 +85,7 @@ The cadr is the beginning and the caddr is the end." ...@@ -85,6 +85,7 @@ The cadr is the beginning and the caddr is the end."
(defun erc-spelling-flyspell-verify () (defun erc-spelling-flyspell-verify ()
"Flyspell only the input line, nothing else." "Flyspell only the input line, nothing else."
;; FIXME: Don't use `flyspell-word'!
(let ((word-data (and (boundp 'flyspell-word) (let ((word-data (and (boundp 'flyspell-word)
flyspell-word))) flyspell-word)))
(when word-data (when word-data
......
...@@ -304,8 +304,8 @@ Returns t to continue checking, nil otherwise. ...@@ -304,8 +304,8 @@ Returns t to continue checking, nil otherwise.
Flyspell mode sets this variable to whatever is the `flyspell-mode-predicate' Flyspell mode sets this variable to whatever is the `flyspell-mode-predicate'
property of the major mode name.") property of the major mode name.")
(make-variable-buffer-local 'flyspell-generic-check-word-predicate) (make-variable-buffer-local 'flyspell-generic-check-word-predicate)
(defvaralias 'flyspell-generic-check-word-p (define-obsolete-variable-alias 'flyspell-generic-check-word-p
'flyspell-generic-check-word-predicate) 'flyspell-generic-check-word-predicate "25.1")
;;*--- mail mode -------------------------------------------------------*/ ;;*--- mail mode -------------------------------------------------------*/
(put 'mail-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify) (put 'mail-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
...@@ -398,7 +398,7 @@ like <img alt=\"Some thing.\">." ...@@ -398,7 +398,7 @@ like <img alt=\"Some thing.\">."
"Turn on `flyspell-mode' for comments and strings." "Turn on `flyspell-mode' for comments and strings."
(interactive) (interactive)
(setq flyspell-generic-check-word-predicate (setq flyspell-generic-check-word-predicate
'flyspell-generic-progmode-verify) #'flyspell-generic-progmode-verify)
(flyspell-mode 1) (flyspell-mode 1)
(run-hooks 'flyspell-prog-mode-hook)) (run-hooks 'flyspell-prog-mode-hook))
...@@ -1040,6 +1040,8 @@ Mostly we check word delimiters." ...@@ -1040,6 +1040,8 @@ Mostly we check word delimiters."
(goto-char (1+ p))))) (goto-char (1+ p)))))
r))) r)))
(defvar flyspell-word) ;Backward compatibility; some predicates made use of it!
;;*---------------------------------------------------------------------*/ ;;*---------------------------------------------------------------------*/
;;* flyspell-word ... */ ;;* flyspell-word ... */
;;*---------------------------------------------------------------------*/ ;;*---------------------------------------------------------------------*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment