[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jumpc version 2
From: |
Ted Zlatanov |
Subject: |
Re: jumpc version 2 |
Date: |
Wed, 05 Jun 2013 11:37:53 -0400 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux) |
On Thu, 11 Apr 2013 15:03:12 +0200 Ivan Kanis <address@hidden> wrote:
IK> April, 07 at 13:14 Ted Zlatanov wrote:
>> If you prefer I can give you a patch for this.
IK> I'll take the patch please.
I think this DTRT. It overwrites any existing `next-error-function'
bindings in modes it visits, which seems OK since that's the whole point
of jumpc.el. I think.
You may want to mention in the comments that you can call `next-error'
and `previous-error' instead of the bindings you suggest.
Ted
diff --git a/emacs/jumpc.el b/emacs/jumpc.el
index 6e31df1..65ec653 100644
--- a/emacs/jumpc.el
+++ b/emacs/jumpc.el
@@ -141,7 +141,7 @@
(jumpc-jump -1))
;; TODO make it interactive with COUNT as argument
-(defun jumpc-jump (count)
+(defun jumpc-jump (count &optional reset)
"Jump COUNT from current index"
(let ((length (length jumpc-list)) file-name)
;; first backward motion adds current point in the list
@@ -161,7 +161,8 @@
(find-file file-name)
(goto-char (point-min))
(forward-line (1- (nth 0 (nth jumpc-index jumpc-list))))
- (move-to-column (nth 0 (nth jumpc-index jumpc-list))))
+ (move-to-column (nth 0 (nth jumpc-index jumpc-list)))
+ (setq next-error-function 'jumpc-jump))
;; TODO I guess the right thing(tm) would be to remove the
;; entry from the list
(message "File %s disappeared!" file-name))))))
@@ -191,6 +192,7 @@
(after jumpc-insert activate)
"Insert jump position after insertion."
(jumpc-insert))
+ (setq next-error-function 'jumpc-jump))
(add-hook 'kill-emacs-hook 'jumpc-write-list))
(provide 'jumpc)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: jumpc version 2,
Ted Zlatanov <=