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

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

[elpa] externals/hcel 73bd6e9bd9 10/13: fix a fixme Make sure all defini


From: ELPA Syncer
Subject: [elpa] externals/hcel 73bd6e9bd9 10/13: fix a fixme Make sure all definitions have an `hcel-' prefix.
Date: Wed, 21 Sep 2022 08:57:48 -0400 (EDT)

branch: externals/hcel
commit 73bd6e9bd92fa57877f2d894f43725a4a0abf1a8
Author: Yuchen Pei <hi@ypei.me>
Commit: Yuchen Pei <hi@ypei.me>

    fix a fixme Make sure all definitions have an `hcel-' prefix.
---
 hcel-source.el | 12 ++++++------
 hcel-utils.el  | 17 ++++++++---------
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/hcel-source.el b/hcel-source.el
index ee42346b59..6000d26bab 100644
--- a/hcel-source.el
+++ b/hcel-source.el
@@ -49,7 +49,7 @@ When FORCE is non-nil, kill existing source buffer if any."
         (with-current-buffer (get-buffer-create buffer-name)
           ;; (hcel-write-source-to-buffer (alist-get 'tokenizedLines json))
           (hcel-write-html-source-to-buffer (hcel-source-html json))
-          (fontify-with-haskell-mode)
+          (hcel-fontify-with-haskell-mode)
           ;; it is important the setq of local vars are after the (hcel-mode)
           ;; otherwise they may be rewritten
           (hcel-mode)
@@ -102,10 +102,10 @@ If NO-JUMP is non-nil, just open the source and does not 
jump to the location wi
              (buffer (hcel-load-module-source package-id module-path)))
     (unless no-jump
       (switch-to-buffer-other-window buffer)
-      (goto-line-column line-beg (1- col-beg))
+      (hcel-goto-line-column line-beg (1- col-beg))
       (pulse-momentary-highlight-region
        (point) (save-excursion
-                 (goto-line-column line-end (1- col-end))
+                 (hcel-goto-line-column line-end (1- col-end))
                  (point))
        'next-error))
     buffer))
@@ -138,7 +138,7 @@ If NO-JUMP is non-nil, just open the source and does not 
jump to the location wi
               (line (string-to-number (car splitted)))
               (col-beg (string-to-number (cadr splitted)))
               (col-end (string-to-number (caddr splitted))))
-    (buffer-substring-line-column line (1- col-beg) line (1- col-end))))
+    (hcel-buffer-substring-line-column line (1- col-beg) line (1- col-end))))
 
 (defun hcel-type-at-point ()
   (interactive)
@@ -468,9 +468,9 @@ If NO-JUMP is non-nil, just open the source and does not 
jump to the location wi
                          (buffer (hcel-load-module-location-info location-info 
t)))
                      (with-current-buffer buffer
                        (save-excursion
-                         (goto-line-column line-beg col-beg)
+                         (hcel-goto-line-column line-beg col-beg)
                          (setq pos (1- (point)))
-                         (goto-line-column line-end col-end)
+                         (hcel-goto-line-column line-end col-end)
                          (setq len (- (point) pos 1))))
                      (list (xref-make-match
                             "hcel match"
diff --git a/hcel-utils.el b/hcel-utils.el
index 686da8d29d..2c3d51fbce 100644
--- a/hcel-utils.el
+++ b/hcel-utils.el
@@ -75,11 +75,10 @@ Example of an idSrcSpan:
               (col-beg (alist-get 'column (alist-get 'start span)))
               (line-end (alist-get 'line (alist-get 'end span)))
               (col-end (alist-get 'column (alist-get 'end span))))
-    (buffer-substring-line-column line-beg (1- col-beg) line-end (1- 
col-end))))
+    (hcel- buffer-substring-line-column line-beg (1- col-beg) line-end (1- 
col-end))))
 
-;; FIXME: Make sure all your definitions have an `hcel-' prefix!
 ;; buffers and strings manipulation
-(defun goto-line-column (line column)
+(defun hcel-goto-line-column (line column)
   (goto-line line)
   (move-to-column column))
 
@@ -95,13 +94,13 @@ Example of an idSrcSpan:
       (replace-regexp-in-string
        "&lt;" "<" html))))))
 
-(defun buffer-substring-line-column (line-beg col-beg line-end col-end)
+(defun hcel-buffer-substring-line-column (line-beg col-beg line-end col-end)
   (save-excursion
     (buffer-substring
-     (progn (goto-line-column line-beg col-beg) (point))
-     (progn (goto-line-column line-end col-end) (point)))))
+     (progn (hcel-goto-line-column line-beg col-beg) (point))
+     (progn (hcel-goto-line-column line-end col-end) (point)))))
 
-(defun fontify-with-haskell-mode ()
+(defun hcel-fontify-with-haskell-mode ()
   "Fontify using haskell-mode"
   (require 'haskell)
   (let ((text (buffer-string)))
@@ -115,12 +114,12 @@ Example of an idSrcSpan:
     (erase-buffer)
     (insert text)))
 
-(defun remove-html-markup (html)
+(defun hcel-remove-html-markup (html)
   (replace-regexp-in-string
    "<.*?>" "" 
    (replace-regexp-in-string "</p>" "\n\n" html)))
 
-(defun fill-string (text)
+(defun hcel-fill-string (text)
   (with-temp-buffer
     (insert text)
     (fill-region (point-min) (point-max))



reply via email to

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