[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively
From: |
Kazuo YAGI |
Subject: |
Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively |
Date: |
Sun, 06 Jul 2008 14:31:40 +0900 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20080227) |
Hi YAMAGUCHI-san,
You guessed correctly. The function "line-number-at-pos" exists only in GNU
Emacs 22.1 later.
Maybe I have to backport it to my switch-dir.el, or do you have any good idea
about backport?
------------------------------------------------------------------------------------
$ ls
emacs-21.4 emacs-22.1 emacs-22.2
$ find -name "*.el*" -exec zgrep -n line-number-at-pos {} /dev/null \; | grep
defun
./emacs-22.2/lisp/simple.el:905:(defun line-number-at-pos (&optional pos)
./emacs-22.1/lisp/simple.el:902:(defun line-number-at-pos (&optional pos)
$ sed -n '902,913p' emacs-22.1/lisp/simple.el
(defun line-number-at-pos (&optional pos)
"Return (narrowed) buffer line number at position POS.
If POS is nil, use current buffer location.
Counting starts at (point-min), so the value refers
to the contents of the accessible portion of the buffer."
(let ((opoint (or pos (point))) start)
(save-excursion
(goto-char (point-min))
(setq start (point))
(goto-char opoint)
(forward-line 0)
(1+ (count-lines start (point))))))
------------------------------------------------------------------------------------
And I also agree that the directory list configuration should be moved to
$HOME/.emacs.
I'll send the updated version to gnu-emacs-sources mailing-list later after I
fixed
some points. It will be an exciting new challenge for me.
Thanks a lot for your comments,
- Kazuo YAGI
Shigio YAMAGUCHI Wrote:
> o When I selected a line in switch-dir-mode, the following message
> was displayed in my emacs (GNU Emacs 21.3.1).
>
> 'Symbol's function definition is void: line-number-at-pos'
>
> I don't know why. There might be a difference by the version.
>
> o Switch-dir.el should be read-only file, I think.
> How about separating the directory list from the macro file?
>
> I recommend you to contribute to gnu-emacs-sources mailing-list.
> --
> Shigio YAMAGUCHI <address@hidden> - GNU Project
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
>
- [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Kazuo YAGI, 2008/07/01
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Shigio YAMAGUCHI, 2008/07/03
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Shigio YAMAGUCHI, 2008/07/03
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Kazuo YAGI, 2008/07/05
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Shigio YAMAGUCHI, 2008/07/05
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively,
Kazuo YAGI <=
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Kazuo YAGI, 2008/07/06
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Shigio YAMAGUCHI, 2008/07/06
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Kazuo YAGI, 2008/07/07
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Shigio YAMAGUCHI, 2008/07/07
- Re: [PATCH] Enhancement: Switch gtags-rootdir easily and interactively, Kazuo YAGI, 2008/07/07