;;; markchars.el --- Mark characters fitting certain characteristics ;; ;; Author: Lennart Borgman (lennart O borgman A gmail O com) ;; Created: 2010-03-22 Mon ;; Version: ;; Last-Updated: ;; URL: ;; Keywords: ;; Compatibility: ;; ;; Features that might be required by this library: ;; ;; None ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Commentary: ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Change log: ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; 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 the Free Software Foundation; either version 3, or ;; (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with this program; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth ;; Floor, Boston, MA 02110-1301, USA. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;;; Code: ;; (re-search-forward "[[:nonascii:]]") ;; äåö (defgroup markchars nil "Customization group for `markchars-mode'." :group 'convenience) (defface markchars-face '((t (:underline "light blue"))) "Face for `markchars-mode' char marking." :group 'markchars) (defconst markchars-keywords `( ("[[:nonascii:]]" (0 (put-text-property (match-beginning 0) (match-end 0) 'face 'markchars-face))) )) (define-minor-mode markchars-mode "Color up non-ascii chars." :group 'markchars (if markchars-mode (font-lock-add-keywords nil markchars-keywords) (font-lock-remove-keywords nil markchars-keywords)) (font-lock-fontify-buffer)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; markchars.el ends here