;;; wcheck-mode.el --- General interface for text checkers
-;; Copyright (C) 2009-2014 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
;; Author: Teemu Likonen <tlikonen@iki.fi>
;; Maintainer: Teemu Likonen <tlikonen@iki.fi>
;; Created: 2009-07-04
;; URL: https://github.com/tlikonen/wcheck-mode
;; Keywords: text spell check languages ispell
-;; Version: 2014.6.21
+;; Version: 2016.1.30
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
(when font-lock-mode
(save-excursion
- (jit-lock-fontify-now (min beg end) (max beg end))))
+ (funcall (if (fboundp 'font-lock-ensure)
+ #'font-lock-ensure
+ #'font-lock-fontify-region)
+ (min beg end) (max beg end))))
(wcheck--with-language-data
(language (wcheck--buffer-data-get :buffer buffer :language))
If optional TARGET-KEY is not given return all data associated
with the matching KEY VALUE."
(catch 'answer
- (dolist (item wcheck--buffer-data)
- (when (equal value (aref item (wcheck--buffer-data-key-index key)))
- (throw 'answer (if target-key
- (aref item (wcheck--buffer-data-key-index
- target-key))
- item))))))
+ (let ((index (wcheck--buffer-data-key-index key)))
+ (dolist (item wcheck--buffer-data)
+ (when (equal value (aref item index))
+ (throw 'answer (if target-key
+ (aref item (wcheck--buffer-data-key-index
+ target-key))
+ item)))))))
(defun wcheck--buffer-data-get-all (&optional key)