1149 |
|
|
1150 |
;; Get the local value in the tags table buffer before switching buffers. |
;; Get the local value in the tags table buffer before switching buffers. |
1151 |
(setq goto-func goto-tag-location-function) |
(setq goto-func goto-tag-location-function) |
1152 |
(find-file-of-tag-noselect file) |
(tag-find-file-of-tag-noselect file) |
1153 |
(widen) |
(widen) |
1154 |
(push-mark) |
(push-mark) |
1155 |
(funcall goto-func tag-info) |
(funcall goto-func tag-info) |
1157 |
;; Return the buffer where the tag was found. |
;; Return the buffer where the tag was found. |
1158 |
(current-buffer)))) |
(current-buffer)))) |
1159 |
|
|
1160 |
(defun find-file-of-tag-noselect (file) |
(defun tag-find-file-of-tag-noselect (file) |
1161 |
;; Find the right line in the specified file. |
;; Find the right line in the specified file. |
1162 |
;; If we are interested in compressed-files, |
;; If we are interested in compressed-files, |
1163 |
;; we search files with extensions. |
;; we search files with extensions. |
1191 |
(error "File %s not found" file)) |
(error "File %s not found" file)) |
1192 |
(set-buffer the-buffer)))) |
(set-buffer the-buffer)))) |
1193 |
|
|
1194 |
(defun find-file-of-tag (file) |
(defun tag-find-file-of-tag (file) |
1195 |
(let ((buf (find-file-of-tag-noselect file))) |
(let ((buf (tag-find-file-of-tag-noselect file))) |
1196 |
(condition-case nil |
(condition-case nil |
1197 |
(switch-to-buffer buf) |
(switch-to-buffer buf) |
1198 |
(error (pop-to-buffer buf))))) |
(error (pop-to-buffer buf))))) |
1391 |
'action (lambda (button) |
'action (lambda (button) |
1392 |
(let ((tag-info (button-get button 'tag-info)) |
(let ((tag-info (button-get button 'tag-info)) |
1393 |
(goto-func (button-get button 'goto-func))) |
(goto-func (button-get button 'goto-func))) |
1394 |
(find-file-of-tag (button-get button 'file-path)) |
(tag-find-file-of-tag (button-get button 'file-path)) |
1395 |
(widen) |
(widen) |
1396 |
(funcall goto-func tag-info))) |
(funcall goto-func tag-info))) |
1397 |
'face 'tags-tag-face |
'face 'tags-tag-face |
1475 |
'action (lambda (button) |
'action (lambda (button) |
1476 |
(let ((tag-info (button-get button 'tag-info)) |
(let ((tag-info (button-get button 'tag-info)) |
1477 |
(goto-func (button-get button 'goto-func))) |
(goto-func (button-get button 'goto-func))) |
1478 |
(find-file-of-tag (button-get button 'file-path)) |
(tag-find-file-of-tag (button-get button 'file-path)) |
1479 |
(widen) |
(widen) |
1480 |
(funcall goto-func tag-info))) |
(funcall goto-func tag-info))) |
1481 |
'face 'tags-tag-face |
'face 'tags-tag-face |
1485 |
(make-text-button pt (point) |
(make-text-button pt (point) |
1486 |
'file-path file-path |
'file-path file-path |
1487 |
'action (lambda (button) |
'action (lambda (button) |
1488 |
(find-file-of-tag (button-get button 'file-path)) |
(tag-find-file-of-tag (button-get button 'file-path)) |
1489 |
;; Get the local value in the tags table |
;; Get the local value in the tags table |
1490 |
;; buffer before switching buffers. |
;; buffer before switching buffers. |
1491 |
(goto-char (point-min))) |
(goto-char (point-min))) |