光标在绝对路经之上跳转 续.
在 Emacs-lisp Mode
中发现 M-.
和 M-,
很好用.
上次学到了 find-file-at-point
, 但是跳回来就不知道了.
这次把 find-file-at-point
瞎折腾了一下,发现能用了.
*** tweak-find-file-at-point Sat Jul 13 18:01:14 2019
--- find-file-at-point Sat Jul 13 17:59:49 2019
***************
*** 1,4 ****
! (defun tweak-find-file-at-point (&optional filename)
"Find FILENAME, guessing a default from text around point.
If `ffap-url-regexp' is not nil, the FILENAME may also be an URL.
With a prefix, this command behaves exactly like `ffap-file-finder'.
--- 1,4 ----
! (defun find-file-at-point (&optional filename)
"Find FILENAME, guessing a default from text around point.
If `ffap-url-regexp' is not nil, the FILENAME may also be an URL.
With a prefix, this command behaves exactly like `ffap-file-finder'.
***************
*** 32,41 ****
((or (not ffap-newfile-prompt)
(file-exists-p filename)
(y-or-n-p "File does not exist, create buffer? "))
! (xref-push-marker-stack)
! (funcall ffap-file-finder
;; expand-file-name fixes "~/~/.emacs" bug sent by CHUCKR.
(expand-file-name filename)))
;; User does not want to find a non-existent file:
((signal 'file-missing (list "Opening file buffer"
"No such file or directory"
--- 32,40 ----
((or (not ffap-newfile-prompt)
(file-exists-p filename)
(y-or-n-p "File does not exist, create buffer? "))
! (funcall ffap-file-finder
;; expand-file-name fixes "~/~/.emacs" bug sent by CHUCKR.
(expand-file-name filename)))
;; User does not want to find a non-existent file:
((signal 'file-missing (list "Opening file buffer"
"No such file or directory"