瀏覽代碼

Make `org-table-current-column' an interactive command

* lisp/org-table.el (org-table-current-column): Add interactive to turn
this into a command.
Carsten Dominik 14 年之前
父節點
當前提交
ae6d203a4b
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lisp/org-table.el

+ 3 - 0
lisp/org-table.el

@@ -1151,11 +1151,14 @@ is always the old value."
 
 (defun org-table-current-column ()
   "Find out which column we are in."
+  (interactive)
+  (if (interactive-p) (org-table-check-inside-data-field))
   (save-excursion
     (let ((cnt 0) (pos (point)))
       (beginning-of-line 1)
       (while (search-forward "|" pos t)
 	(setq cnt (1+ cnt)))
+      (if (interactive-p) (message "In table column %d" cnt))
       cnt)))
 
 (defun org-table-current-dline ()