[logaling-commit] logaling/logalimacs [master] Create function that is extracted search-word

Back to archive index

null+****@clear***** null+****@clear*****
Sun Jul 22 12:16:39 JST 2012


Yuta Yamada	2012-07-22 12:16:39 +0900 (Sun, 22 Jul 2012)

  New Revision: af58d9e82a70e7059ad65a06aa2001ba6a887d69
  https://github.com/logaling/logalimacs/commit/af58d9e82a70e7059ad65a06aa2001ba6a887d69

  Log:
    Create function that is extracted search-word

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+8 -7)
===================================================================
--- logalimacs.el    2012-07-22 12:05:23 +0900 (8638ef4)
+++ logalimacs.el    2012-07-22 12:16:39 +0900 (5c0b066)
@@ -567,7 +567,7 @@ Otherwise passed character inside region."
     (erase-buffer) ;;initialize
     (insert content)
     (goto-char 0)
-    (loga-highlight (caar loga-word-cache))
+    (loga-highlight (loga-get-search-word))
     (setq buffer-read-only t))
   (switch-to-buffer loga-base-buffer)
   (popwin:popup-buffer
@@ -577,12 +577,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-highlight (search-word)
+  (when (not (equal "" search-word))
+    (setq loga-current-highlight-regexp search-word)
+    (highlight-regexp search-word)))
+
+(defun loga-get-search-word ()
+  (replace-regexp-in-string "\"" "" (caar loga-word-cache)))
 
 (defun loga-make-popup (content)
   (let* ((converted-content (loga-convert-from-json content)))
-------------- next part --------------
An HTML attachment was scrubbed...
下载 



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