]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-spelling.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / erc / erc-spelling.el
index 3445be363bacded4cf8f6e04c09d8b898d2d7948..f0eadf52db6e3b5da3b2d2d4fb1a988dcd7c8e19 100644 (file)
@@ -1,17 +1,18 @@
 ;;; erc-spelling.el --- use flyspell in ERC
 
-;; Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+;; Copyright (C) 2005-2016 Free Software Foundation, Inc.
 
 ;; Author: Jorgen Schaefer <forcer@forcix.cx>
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: irc
 ;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcSpelling
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,9 +20,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -72,7 +71,7 @@ The current buffer is given by BUFFER."
               (if dicts
                   (cadr (car dicts))
                 (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)))
 
 (defun erc-spelling-unhighlight-word (word)
@@ -86,6 +85,7 @@ The cadr is the beginning and the caddr is the end."
 
 (defun erc-spelling-flyspell-verify ()
   "Flyspell only the input line, nothing else."
+  ;; FIXME: Don't use `flyspell-word'!
   (let ((word-data (and (boundp 'flyspell-word)
                         flyspell-word)))
     (when word-data
@@ -108,5 +108,4 @@ The cadr is the beginning and the caddr is the end."
 
 (provide 'erc-spelling)
 
-;; arch-tag: 04ae1c46-0fd1-4e1a-8b80-55bfa471c945
 ;;; erc-spelling.el ends here