emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] help-mode.el


From: Nick Roberts
Subject: [PATCH] help-mode.el
Date: Fri, 21 Jul 2006 18:04:37 +1200

If help can't find the location in a file, how about a message explaining
this to the user?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


*** help-mode.el        13 Jul 2006 20:31:48 +1200      1.49
--- help-mode.el        21 Jul 2006 18:01:01 +1200      
*************** The format is (FUNCTION ARGS...).")
*** 157,164 ****
                   (let ((location
                          (find-function-search-for-symbol fun nil file)))
                     (pop-to-buffer (car location))
!                    (when (cdr location)
!                      (goto-char (cdr location)))))
    'help-echo (purecopy "mouse-2, RET: find function's definition"))
  
  (define-button-type 'help-variable-def
--- 157,165 ----
                   (let ((location
                          (find-function-search-for-symbol fun nil file)))
                     (pop-to-buffer (car location))
!                    (if (cdr location)
!                        (goto-char (cdr location))
!                      (message "Unable to find location in file"))))
    'help-echo (purecopy "mouse-2, RET: find function's definition"))
  
  (define-button-type 'help-variable-def
*************** The format is (FUNCTION ARGS...).")
*** 168,175 ****
                     (setq file (help-C-file-name var 'var)))
                   (let ((location (find-variable-noselect var file)))
                     (pop-to-buffer (car location))
!                    (when (cdr location)
!                      (goto-char (cdr location)))))
    'help-echo (purecopy "mouse-2, RET: find variable's definition"))
  
  (define-button-type 'help-face-def
--- 169,177 ----
                     (setq file (help-C-file-name var 'var)))
                   (let ((location (find-variable-noselect var file)))
                     (pop-to-buffer (car location))
!                    (if (cdr location)
!                      (goto-char (cdr location))
!                      (message "Unable to find location in file"))))
    'help-echo (purecopy "mouse-2, RET: find variable's definition"))
  
  (define-button-type 'help-face-def
*************** The format is (FUNCTION ARGS...).")
*** 181,188 ****
                   (let ((location
                          (find-function-search-for-symbol fun 'defface file)))
                     (pop-to-buffer (car location))
!                    (when (cdr location)
!                      (goto-char (cdr location)))))
    'help-echo (purecopy "mouse-2, RET: find face's definition"))
  
  
--- 183,191 ----
                   (let ((location
                          (find-function-search-for-symbol fun 'defface file)))
                     (pop-to-buffer (car location))
!                    (if (cdr location)
!                        (goto-char (cdr location))
!                      (message "Unable to find location in file"))))
    'help-echo (purecopy "mouse-2, RET: find face's definition"))
  
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]