[logaling-commit] logaling/logalimacs [master] refactor loga-return-word-on-cursor to output log

Back to archive index

null+****@clear***** null+****@clear*****
Sun Jan 22 22:46:53 JST 2012


yuta yamada	2012-01-22 22:46:53 +0900 (Sun, 22 Jan 2012)

  New Revision: c726812b4903641806f1d54a45afce19254f9a2f

  Log:
    refactor loga-return-word-on-cursor to output log

  Modified files:
    logalimacs.el

  Modified: logalimacs.el (+10 -4)
===================================================================
--- logalimacs.el    2012-01-22 22:45:23 +0900 (2cbbb2c)
+++ logalimacs.el    2012-01-22 22:46:53 +0900 (a673f7c)
@@ -35,7 +35,8 @@
 ;;;###autoload (when (require 'popwin nil t) (defvar display-buffer-function 'popwin:display-buffer) (defvar popwin:special-display-config (append '(("*logalimacs*" :position top :height 10 :noselect t :stick t))) popwin:special-display-config))
 
 (defvar loga-fly-mode nil)
-(defvar loga-make-buffer "*logalimacs*")
+(defvar loga-make-buffer "*logalimacs*" "display buffer name.")
+(defvar loga-log-output nil "if nonnil, output log for developer.")
 (defvar loga-fly-mode-interval 1
   "timer-valiable for loga-fly-mode, credit par sec.")
 
@@ -149,12 +150,17 @@
   (let* (match-word)
     (save-excursion
       (backward-char)
-      (if (looking-at "[ \t\-]")
-          (looking-at "\\w+")
+      (cond
+       ((looking-at "[^\\w]")
         (forward-char)
         (backward-word)
-        (looking-at "\\w+"))
+        (looking-at "\\w+") t)
+       (t
+        (forward-char)
+        (backward-word)
+        (looking-at "\\w+")))
       (setq match-word (match-string 0))
+      (if loga-log-output (print match-word)) ;;log
       match-word)))
 
 ;;;###autoload




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