[logaling-commit] logaling/logalimacs [master] Aplly function that is highlighted search-word when endpoint is the buffer

Back to archive index

null+****@clear***** null+****@clear*****
Wed Jul 4 20:16:00 JST 2012


Yuta Yamada	2012-07-04 20:16:00 +0900 (Wed, 04 Jul 2012)

  New Revision: 23896a65e731184cb40e11669412c5030967399d
  https://github.com/logaling/logalimacs/commit/23896a65e731184cb40e11669412c5030967399d

  Log:
    Aplly function that is highlighted search-word when endpoint is the buffer

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+10 -0)
===================================================================
--- logalimacs.el    2012-07-03 10:57:02 +0900 (bd96ea4)
+++ logalimacs.el    2012-07-04 20:16:00 +0900 (954c660)
@@ -106,6 +106,8 @@
 
 (defvar loga-current-max-length nil)
 
+(defvar loga-current-highlight-regexp "")
+
 (defvar loga-base-buffer nil)
 
 (defvar loga-popup-point 0)
@@ -512,6 +514,7 @@ Otherwise passed character inside region."
     (erase-buffer) ;;initialize
     (insert content)
     (goto-char 0)
+    (loga-highlight (caar loga-word-cache))
     (setq buffer-read-only t))
   (switch-to-buffer loga-base-buffer)
   (popwin:popup-buffer
@@ -521,6 +524,13 @@ Otherwise passed character inside region."
     ((:lookup :show :list)
      (loga-buffer-or-popup-command))))
 
+(defun loga-highlight (regexp)
+  (let* ((striped-regexp
+          (replace-regexp-in-string "\"" "" regexp)))
+    (when (not (equal "" striped-regexp))
+      (setq loga-current-highlight-regexp striped-regexp)
+      (highlight-regexp striped-regexp))))
+
 (defun loga-make-popup (content)
   (let* ((converted-content (loga-convert-from-json content)))
     (setq loga-current-endpoint :popup)
-------------- next part --------------
An HTML attachment was scrubbed...
다운로드 



More information about the logaling-commit mailing list
Back to archive index