emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 345/352: Use prefix wcheck-- in internal functions and variables


From: Stefan Monnier
Subject: [elpa] 345/352: Use prefix wcheck-- in internal functions and variables
Date: Mon, 07 Jul 2014 14:05:46 +0000

monnier pushed a commit to branch master
in repository elpa.

commit f9f7266d4ee70cb1dab72f5fb4cdb9787db34288
Author: Teemu Likonen <address@hidden>
Date:   Sun Apr 20 18:23:07 2014 +0300

    Use prefix wcheck-- in internal functions and variables
---
 wcheck-mode.el |  689 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 344 insertions(+), 345 deletions(-)

diff --git a/wcheck-mode.el b/wcheck-mode.el
index 693b60a..560da50 100644
--- a/wcheck-mode.el
+++ b/wcheck-mode.el
@@ -80,7 +80,7 @@
   :group 'applications)
 
 
-(defconst wcheck-language-data-customize-interface
+(defconst wcheck--language-data-customize-interface
   '(choice
     :format "%[Option%] %v"
 
@@ -584,11 +584,11 @@ For configuration examples, see the README file in URL
           (string :tag "Language")
           (repeat :inline t
                   :tag "Options"
-                  ,wcheck-language-data-customize-interface))))
+                  ,wcheck--language-data-customize-interface))))
 
 
 ;;;###autoload
-(defconst wcheck-language-data-defaults-hard-coded
+(defconst wcheck--language-data-defaults-hard-coded
   '((parser . wcheck-parser-lines)
     (connection . nil)
     (face . wcheck-default-face)
@@ -608,7 +608,7 @@ provides useful defaults if both `wcheck-language-data' and
 
 ;;;###autoload
 (defcustom wcheck-language-data-defaults
-  wcheck-language-data-defaults-hard-coded
+  wcheck--language-data-defaults-hard-coded
   "Default language configuration for `wcheck-mode'.
 These default values are used when language-specific settings
 don't provide a valid value. `wcheck-mode' will choose some
@@ -674,12 +674,12 @@ This is used when language does not define a face."
 (defvar wcheck-mode-map (make-sparse-keymap)
   "Keymap for `wcheck-mode'.")
 
-(defvar wcheck-timer nil)
-(defvar wcheck-timer-idle .3
+(defvar wcheck--timer nil)
+(defvar wcheck--timer-idle .3
   "`wcheck-mode' idle timer delay (in seconds).")
-(defvar wcheck-timer-paint-event-count 0)
+(defvar wcheck--timer-paint-event-count 0)
 
-(defvar wcheck-timer-paint-event-count-std 3
+(defvar wcheck--timer-paint-event-count-std 3
   "Run buffer paint event this many times in a row.
 With too low values all data from external processes may not have
 arrived and window gets only partially painted. A higher value
@@ -687,18 +687,18 @@ increases the probability that windows get fully painted 
but it
 also makes `wcheck-jump-forward' and `wcheck-jump-backward'
 slower. A suitable compromise may be 3 or 4.")
 
-(defvar wcheck-change-language-history nil
+(defvar wcheck--change-language-history nil
   "Language history for command `wcheck-change-language'.")
 
-(defvar wcheck-buffer-data nil)
+(defvar wcheck--buffer-data nil)
 
-(defvar wcheck-jump-step 5000)
+(defvar wcheck--jump-step 5000)
 
 
 ;;; Macros
 
 
-(defmacro wcheck-define-condition (name superclass &optional message)
+(defmacro wcheck--define-condition (name superclass &optional message)
   (declare (indent defun))
   `(progn
      (put ',name 'error-conditions
@@ -707,29 +707,29 @@ slower. A suitable compromise may be 3 or 4.")
      ',name))
 
 
-(defmacro wcheck-loop-over-reqs-engine (key var &rest body)
+(defmacro wcheck--loop-over-reqs-engine (key var &rest body)
   `(dolist (,var (delq nil (mapcar (lambda (buffer)
-                                     (when (wcheck-buffer-data-get
+                                     (when (wcheck--buffer-data-get
                                             :buffer buffer ,key)
                                        buffer))
-                                   (wcheck-buffer-data-get-all :buffer))))
+                                   (wcheck--buffer-data-get-all :buffer))))
      (when (buffer-live-p ,var)
        (with-current-buffer ,var
          ,@body))))
 
 
-(defmacro wcheck-loop-over-read-reqs (var &rest body)
+(defmacro wcheck--loop-over-read-reqs (var &rest body)
   (declare (indent 1))
-  `(wcheck-loop-over-reqs-engine :read-req ,var ,@body))
-(defmacro wcheck-loop-over-paint-reqs (var &rest body)
+  `(wcheck--loop-over-reqs-engine :read-req ,var ,@body))
+(defmacro wcheck--loop-over-paint-reqs (var &rest body)
   (declare (indent 1))
-  `(wcheck-loop-over-reqs-engine :paint-req ,var ,@body))
-(defmacro wcheck-loop-over-jump-reqs (var &rest body)
+  `(wcheck--loop-over-reqs-engine :paint-req ,var ,@body))
+(defmacro wcheck--loop-over-jump-reqs (var &rest body)
   (declare (indent 1))
-  `(wcheck-loop-over-reqs-engine :jump-req ,var ,@body))
+  `(wcheck--loop-over-reqs-engine :jump-req ,var ,@body))
 
 
-(defmacro wcheck-with-language-data (var-lang bindings &rest body)
+(defmacro wcheck--with-language-data (var-lang bindings &rest body)
   (declare (indent 2))
   (let ((language (make-symbol "--wck-language--")))
     `(let* ((,language ,(cadr var-lang))
@@ -750,16 +750,16 @@ slower. A suitable compromise may be 3 or 4.")
 ;;; Conditions
 
 
-(wcheck-define-condition wcheck-error error)
-(wcheck-define-condition wcheck-language-does-not-exist-error wcheck-error)
-(wcheck-define-condition wcheck-program-not-configured-error wcheck-error)
-(wcheck-define-condition wcheck-not-a-list-of-strings-error wcheck-error)
-(wcheck-define-condition wcheck-funcall-error wcheck-error)
-(wcheck-define-condition wcheck-action-error wcheck-error)
-(wcheck-define-condition wcheck-action-program-error wcheck-action-error)
-(wcheck-define-condition wcheck-parser-function-not-configured-error
-  wcheck-action-error)
-(wcheck-define-condition wcheck-overlay-not-found-error wcheck-error)
+(wcheck--define-condition wcheck--error error)
+(wcheck--define-condition wcheck--language-does-not-exist-error wcheck--error)
+(wcheck--define-condition wcheck--program-not-configured-error wcheck--error)
+(wcheck--define-condition wcheck--not-a-list-of-strings-error wcheck--error)
+(wcheck--define-condition wcheck--funcall-error wcheck--error)
+(wcheck--define-condition wcheck--action-error wcheck--error)
+(wcheck--define-condition wcheck--action-program-error wcheck--action-error)
+(wcheck--define-condition wcheck--parser-function-not-configured-error
+  wcheck--action-error)
+(wcheck--define-condition wcheck--overlay-not-found-error wcheck--error)
 
 
 ;;; Interactive commands
@@ -785,7 +785,7 @@ interactively) then change the global default language."
                         "Global default language (%s): "
                       "Language for the current buffer (%s): ")
                     default)
-            comp nil t nil 'wcheck-change-language-history default)
+            comp nil t nil 'wcheck--change-language-history default)
            current-prefix-arg)))
 
   (condition-case error-data
@@ -802,74 +802,74 @@ interactively) then change the global default language."
           ;; checker program or function is configured and if all is OK
           ;; request update for the buffer.
           (when wcheck-mode
-            (if (wcheck-program-configured-p wcheck-language)
+            (if (wcheck--program-configured-p wcheck-language)
                 ;; It's OK; update the buffer.
                 (progn
-                  (wcheck-buffer-lang-proc-data-update
+                  (wcheck--buffer-lang-proc-data-update
                    (current-buffer) wcheck-language)
-                  (wcheck-buffer-data-set (current-buffer) :read-req t)
-                  (wcheck-remove-overlays))
+                  (wcheck--buffer-data-set (current-buffer) :read-req t)
+                  (wcheck--remove-overlays))
 
-              (signal 'wcheck-program-not-configured-error wcheck-language))))
+              (signal 'wcheck--program-not-configured-error wcheck-language))))
 
         ;; Return the language.
         language)
 
-    (wcheck-program-not-configured-error
+    (wcheck--program-not-configured-error
      (wcheck-mode -1)
      (message "Language \"%s\": checker program is not configured"
               (cdr error-data)))))
 
 
-(defun wcheck-mode-turn-on ()
+(defun wcheck--mode-turn-on ()
   ;; Turn the mode on, but first some checks.
   (let ((buffer (current-buffer))
         (language wcheck-language))
     (condition-case error-data
         (cond
          ((minibufferp buffer)
-          (signal 'wcheck-error "Can't use `wcheck-mode' in a minibuffer"))
+          (signal 'wcheck--error "Can't use `wcheck-mode' in a minibuffer"))
 
-         ((not (wcheck-language-exists-p language))
-          (signal 'wcheck-language-does-not-exist-error language))
+         ((not (wcheck--language-exists-p language))
+          (signal 'wcheck--language-does-not-exist-error language))
 
-         ((not (wcheck-program-configured-p language))
-          (signal 'wcheck-program-not-configured-error language))
+         ((not (wcheck--program-configured-p language))
+          (signal 'wcheck--program-not-configured-error language))
 
          (t
           (make-local-variable 'wcheck-language)
-          (wcheck-add-local-hooks buffer)
-          (wcheck-add-global-hooks)
-          (wcheck-buffer-lang-proc-data-update buffer language)
-          (wcheck-timer-start)
-          (wcheck-buffer-data-set buffer :read-req t)))
+          (wcheck--add-local-hooks buffer)
+          (wcheck--add-global-hooks)
+          (wcheck--buffer-lang-proc-data-update buffer language)
+          (wcheck--timer-start)
+          (wcheck--buffer-data-set buffer :read-req t)))
 
-      (wcheck-program-not-configured-error
+      (wcheck--program-not-configured-error
        (wcheck-mode -1)
        (message "Language \"%s\": checker program not configured"
                 (cdr error-data)))
 
-      (wcheck-language-does-not-exist-error
+      (wcheck--language-does-not-exist-error
        (wcheck-mode -1)
        (message "Language \"%s\" does not exist" (cdr error-data))))))
 
 
-(defun wcheck-mode-turn-off ()
+(defun wcheck--mode-turn-off ()
   (let ((buffer (current-buffer)))
     ;; We clear overlays form the buffer, remove the buffer from buffer
     ;; database.
-    (wcheck-remove-overlays)
-    (wcheck-buffer-lang-proc-data-update buffer nil)
+    (wcheck--remove-overlays)
+    (wcheck--buffer-lang-proc-data-update buffer nil)
 
     ;; If there are no buffers using wcheck-mode anymore, stop the idle
     ;; timer and remove global hooks.
-    (when (null (wcheck-buffer-data-get-all :buffer))
-      (wcheck-timer-stop)
-      (wcheck-remove-global-hooks))
-    (wcheck-remove-local-hooks buffer)))
+    (when (null (wcheck--buffer-data-get-all :buffer))
+      (wcheck--timer-stop)
+      (wcheck--remove-global-hooks))
+    (wcheck--remove-local-hooks buffer)))
 
 
-(defun wcheck-mode-line-lang ()
+(defun wcheck--mode-line-lang ()
   (condition-case nil
       (let (lang-code)
         (catch 'enough
@@ -878,7 +878,7 @@ interactively) then change the global default language."
                     (push c lang-code)
                     (when (>= (length lang-code) 2)
                       (throw 'enough t))))
-                (wcheck-buffer-data-get :buffer (current-buffer) :language)))
+                (wcheck--buffer-data-get :buffer (current-buffer) :language)))
         (apply #'string (nreverse lang-code)))
     (error "")))
 
@@ -919,15 +919,15 @@ a buffer position. Function `wcheck-query-language-data' 
can be
 used for querying effective configuration data for any language."
 
   :init-value nil
-  :lighter (" W:" (:eval (wcheck-mode-line-lang)))
+  :lighter (" W:" (:eval (wcheck--mode-line-lang)))
   :keymap wcheck-mode-map
 
   (condition-case error-data
       (if wcheck-mode
-          (wcheck-mode-turn-on)
-        (wcheck-mode-turn-off))
+          (wcheck--mode-turn-on)
+        (wcheck--mode-turn-off))
 
-    (wcheck-error
+    (wcheck--error
      (wcheck-mode -1)
      (message "%s" (cdr error-data)))))
 
@@ -935,48 +935,48 @@ used for querying effective configuration data for any 
language."
 ;;; Timers
 
 
-(defun wcheck-timer-start ()
+(defun wcheck--timer-start ()
   "Start `wcheck-mode' idle timer if it's not running already."
-  (unless wcheck-timer
-    (setq wcheck-timer
-          (run-with-idle-timer wcheck-timer-idle t
-                               #'wcheck-timer-read-event))))
+  (unless wcheck--timer
+    (setq wcheck--timer
+          (run-with-idle-timer wcheck--timer-idle t
+                               #'wcheck--timer-read-event))))
 
 
-(defun wcheck-timer-stop ()
+(defun wcheck--timer-stop ()
   "Stop `wcheck-mode' idle timer."
-  (when wcheck-timer
-    (cancel-timer wcheck-timer)
-    (setq wcheck-timer nil)))
+  (when wcheck--timer
+    (cancel-timer wcheck--timer)
+    (setq wcheck--timer nil)))
 
 
-(defun wcheck-funcall-after-idle (function &rest args)
+(defun wcheck--funcall-after-idle (function &rest args)
   (apply #'run-with-idle-timer
-         (+ wcheck-timer-idle (wcheck-current-idle-time-seconds))
+         (+ wcheck--timer-idle (wcheck--current-idle-time-seconds))
          nil function args))
 
 
-(defun wcheck-timer-paint-event-run (&optional count)
+(defun wcheck--timer-paint-event-run (&optional count)
   (if (integerp count)
-      (let ((at-least (max count wcheck-timer-paint-event-count)))
-        (if (> wcheck-timer-paint-event-count 0)
-            (setq wcheck-timer-paint-event-count at-least)
-          (setq wcheck-timer-paint-event-count at-least)
-          (wcheck-funcall-after-idle #'wcheck-timer-paint-event)))
-    (if (> (setq wcheck-timer-paint-event-count
-                 (1- wcheck-timer-paint-event-count))
+      (let ((at-least (max count wcheck--timer-paint-event-count)))
+        (if (> wcheck--timer-paint-event-count 0)
+            (setq wcheck--timer-paint-event-count at-least)
+          (setq wcheck--timer-paint-event-count at-least)
+          (wcheck--funcall-after-idle #'wcheck--timer-paint-event)))
+    (if (> (setq wcheck--timer-paint-event-count
+                 (1- wcheck--timer-paint-event-count))
            0)
-        (wcheck-funcall-after-idle #'wcheck-timer-paint-event)
-      (wcheck-timer-jump-event))))
+        (wcheck--funcall-after-idle #'wcheck--timer-paint-event)
+      (wcheck--timer-jump-event))))
 
 
-(defun wcheck-force-read (buffer)
+(defun wcheck--force-read (buffer)
   (redisplay t)
-  (wcheck-buffer-data-set buffer :read-req t)
-  (wcheck-timer-read-event))
+  (wcheck--buffer-data-set buffer :read-req t)
+  (wcheck--timer-read-event))
 
 
-(defun wcheck-timer-read-event ()
+(defun wcheck--timer-read-event ()
   "Send windows' content to checker program or function.
 
 This function is usually called by the `wcheck-mode' idle timer.
@@ -986,14 +986,14 @@ it checker program or function associated with the 
buffer's
 language. Finally, this function starts another idle timer for
 marking strings in buffers."
 
-  (wcheck-loop-over-read-reqs buffer
-    (unless (wcheck-buffer-data-get :buffer buffer :jump-req)
+  (wcheck--loop-over-read-reqs buffer
+    (unless (wcheck--buffer-data-get :buffer buffer :jump-req)
       ;; We are about to fulfill buffer's window-reading request so
       ;; remove the request. Reset also the list of received strings and
       ;; visible window areas.
-      (wcheck-buffer-data-set buffer :read-req nil)
-      (wcheck-buffer-data-set buffer :strings nil)
-      (wcheck-buffer-data-set buffer :areas nil)
+      (wcheck--buffer-data-set buffer :read-req nil)
+      (wcheck--buffer-data-set buffer :strings nil)
+      (wcheck--buffer-data-set buffer :areas nil)
 
       ;; Walk through all windows which belong to this buffer.
       (let (area-alist strings)
@@ -1007,37 +1007,37 @@ marking strings in buffers."
 
         ;; Combine overlapping buffer areas and read strings from all
         ;; areas.
-        (let ((combined (wcheck-combine-overlapping-areas area-alist)))
-          (wcheck-buffer-data-set buffer :areas combined)
+        (let ((combined (wcheck--combine-overlapping-areas area-alist)))
+          (wcheck--buffer-data-set buffer :areas combined)
           (dolist (area combined)
-            (setq strings (append (wcheck-read-strings
+            (setq strings (append (wcheck--read-strings
                                    buffer (car area) (cdr area))
                                   strings))))
         ;; Send strings to checker engine.
-        (wcheck-send-strings buffer strings))))
+        (wcheck--send-strings buffer strings))))
 
   ;; Start a timer which will mark text in buffers/windows.
-  (wcheck-timer-paint-event-run wcheck-timer-paint-event-count-std))
+  (wcheck--timer-paint-event-run wcheck--timer-paint-event-count-std))
 
 
-(defun wcheck-send-strings (buffer strings)
+(defun wcheck--send-strings (buffer strings)
   "Send STRINGS for the process that handles BUFFER.
 STRINGS is a list of strings to be sent as input for the external
 process which handles BUFFER. Each string in STRINGS is sent as
 separate line."
-  (wcheck-with-language-data
-      (nil (wcheck-buffer-data-get :buffer buffer :language))
+  (wcheck--with-language-data
+      (nil (wcheck--buffer-data-get :buffer buffer :language))
       (program syntax (case-fold-search case-fold))
 
     (condition-case nil
-        (cond ((or (wcheck-buffer-data-get :buffer buffer :process)
+        (cond ((or (wcheck--buffer-data-get :buffer buffer :process)
                    (stringp program))
                (process-send-string
-                (wcheck-start-get-process buffer)
+                (wcheck--start-get-process buffer)
                 (concat (mapconcat #'identity strings "\n") "\n"))
                (condition-case nil
                    (with-current-buffer
-                       (process-buffer (wcheck-buffer-data-get
+                       (process-buffer (wcheck--buffer-data-get
                                         :buffer buffer :process))
                      (erase-buffer))
                  (error nil)))
@@ -1050,28 +1050,28 @@ separate line."
                             (condition-case nil
                                 (with-syntax-table (eval syntax)
                                   (funcall program strings))
-                              (error (signal 'wcheck-funcall-error nil))))))
-                     (if (wcheck-list-of-strings-p received)
+                              (error (signal 'wcheck--funcall-error nil))))))
+                     (if (wcheck--list-of-strings-p received)
                          (when received
-                           (wcheck-buffer-data-set buffer :strings received)
-                           (wcheck-buffer-data-set buffer :paint-req t))
-                       (signal 'wcheck-not-a-list-of-strings-error nil)))))))
+                           (wcheck--buffer-data-set buffer :strings received)
+                           (wcheck--buffer-data-set buffer :paint-req t))
+                       (signal 'wcheck--not-a-list-of-strings-error nil)))))))
 
-      (wcheck-not-a-list-of-strings-error
+      (wcheck--not-a-list-of-strings-error
        (with-current-buffer buffer
          (wcheck-mode -1)
          (message (concat "Checker function did not return a list of "
                           "strings (or nil)"))))
 
-      (wcheck-funcall-error
+      (wcheck--funcall-error
        (message "Checker function signaled an error")))))
 
 
-(defun wcheck-receive-strings (process string)
+(defun wcheck--receive-strings (process string)
   "`wcheck-mode' process output handler function."
-  (let ((buffer (wcheck-buffer-data-get :process process :buffer)))
-    (wcheck-with-language-data
-        (nil (wcheck-buffer-data-get :process process :language))
+  (let ((buffer (wcheck--buffer-data-get :process process :buffer)))
+    (wcheck--with-language-data
+        (nil (wcheck--buffer-data-get :process process :language))
         (parser syntax (case-fold-search case-fold))
       (when (buffer-live-p buffer)
         (with-current-buffer buffer
@@ -1079,7 +1079,7 @@ separate line."
           ;; If process is running proceed to collect and paint the
           ;; strings.
           (condition-case error-data
-              (if (wcheck-process-running-p process)
+              (if (wcheck--process-running-p process)
                   (with-current-buffer (process-buffer process)
                     (save-excursion
                       (goto-char (point-max))
@@ -1091,67 +1091,67 @@ separate line."
                                  (condition-case nil
                                      (with-syntax-table (eval syntax)
                                        (funcall parser))
-                                   (error (signal 'wcheck-funcall-error
+                                   (error (signal 'wcheck--funcall-error
                                                   nil)))))))
                         (when (and parsed-strings
-                                   (wcheck-list-of-strings-p parsed-strings))
-                          (wcheck-buffer-data-set
+                                   (wcheck--list-of-strings-p parsed-strings))
+                          (wcheck--buffer-data-set
                            buffer :strings parsed-strings)
-                          (wcheck-buffer-data-set buffer :paint-req t)))))
+                          (wcheck--buffer-data-set buffer :paint-req t)))))
 
                 ;; It's not running. Turn off the mode.
                 (wcheck-mode -1)
-                (signal 'wcheck-error
+                (signal 'wcheck--error
                         (format "Process is not running for buffer \"%s\""
                                 (buffer-name buffer))))
 
-            (wcheck-funcall-error
+            (wcheck--funcall-error
              (message "Checker output parser function signaled an error"))
 
-            (wcheck-error
+            (wcheck--error
              (message "%s" (cdr error-data)))))))))
 
 
-(defun wcheck-timer-paint-event ()
+(defun wcheck--timer-paint-event ()
   "Mark strings in windows.
 
 This is normally called by the `wcheck-mode' idle timer. This
 function marks (with overlays) strings in the buffers that have
 requested it."
 
-  (wcheck-loop-over-paint-reqs buffer
-    (unless (wcheck-buffer-data-get :buffer buffer :jump-req)
-      (wcheck-remove-overlays))
+  (wcheck--loop-over-paint-reqs buffer
+    (unless (wcheck--buffer-data-get :buffer buffer :jump-req)
+      (wcheck--remove-overlays))
     ;; We are about to mark text in this buffer so remove this buffer's
     ;; request.
-    (wcheck-buffer-data-set buffer :paint-req nil)
+    (wcheck--buffer-data-set buffer :paint-req nil)
     ;; Walk through the visible text areas and mark text based on the
     ;; string list returned by an external process.
     (when wcheck-mode
-      (dolist (area (wcheck-buffer-data-get :buffer buffer :areas))
-        (wcheck-paint-strings buffer (car area) (cdr area)
-                              (wcheck-buffer-data-get :buffer buffer
-                                                      :strings)
-                              ;; If jump-req is active then paint
-                              ;; invisible text too.
-                              (wcheck-buffer-data-get :buffer buffer
-                                                      :jump-req)))))
+      (dolist (area (wcheck--buffer-data-get :buffer buffer :areas))
+        (wcheck--paint-strings buffer (car area) (cdr area)
+                               (wcheck--buffer-data-get :buffer buffer
+                                                        :strings)
+                               ;; If jump-req is active then paint
+                               ;; invisible text too.
+                               (wcheck--buffer-data-get :buffer buffer
+                                                        :jump-req)))))
 
-  (wcheck-timer-paint-event-run))
+  (wcheck--timer-paint-event-run))
 
 
-(defun wcheck-timer-jump-event ()
-  (wcheck-loop-over-jump-reqs buffer
-    (let* ((jump-req (wcheck-buffer-data-get :buffer buffer :jump-req))
-           (start (wcheck-jump-req-start jump-req))
-           (bound (wcheck-jump-req-bound jump-req))
-           (window (wcheck-jump-req-window jump-req)))
+(defun wcheck--timer-jump-event ()
+  (wcheck--loop-over-jump-reqs buffer
+    (let* ((jump-req (wcheck--buffer-data-get :buffer buffer :jump-req))
+           (start (wcheck--jump-req-start jump-req))
+           (bound (wcheck--jump-req-bound jump-req))
+           (window (wcheck--jump-req-window jump-req)))
 
-      (wcheck-buffer-data-set buffer :jump-req nil)
+      (wcheck--buffer-data-set buffer :jump-req nil)
 
       (condition-case nil
           (cond ((> bound start)
-                 (let ((ol (wcheck-overlay-next start bound)))
+                 (let ((ol (wcheck--overlay-next start bound)))
                    (cond (ol
                           (if (and (window-live-p window)
                                    (eq buffer (window-buffer window)))
@@ -1161,14 +1161,14 @@ requested it."
                             (show-entry))
                           (message "Found from line %s"
                                    (line-number-at-pos (point)))
-                          (wcheck-force-read buffer))
+                          (wcheck--force-read buffer))
                          ((< bound (point-max))
-                          (wcheck-jump-req buffer window (1+ bound)
-                                           (+ (1+ bound) wcheck-jump-step)))
+                          (wcheck--jump-req buffer window (1+ bound)
+                                            (+ (1+ bound) wcheck--jump-step)))
                          (t
-                          (signal 'wcheck-overlay-not-found-error nil)))))
+                          (signal 'wcheck--overlay-not-found-error nil)))))
                 ((< bound start)
-                 (let ((ol (wcheck-overlay-previous start bound)))
+                 (let ((ol (wcheck--overlay-previous start bound)))
                    (cond (ol
                           (if (and (window-live-p window)
                                    (eq buffer (window-buffer window)))
@@ -1178,119 +1178,119 @@ requested it."
                             (show-entry))
                           (message "Found from line %s"
                                    (line-number-at-pos (point)))
-                          (wcheck-force-read buffer))
+                          (wcheck--force-read buffer))
                          ((> bound (point-min))
-                          (wcheck-jump-req buffer window (1- bound)
-                                           (- (1- bound) wcheck-jump-step)))
+                          (wcheck--jump-req buffer window (1- bound)
+                                            (- (1- bound) wcheck--jump-step)))
                          (t
-                          (signal 'wcheck-overlay-not-found-error nil)))))
+                          (signal 'wcheck--overlay-not-found-error nil)))))
                 (t
-                 (signal 'wcheck-overlay-not-found-error nil)))
+                 (signal 'wcheck--overlay-not-found-error nil)))
 
-        (wcheck-overlay-not-found-error
+        (wcheck--overlay-not-found-error
          (message "Found nothing")
-         (wcheck-force-read buffer))))))
+         (wcheck--force-read buffer))))))
 
 
 ;;; Hooks
 
 
-(defun wcheck-add-local-hooks (buffer)
+(defun wcheck--add-local-hooks (buffer)
   (with-current-buffer buffer
-    (dolist (hook '((kill-buffer-hook . wcheck-hook-kill-buffer)
-                    (window-scroll-functions . wcheck-hook-window-scroll)
-                    (after-change-functions . wcheck-hook-after-change)
-                    (change-major-mode-hook . wcheck-hook-change-major-mode)
+    (dolist (hook '((kill-buffer-hook . wcheck--hook-kill-buffer)
+                    (window-scroll-functions . wcheck--hook-window-scroll)
+                    (after-change-functions . wcheck--hook-after-change)
+                    (change-major-mode-hook . wcheck--hook-change-major-mode)
                     (outline-view-change-hook
-                     . wcheck-hook-outline-view-change)))
+                     . wcheck--hook-outline-view-change)))
       (add-hook (car hook) (cdr hook) nil t))))
 
 
-(defun wcheck-remove-local-hooks (buffer)
+(defun wcheck--remove-local-hooks (buffer)
   (with-current-buffer buffer
-    (dolist (hook '((kill-buffer-hook . wcheck-hook-kill-buffer)
-                    (window-scroll-functions . wcheck-hook-window-scroll)
-                    (after-change-functions . wcheck-hook-after-change)
-                    (change-major-mode-hook . wcheck-hook-change-major-mode)
+    (dolist (hook '((kill-buffer-hook . wcheck--hook-kill-buffer)
+                    (window-scroll-functions . wcheck--hook-window-scroll)
+                    (after-change-functions . wcheck--hook-after-change)
+                    (change-major-mode-hook . wcheck--hook-change-major-mode)
                     (outline-view-change-hook
-                     . wcheck-hook-outline-view-change)))
+                     . wcheck--hook-outline-view-change)))
       (remove-hook (car hook) (cdr hook) t))))
 
 
-(defun wcheck-add-global-hooks ()
+(defun wcheck--add-global-hooks ()
   (dolist (hook '((window-size-change-functions
-                   . wcheck-hook-window-size-change)
+                   . wcheck--hook-window-size-change)
                   (window-configuration-change-hook
-                   . wcheck-hook-window-configuration-change)))
+                   . wcheck--hook-window-configuration-change)))
     (add-hook (car hook) (cdr hook))))
 
 
-(defun wcheck-remove-global-hooks ()
+(defun wcheck--remove-global-hooks ()
   (dolist (hook '((window-size-change-functions
-                   . wcheck-hook-window-size-change)
+                   . wcheck--hook-window-size-change)
                   (window-configuration-change-hook
-                   . wcheck-hook-window-configuration-change)))
+                   . wcheck--hook-window-configuration-change)))
     (remove-hook (car hook) (cdr hook))))
 
 
-(defun wcheck-hook-window-scroll (window window-start)
+(defun wcheck--hook-window-scroll (window window-start)
   "`wcheck-mode' hook for window scroll.
 Request update for the buffer when its window have been
 scrolled."
   (with-current-buffer (window-buffer window)
     (when wcheck-mode
-      (wcheck-buffer-data-set (current-buffer) :read-req t))))
+      (wcheck--buffer-data-set (current-buffer) :read-req t))))
 
 
-(defun wcheck-hook-window-size-change (frame)
+(defun wcheck--hook-window-size-change (frame)
   "`wcheck-mode' hook for window size change.
 Request update for the buffer when its window's size has
 changed."
   (walk-windows (lambda (window)
                   (with-current-buffer (window-buffer window)
                     (when wcheck-mode
-                      (wcheck-buffer-data-set (current-buffer)
-                                              :read-req t))))
+                      (wcheck--buffer-data-set (current-buffer)
+                                               :read-req t))))
                 'nomb
                 frame))
 
 
-(defun wcheck-hook-window-configuration-change ()
+(defun wcheck--hook-window-configuration-change ()
   "`wcheck-mode' hook for window configuration change.
 Request update for the buffer when its window's configuration has
 changed."
   (walk-windows (lambda (window)
                   (with-current-buffer (window-buffer window)
                     (when wcheck-mode
-                      (wcheck-buffer-data-set (current-buffer)
-                                              :read-req t))))
+                      (wcheck--buffer-data-set (current-buffer)
+                                               :read-req t))))
                 'nomb
                 'currentframe))
 
 
-(defun wcheck-hook-after-change (beg end len)
+(defun wcheck--hook-after-change (beg end len)
   "`wcheck-mode' hook for buffer content change.
 Request update for the buffer when its content has been edited."
   ;; The buffer that has changed is the current buffer when this hook
   ;; function is called.
   (when wcheck-mode
-    (wcheck-buffer-data-set (current-buffer) :read-req t)))
+    (wcheck--buffer-data-set (current-buffer) :read-req t)))
 
 
-(defun wcheck-hook-outline-view-change ()
+(defun wcheck--hook-outline-view-change ()
   "`wcheck-mode' hook for outline view change.
 Request update for the buffer when its outline view has changed."
   (when wcheck-mode
-    (wcheck-buffer-data-set (current-buffer) :read-req t)))
+    (wcheck--buffer-data-set (current-buffer) :read-req t)))
 
 
-(defun wcheck-hook-kill-buffer ()
+(defun wcheck--hook-kill-buffer ()
   "`wcheck-mode' hook for kill-buffer operation.
 Turn off `wcheck-mode' when buffer is being killed."
   (wcheck-mode -1))
 
 
-(defun wcheck-hook-change-major-mode ()
+(defun wcheck--hook-change-major-mode ()
   "`wcheck-mode' hook for major mode change.
 Turn off `wcheck-mode' before changing major mode."
   (wcheck-mode -1))
@@ -1299,25 +1299,25 @@ Turn off `wcheck-mode' before changing major mode."
 ;;; Processes
 
 
-(defun wcheck-start-get-process (buffer)
+(defun wcheck--start-get-process (buffer)
   "Start or get external process for BUFFER.
 Start a new process or get already existing process for BUFFER.
 Return the object of that particular process or nil if the
 operation was unsuccessful."
   ;; If process for this BUFFER exists return it.
-  (or (wcheck-buffer-data-get :buffer buffer :process)
+  (or (wcheck--buffer-data-get :buffer buffer :process)
       ;; It doesn't exist so start a new one.
-      (wcheck-with-language-data
-          (nil (wcheck-buffer-data-get :buffer buffer :language))
+      (wcheck--with-language-data
+          (nil (wcheck--buffer-data-get :buffer buffer :language))
           (program args (process-connection-type connection))
 
-        (when (wcheck-program-executable-p program)
+        (when (wcheck--program-executable-p program)
           ;; Start the process.
           (let ((proc (apply #'start-process "wcheck" nil program args)))
             ;; Add the process Lisp object to database.
-            (wcheck-buffer-data-set buffer :process proc)
+            (wcheck--buffer-data-set buffer :process proc)
             ;; Set the output handler function and the associated buffer.
-            (set-process-filter proc #'wcheck-receive-strings)
+            (set-process-filter proc #'wcheck--receive-strings)
             (set-process-buffer proc (generate-new-buffer
                                       (concat " *wcheck-process <"
                                               (buffer-name buffer) ">*")))
@@ -1328,7 +1328,7 @@ operation was unsuccessful."
             proc)))))
 
 
-(defun wcheck-buffer-lang-proc-data-update (buffer language)
+(defun wcheck--buffer-lang-proc-data-update (buffer language)
   "Update process and language data for BUFFER.
 Calling this function is the primary way to maintain the language
 and process data associated to BUFFER. If LANGUAGE is nil remove
@@ -1338,45 +1338,45 @@ BUFFER from the list."
                  (not language)))
 
     ;; Construct a list of currently used processes.
-    (let ((old-processes (remq nil (wcheck-buffer-data-get-all :process))))
+    (let ((old-processes (remq nil (wcheck--buffer-data-get-all :process))))
 
       ;; Remove dead buffers and possible minibuffers from the list.
-      (dolist (item (wcheck-buffer-data-get-all :buffer))
+      (dolist (item (wcheck--buffer-data-get-all :buffer))
         (when (or (not (buffer-live-p item))
                   (minibufferp item))
-          (wcheck-buffer-data-delete item)))
+          (wcheck--buffer-data-delete item)))
 
       (if language
           (progn
             ;; LANGUAGE was given. If data for this buffer does not
             ;; exist create it.
-            (unless (wcheck-buffer-data-get :buffer buffer)
-              (wcheck-buffer-data-create buffer))
+            (unless (wcheck--buffer-data-get :buffer buffer)
+              (wcheck--buffer-data-create buffer))
             ;; Add this BUFFER's language info and reset the process
             ;; info.
-            (wcheck-buffer-data-set buffer :language language)
-            (wcheck-buffer-data-set buffer :process nil))
+            (wcheck--buffer-data-set buffer :language language)
+            (wcheck--buffer-data-set buffer :process nil))
 
         ;; LANGUAGE was not given so this normally means that
         ;; wcheck-mode is being turned off for this buffer. Remove
         ;; BUFFER's data.
-        (wcheck-buffer-data-delete buffer))
+        (wcheck--buffer-data-delete buffer))
 
       ;; Construct a list of processes that are still used.
-      (let ((new-processes (remq nil (wcheck-buffer-data-get-all :process))))
+      (let ((new-processes (remq nil (wcheck--buffer-data-get-all :process))))
         ;; Stop those processes which are no longer needed.
         (dolist (proc old-processes)
           (unless (memq proc new-processes)
             (kill-buffer (process-buffer proc))
             (delete-process proc))))))
 
-  (wcheck-buffer-data-get :buffer buffer))
+  (wcheck--buffer-data-get :buffer buffer))
 
 
 ;;; Read and paint strings
 
 
-(defun wcheck-read-strings (buffer beg end &optional invisible)
+(defun wcheck--read-strings (buffer beg end &optional invisible)
   "Return a list of text elements in BUFFER.
 Scan BUFFER between positions BEG and END and search for text
 elements according to buffer's language settings (see
@@ -1391,14 +1391,14 @@ areas, including invisible ones. Otherwise skip 
invisible text."
           (save-excursion
             (jit-lock-fontify-now (min beg end) (max beg end))))
 
-        (wcheck-with-language-data
-            (language (wcheck-buffer-data-get :buffer buffer :language))
+        (wcheck--with-language-data
+            (language (wcheck--buffer-data-get :buffer buffer :language))
             (regexp-start regexp-body regexp-end regexp-discard
                           syntax (case-fold-search case-fold))
 
           (let ((regexp
                  (concat regexp-start "\\(" regexp-body "\\)" regexp-end))
-                (face-p (wcheck-generate-face-predicate language major-mode))
+                (face-p (wcheck--generate-face-predicate language major-mode))
                 (search-spaces-regexp nil)
                 (old-point 0)
                 strings)
@@ -1428,7 +1428,7 @@ areas, including invisible ones. Otherwise skip invisible 
text."
             strings))))))
 
 
-(defun wcheck-paint-strings (buffer beg end strings &optional invisible)
+(defun wcheck--paint-strings (buffer beg end strings &optional invisible)
   "Mark strings in buffer.
 
 Mark all strings in STRINGS which are visible in BUFFER within
@@ -1440,12 +1440,12 @@ text."
     (with-current-buffer buffer
       (save-excursion
 
-        (wcheck-with-language-data
-            (language (wcheck-buffer-data-get :buffer buffer :language))
+        (wcheck--with-language-data
+            (language (wcheck--buffer-data-get :buffer buffer :language))
             (regexp-start regexp-end syntax (case-fold-search case-fold)
                           (ol-face face) action-program)
 
-          (let ((face-p (wcheck-generate-face-predicate language major-mode))
+          (let ((face-p (wcheck--generate-face-predicate language major-mode))
                 (search-spaces-regexp nil)
                 (ol-keymap (make-sparse-keymap))
                 (ol-mouse-face nil)
@@ -1453,7 +1453,7 @@ text."
                 regexp old-point)
 
             (when action-program
-              (define-key ol-keymap [down-mouse-3] 'wcheck-mouse-click-overlay)
+              (define-key ol-keymap [down-mouse-3] 
'wcheck--mouse-click-overlay)
               (define-key ol-keymap [mouse-3] 'undefined)
               (setq ol-mouse-face 'highlight
                     ol-help-echo "mouse-3: show actions"))
@@ -1479,7 +1479,7 @@ text."
                                        end)))
                           ((eval face-p)
                            ;; Make an overlay.
-                           (wcheck-make-overlay
+                           (wcheck--make-overlay
                             buffer ol-face ol-mouse-face ol-help-echo ol-keymap
                             (match-beginning 1) (match-end 1))))
                     (setq old-point (point))))))))))))
@@ -1488,7 +1488,7 @@ text."
 ;;; Jump forward or backward
 
 
-(defun wcheck-overlay-next (start bound)
+(defun wcheck--overlay-next (start bound)
   (unless (>= start (point-max))
     (catch 'overlay
       (dolist (ol (overlays-at start))
@@ -1502,7 +1502,7 @@ text."
               (throw 'overlay ol))))))))
 
 
-(defun wcheck-overlay-previous (start bound)
+(defun wcheck--overlay-previous (start bound)
   (unless (<= start (point-min))
     (catch 'overlay
       (let ((pos start))
@@ -1515,39 +1515,39 @@ text."
             (throw 'overlay nil)))))))
 
 
-(defun wcheck-line-start-at (pos)
+(defun wcheck--line-start-at (pos)
   (save-excursion
     (goto-char pos)
     (line-beginning-position)))
 
 
-(defun wcheck-line-end-at (pos)
+(defun wcheck--line-end-at (pos)
   (save-excursion
     (goto-char pos)
     (line-end-position)))
 
 
-(defun wcheck-jump-req (buffer window start bound)
+(defun wcheck--jump-req (buffer window start bound)
   (unless (= start bound)
     (with-current-buffer buffer
       (setq bound (funcall (if (> bound start)
-                               'wcheck-line-end-at
-                             'wcheck-line-start-at)
+                               'wcheck--line-end-at
+                             'wcheck--line-start-at)
                            bound))
       (message "Searching in lines %d-%d..."
                (line-number-at-pos start)
                (line-number-at-pos bound))
-      (wcheck-buffer-data-set buffer :jump-req (wcheck-jump-req-create
-                                                window start bound))
-      (wcheck-buffer-data-set buffer :areas (list (cons (min start bound)
-                                                        (max start bound))))
-      (wcheck-send-strings buffer (wcheck-read-strings
-                                   buffer (min start bound)
-                                   (max start bound) t))
-      (wcheck-timer-paint-event-run wcheck-timer-paint-event-count-std))))
+      (wcheck--buffer-data-set buffer :jump-req (wcheck--jump-req-create
+                                                 window start bound))
+      (wcheck--buffer-data-set buffer :areas (list (cons (min start bound)
+                                                         (max start bound))))
+      (wcheck--send-strings buffer (wcheck--read-strings
+                                    buffer (min start bound)
+                                    (max start bound) t))
+      (wcheck--timer-paint-event-run wcheck--timer-paint-event-count-std))))
 
 
-(defun wcheck-invisible-text-in-area-p (buffer beg end)
+(defun wcheck--invisible-text-in-area-p (buffer beg end)
   (catch 'invisible
     (let ((pos (min beg end))
           (end (max beg end)))
@@ -1569,16 +1569,16 @@ text."
     (unless wcheck-mode
       (wcheck-mode 1))
     (when wcheck-mode
-      (wcheck-buffer-data-set buffer :jump-req nil)
-      (let ((ol (wcheck-overlay-next
+      (wcheck--buffer-data-set buffer :jump-req nil)
+      (let ((ol (wcheck--overlay-next
                  (point) (window-end (selected-window) t))))
-        (if (and ol (not (wcheck-invisible-text-in-area-p
+        (if (and ol (not (wcheck--invisible-text-in-area-p
                           buffer (point) (overlay-end ol))))
             (goto-char (overlay-end ol))
           (if (eobp)
               (message "End of buffer")
-            (wcheck-jump-req buffer window (point)
-                             (+ (point) wcheck-jump-step))))))))
+            (wcheck--jump-req buffer window (point)
+                              (+ (point) wcheck--jump-step))))))))
 
 
 ;;;###autoload
@@ -1590,16 +1590,16 @@ text."
     (unless wcheck-mode
       (wcheck-mode 1))
     (when wcheck-mode
-      (wcheck-buffer-data-set buffer :jump-req nil)
-      (let ((ol (wcheck-overlay-previous
+      (wcheck--buffer-data-set buffer :jump-req nil)
+      (let ((ol (wcheck--overlay-previous
                  (point) (window-start (selected-window)))))
-        (if (and ol (not (wcheck-invisible-text-in-area-p
+        (if (and ol (not (wcheck--invisible-text-in-area-p
                           buffer (point) (overlay-start ol))))
             (goto-char (overlay-start ol))
           (if (bobp)
               (message "Beginning of buffer")
-            (wcheck-jump-req buffer window (point)
-                             (- (point) wcheck-jump-step))))))))
+            (wcheck--jump-req buffer window (point)
+                              (- (point) wcheck--jump-step))))))))
 
 
 ;;; Actions
@@ -1628,7 +1628,7 @@ settings."
             (end (overlay-end overlay)))
         (vector (buffer-substring-no-properties start end)
                 start end overlay
-                (wcheck-buffer-data-get
+                (wcheck--buffer-data-get
                  :buffer (current-buffer) :language))))))
 
 
@@ -1661,24 +1661,24 @@ any kind of actions, though."
             (return-value nil))
 
         (if (not marked-text)
-            (signal 'wcheck-action-error "There is no marked text here")
+            (signal 'wcheck--action-error "There is no marked text here")
           (let* ((start (copy-marker (aref marked-text 1)))
                  (end (copy-marker (aref marked-text 2)))
-                 (actions (wcheck-get-actions marked-text))
+                 (actions (wcheck--get-actions marked-text))
                  (choice (cond ((and (null (cdr actions))
                                      (wcheck-query-language-data
                                       (aref marked-text 4) 'action-autoselect))
                                 (cdar actions))
                                ((and event (display-popup-menus-p))
-                                (wcheck-choose-action-popup actions event))
-                               (t (wcheck-choose-action-minibuffer actions)))))
+                                (wcheck--choose-action-popup actions event))
+                               (t (wcheck--choose-action-minibuffer 
actions)))))
 
             (cond ((and (stringp choice)
                         (markerp start)
                         (markerp end))
                    (with-current-buffer (marker-buffer start)
                      (if buffer-read-only
-                         (signal 'wcheck-action-error "Buffer is read-only")
+                         (signal 'wcheck--action-error "Buffer is read-only")
                        (delete-region start end)
                        (goto-char start)
                        (insert choice)
@@ -1691,25 +1691,25 @@ any kind of actions, though."
             (if (markerp end) (set-marker end nil))))
         return-value)
 
-    (wcheck-action-program-error
+    (wcheck--action-program-error
      (message "Language \"%s\": action program is not configured"
               (cdr error-data)))
 
-    (wcheck-parser-function-not-configured-error
+    (wcheck--parser-function-not-configured-error
      (message "Language \"%s\": parser function is not configured"
               (cdr error-data)))
 
-    (wcheck-error
+    (wcheck--error
      (message "%s" (cdr error-data)))))
 
 
-(defun wcheck-get-actions (marked-text)
+(defun wcheck--get-actions (marked-text)
   "Get actions from external program or a function.
 
 MARKED-TEXT must be a vector such as the one returned by
 `wcheck-marked-text-at' function."
 
-  (wcheck-with-language-data
+  (wcheck--with-language-data
       (language (aref marked-text 4))
       ((program action-program)
        (args action-args)
@@ -1718,12 +1718,12 @@ MARKED-TEXT must be a vector such as the one returned by
        syntax)
 
     (with-syntax-table (eval syntax)
-      (cond ((not (wcheck-action-program-configured-p language))
-             (signal 'wcheck-action-program-error language))
+      (cond ((not (wcheck--action-program-configured-p language))
+             (signal 'wcheck--action-program-error language))
 
             ((and (stringp program)
                   (not parser))
-             (signal 'wcheck-parser-function-not-configured-error language))
+             (signal 'wcheck--parser-function-not-configured-error language))
 
             ((stringp program)
              (with-temp-buffer
@@ -1731,38 +1731,38 @@ MARKED-TEXT must be a vector such as the one returned by
                (apply #'call-process-region (point-min) (point-max)
                       program t t nil args)
                (goto-char (point-min))
-               (wcheck-clean-actions
+               (wcheck--clean-actions
                 (save-match-data
                   (condition-case nil (funcall parser marked-text)
-                    (error (signal 'wcheck-funcall-error
+                    (error (signal 'wcheck--funcall-error
                                    (concat "Action parser function "
                                            "signaled an error"))))))))
 
             ((functionp program)
-             (wcheck-clean-actions
+             (wcheck--clean-actions
               (save-match-data
                 (condition-case nil (funcall program marked-text)
-                  (error (signal 'wcheck-funcall-error
+                  (error (signal 'wcheck--funcall-error
                                  (concat "Action function signaled "
                                          "an error")))))))))))
 
 
-(defun wcheck-clean-actions (actions)
+(defun wcheck--clean-actions (actions)
   (when (listp actions)
     (delete nil (mapcar (lambda (item)
                           (cond ((stringp item)
-                                 (cons (wcheck-clean-string item)
+                                 (cons (wcheck--clean-string item)
                                        item))
                                 ((and (consp item)
                                       (stringp (car item))
                                       (or (functionp (cdr item))
                                           (stringp (cdr item))))
-                                 (cons (wcheck-clean-string (car item))
+                                 (cons (wcheck--clean-string (car item))
                                        (cdr item)))))
                         actions))))
 
 
-(defun wcheck-clean-string (string)
+(defun wcheck--clean-string (string)
   (if (equal string "")
       "[Empty string]"
     (setq string (replace-regexp-in-string "[^[:print:]]+" "" string))
@@ -1771,7 +1771,7 @@ MARKED-TEXT must be a vector such as the one returned by
       (replace-regexp-in-string "\\(?:\\` +\\| +\\'\\)" "" string))))
 
 
-(defun wcheck-choose-action-popup (actions event)
+(defun wcheck--choose-action-popup (actions event)
   "Create a pop-up menu to choose an action.
 ACTIONS is a list of strings. EVENT is the mouse event that
 originated this sequence of function calls. Return user's
@@ -1779,7 +1779,7 @@ choice (a string) or nil."
   (let ((menu (list "Choose"
                     (cons "" (if actions
                                  (mapcar (lambda (item)
-                                           (cons (wcheck-clean-string
+                                           (cons (wcheck--clean-string
                                                   (car item))
                                                  (cdr item)))
                                          actions)
@@ -1787,13 +1787,13 @@ choice (a string) or nil."
     (x-popup-menu event menu)))
 
 
-(defun wcheck-read-key (prompt)
+(defun wcheck--read-key (prompt)
   (if (fboundp 'read-key)
       (read-key prompt)
     (read-char prompt)))
 
 
-(defun wcheck-choose-action-minibuffer (actions)
+(defun wcheck--choose-action-minibuffer (actions)
   "Create a text menu to choose a substitute action.
 ACTIONS is a list of strings. Return user's choice (a string)
 or nil."
@@ -1813,7 +1813,7 @@ or nil."
                     actions (cdr actions)
                     string (concat (propertize (format "%c)" (car chars))
                                                'face 'bold)
-                                   " " (wcheck-clean-string (car sug)) "  ")
+                                   " " (wcheck--clean-string (car sug)) "  ")
                     alist (cons (cons (car chars) (cdr sug)) alist)
                     chars (cdr chars))
               (insert string)
@@ -1853,7 +1853,7 @@ or nil."
             (set-window-buffer window (current-buffer))
             (set-window-dedicated-p window t)
             ;; Return the choice or nil.
-            (cond ((cdr (assq (wcheck-read-key prompt) alist)))
+            (cond ((cdr (assq (wcheck--read-key prompt) alist)))
                   (t (message "Abort") nil)))))
     (message "No actions")
     nil))
@@ -1888,7 +1888,7 @@ return them as a list of strings."
 ;;; Face information functions
 
 
-(defun wcheck-collect-faces (beg end)
+(defun wcheck--collect-faces (beg end)
   "Return a list of faces between positions BEG and END."
   (let ((pos beg)
         face faces)
@@ -1901,7 +1901,7 @@ return them as a list of strings."
     (delete-dups faces)))
 
 
-(defun wcheck-major-mode-face-settings (language major-mode)
+(defun wcheck--major-mode-face-settings (language major-mode)
   "Return read/skip face settings for MAJOR-MODE."
   (let ((data (wcheck-query-language-data language 'read-or-skip-faces))
         conf)
@@ -1915,7 +1915,7 @@ return them as a list of strings."
           (throw 'answer conf))))))
 
 
-(defun wcheck-face-found-p (user-faces buffer-faces)
+(defun wcheck--face-found-p (user-faces buffer-faces)
   "Return t if a symbol in USER-FACES is found from BUFFER-FACES.
 Both arguments are lists."
   (catch 'found
@@ -1924,25 +1924,25 @@ Both arguments are lists."
         (throw 'found t)))))
 
 
-(defun wcheck-generate-face-predicate (language major-mode)
+(defun wcheck--generate-face-predicate (language major-mode)
   "Generates a face predicate expression for scanning buffer.
 Return a predicate expression that is used to decide whether
 `wcheck-mode' should read or paint text at the current point
 position with LANGUAGE and MAJOR-MODE. Evaluating the predicate
 expression will return a boolean."
-  (let* ((face-settings (wcheck-major-mode-face-settings
+  (let* ((face-settings (wcheck--major-mode-face-settings
                          language major-mode))
          (mode (nth 1 face-settings))
          (faces (nthcdr 2 face-settings)))
     (cond ((not font-lock-mode)
            t)
           ((eq mode 'read)
-           `(wcheck-face-found-p
-             ',faces (wcheck-collect-faces
+           `(wcheck--face-found-p
+             ',faces (wcheck--collect-faces
                       (match-beginning 1) (match-end 1))))
           ((eq mode 'skip)
-           `(not (wcheck-face-found-p
-                  ',faces (wcheck-collect-faces
+           `(not (wcheck--face-found-p
+                  ',faces (wcheck--collect-faces
                            (match-beginning 1) (match-end 1)))))
           (t t))))
 
@@ -1950,7 +1950,7 @@ expression will return a boolean."
 ;;; Miscellaneous low-level functions
 
 
-(defun wcheck-language-data-valid-p (key value)
+(defun wcheck--language-data-valid-p (key value)
   (cond ((and (eq key 'syntax)
               (syntax-table-p (and (boundp value) (eval value)))))
         ((and (eq key 'face)
@@ -1965,9 +1965,9 @@ expression will return a boolean."
               (or (stringp value)
                   (functionp value))))
         ((and (eq key 'args)
-              (wcheck-list-of-strings-p value)))
+              (wcheck--list-of-strings-p value)))
         ((and (eq key 'action-args)
-              (wcheck-list-of-strings-p value)))
+              (wcheck--list-of-strings-p value)))
         ((and (or (eq key 'parser)
                   (eq key 'action-parser))
               (functionp value)))
@@ -1975,7 +1975,7 @@ expression will return a boolean."
              (eq key 'case-fold)
              (eq key 'action-autoselect)))
         ((and (eq key 'read-or-skip-faces)
-              (wcheck-list-of-lists-p value)))))
+              (wcheck--list-of-lists-p value)))))
 
 
 (defun wcheck-query-language-data (language key)
@@ -1985,26 +1985,25 @@ Return LANGUAGE's value for KEY. Valid keys (symbols) 
are
 described in the documentation of user variable
 `wcheck-language-data'. If that variable does not define
 a (valid) value for the KEY then query the value from
-`wcheck-language-data-defaults' or
-`wcheck-language-data-defaults-hard-coded'."
+`wcheck-language-data-defaults' or use internal defaults."
 
-  (when (wcheck-language-exists-p language)
+  (when (wcheck--language-exists-p language)
     (let* ((data
-            (and (wcheck-list-of-lists-p wcheck-language-data)
+            (and (wcheck--list-of-lists-p wcheck-language-data)
                  (assq key (cdr (assoc language wcheck-language-data)))))
            (default
-             (and (wcheck-list-of-lists-p wcheck-language-data-defaults)
+             (and (wcheck--list-of-lists-p wcheck-language-data-defaults)
                   (assq key wcheck-language-data-defaults)))
            (hard-coded
-            (and (wcheck-list-of-lists-p
-                  wcheck-language-data-defaults-hard-coded)
-                 (assq key wcheck-language-data-defaults-hard-coded)))
+            (and (wcheck--list-of-lists-p
+                  wcheck--language-data-defaults-hard-coded)
+                 (assq key wcheck--language-data-defaults-hard-coded)))
            (conf
-            (list (when (wcheck-language-data-valid-p key (cdr data))
+            (list (when (wcheck--language-data-valid-p key (cdr data))
                     data)
-                  (when (wcheck-language-data-valid-p key (cdr default))
+                  (when (wcheck--language-data-valid-p key (cdr default))
                     default)
-                  (when (wcheck-language-data-valid-p key (cdr hard-coded))
+                  (when (wcheck--language-data-valid-p key (cdr hard-coded))
                     hard-coded))))
 
       (if (eq key 'read-or-skip-faces)
@@ -2012,16 +2011,16 @@ a (valid) value for the KEY then query the value from
         (cdr (assq key conf))))))
 
 
-(defun wcheck-language-exists-p (language)
+(defun wcheck--language-exists-p (language)
   "Return t if LANGUAGE exists in `wcheck-language-data'."
-  (and (wcheck-list-of-lists-p wcheck-language-data)
+  (and (wcheck--list-of-lists-p wcheck-language-data)
        (member language (mapcar #'car wcheck-language-data))
        (stringp language)
        (> (length language) 0)
        t))
 
 
-(defun wcheck-program-executable-p (program)
+(defun wcheck--program-executable-p (program)
   "Return t if PROGRAM is executable regular file."
   (and (stringp program)
        (file-regular-p program)
@@ -2029,33 +2028,33 @@ a (valid) value for the KEY then query the value from
        t))
 
 
-(defun wcheck-program-configured-p (language)
+(defun wcheck--program-configured-p (language)
   (let ((program (wcheck-query-language-data language 'program)))
-    (or (wcheck-program-executable-p program)
+    (or (wcheck--program-executable-p program)
         (functionp program))))
 
 
-(defun wcheck-action-program-configured-p (language)
+(defun wcheck--action-program-configured-p (language)
   (let ((program (wcheck-query-language-data language 'action-program)))
-    (or (wcheck-program-executable-p program)
+    (or (wcheck--program-executable-p program)
         (functionp program))))
 
 
-(defun wcheck-list-of-strings-p (object)
+(defun wcheck--list-of-strings-p (object)
   (and (listp object)
        (not (memq nil (mapcar #'stringp object)))))
 
 
-(defun wcheck-list-of-lists-p (object)
+(defun wcheck--list-of-lists-p (object)
   (and (listp object)
        (not (memq nil (mapcar #'listp object)))))
 
 
-(defun wcheck-process-running-p (process)
+(defun wcheck--process-running-p (process)
   (eq 'run (process-status process)))
 
 
-(defun wcheck-current-idle-time-seconds ()
+(defun wcheck--current-idle-time-seconds ()
   "Return current idle time in seconds.
 The returned value is a floating point number."
   (let* ((idle (or (current-idle-time)
@@ -2069,7 +2068,7 @@ The returned value is a floating point number."
        (/ micros 1000000.0))))
 
 
-(defun wcheck-combine-overlapping-areas (alist)
+(defun wcheck--combine-overlapping-areas (alist)
   "Combine overlapping items in ALIST.
 ALIST is a list of (A . B) items in which A and B are integers.
 Each item denote a buffer position range from A to B. This
@@ -2082,7 +2081,7 @@ according to A's and all overlapping A B ranges are 
combined."
     (while alist
       (while (not (equal previous alist))
         (setq previous alist
-              alist (append (wcheck-combine-two (car previous) (cadr previous))
+              alist (append (wcheck--combine-two (car previous) (cadr 
previous))
                             (nthcdr 2 previous))))
       (setq final (cons (car alist) final)
             alist (cdr alist)
@@ -2090,7 +2089,7 @@ according to A's and all overlapping A B ranges are 
combined."
     (nreverse final)))
 
 
-(defun wcheck-combine-two (a b)
+(defun wcheck--combine-two (a b)
   (let ((a1 (car a))
         (a2 (cdr a))
         (b1 (car b))
@@ -2106,7 +2105,7 @@ according to A's and all overlapping A B ranges are 
combined."
 ;;; Overlays
 
 
-(defun wcheck-make-overlay (buffer face mouse-face help-echo keymap beg end)
+(defun wcheck--make-overlay (buffer face mouse-face help-echo keymap beg end)
   "Create an overlay to mark text.
 Create an overlay in BUFFER from range BEG to END. FACE,
 MOUSE-FACE, HELP-ECHO and KEYMAP are overlay's properties."
@@ -2114,29 +2113,29 @@ MOUSE-FACE, HELP-ECHO and KEYMAP are overlay's 
properties."
     (dolist (prop `((wcheck-mode . t)
                     (face . ,face)
                     (mouse-face . ,mouse-face)
-                    (modification-hooks wcheck-remove-changed-overlay)
-                    (insert-in-front-hooks wcheck-remove-changed-overlay)
-                    (insert-behind-hooks wcheck-remove-changed-overlay)
+                    (modification-hooks wcheck--remove-changed-overlay)
+                    (insert-in-front-hooks wcheck--remove-changed-overlay)
+                    (insert-behind-hooks wcheck--remove-changed-overlay)
                     (evaporate . t)
                     (keymap . ,keymap)
                     (help-echo . ,help-echo)))
       (overlay-put overlay (car prop) (cdr prop)))))
 
 
-(defun wcheck-remove-overlays (&optional beg end)
+(defun wcheck--remove-overlays (&optional beg end)
   "Remove `wcheck-mode' overlays from current buffer.
 If optional arguments BEG and END exist remove overlays from
 range BEG to END. Otherwise remove all overlays."
   (remove-overlays beg end 'wcheck-mode t))
 
 
-(defun wcheck-remove-changed-overlay (overlay after beg end &optional len)
+(defun wcheck--remove-changed-overlay (overlay after beg end &optional len)
   "Hook for removing overlay which is being edited."
   (unless after
     (delete-overlay overlay)))
 
 
-(defun wcheck-mouse-click-overlay (event)
+(defun wcheck--mouse-click-overlay (event)
   "Overlay mouse-click event.
 Send the mouse pointer position and mouse event to the
 `wcheck-actions' function."
@@ -2147,82 +2146,82 @@ Send the mouse pointer position and mouse event to the
 ;;; Buffer data access functions
 
 
-(defconst wcheck-buffer-data-keys
+(defconst wcheck--buffer-data-keys
   '(:buffer :process :language :read-req :paint-req :jump-req :areas :strings))
 
 
-(defun wcheck-buffer-data-key-index (key)
+(defun wcheck--buffer-data-key-index (key)
   "Return the index of KEY in buffer data object."
   (let ((index 0))
     (catch 'answer
-      (dolist (data-key wcheck-buffer-data-keys nil)
+      (dolist (data-key wcheck--buffer-data-keys nil)
         (if (eq key data-key)
             (throw 'answer index)
           (setq index (1+ index)))))))
 
 
-(defun wcheck-buffer-data-create (buffer)
+(defun wcheck--buffer-data-create (buffer)
   "Create data instance for BUFFER.
 But only if it doesn't exist already."
-  (unless (wcheck-buffer-data-get :buffer buffer)
-    (let ((data (make-vector (length wcheck-buffer-data-keys) nil)))
-      (aset data (wcheck-buffer-data-key-index :buffer) buffer)
-      (push data wcheck-buffer-data))))
+  (unless (wcheck--buffer-data-get :buffer buffer)
+    (let ((data (make-vector (length wcheck--buffer-data-keys) nil)))
+      (aset data (wcheck--buffer-data-key-index :buffer) buffer)
+      (push data wcheck--buffer-data))))
 
 
-(defun wcheck-buffer-data-delete (buffer)
+(defun wcheck--buffer-data-delete (buffer)
   "Delete all data associated to BUFFER."
-  (let ((index (wcheck-buffer-data-key-index :buffer)))
-    (setq wcheck-buffer-data
+  (let ((index (wcheck--buffer-data-key-index :buffer)))
+    (setq wcheck--buffer-data
           (delq nil (mapcar (lambda (item)
                               (unless (eq buffer (aref item index))
                                 item))
-                            wcheck-buffer-data)))))
+                            wcheck--buffer-data)))))
 
 
-(defun wcheck-buffer-data-get (key value &optional target-key)
+(defun wcheck--buffer-data-get (key value &optional target-key)
   "Query the first matching KEY VALUE pair and return TARGET-KEY.
 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)))
+    (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
+                           (aref item (wcheck--buffer-data-key-index
                                        target-key))
                          item))))))
 
 
-(defun wcheck-buffer-data-get-all (&optional key)
+(defun wcheck--buffer-data-get-all (&optional key)
   "Return every buffer's value for KEY.
 If KEY is nil return all buffer's all data."
   (if key
-      (let ((index (wcheck-buffer-data-key-index key)))
+      (let ((index (wcheck--buffer-data-key-index key)))
         (mapcar (lambda (item)
                   (aref item index))
-                wcheck-buffer-data))
-    wcheck-buffer-data))
+                wcheck--buffer-data))
+    wcheck--buffer-data))
 
 
-(defun wcheck-buffer-data-set (buffer key value)
+(defun wcheck--buffer-data-set (buffer key value)
   "Set KEY's VALUE for BUFFER."
-  (let ((item (wcheck-buffer-data-get :buffer buffer)))
+  (let ((item (wcheck--buffer-data-get :buffer buffer)))
     (when item
-      (aset item (wcheck-buffer-data-key-index key) value))))
+      (aset item (wcheck--buffer-data-key-index key) value))))
 
 
-(defun wcheck-jump-req-create (window start bound)
+(defun wcheck--jump-req-create (window start bound)
   (when (and (number-or-marker-p start)
              (number-or-marker-p bound)
              (windowp window))
     (vector window start bound)))
 
 
-(defun wcheck-jump-req-window (jump-req)
+(defun wcheck--jump-req-window (jump-req)
   (aref jump-req 0))
-(defun wcheck-jump-req-start (jump-req)
+(defun wcheck--jump-req-start (jump-req)
   (aref jump-req 1))
-(defun wcheck-jump-req-bound (jump-req)
+(defun wcheck--jump-req-bound (jump-req)
   (aref jump-req 2))
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]