comparison lisp/find-file.el @ 22192:bf83c23f3300

(ff-emacs-19, ff-xemacs): Functions deleted. (ff-goto-click, ff-mouse-find-other-file) (ff-mouse-find-other-file-other-window): Just one definition. (locate-file): Definition deleted.
author Richard M. Stallman <rms@gnu.org>
date Fri, 22 May 1998 23:36:06 +0000
parents c297faa167f5
children e06965792db4
comparison
equal deleted inserted replaced
22191:c07c0604d95d 22192:bf83c23f3300
374 (ff-find-the-other-file in-other-window) 374 (ff-find-the-other-file in-other-window)
375 (setq ff-ignore-include ignore))) 375 (setq ff-ignore-include ignore)))
376 376
377 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 377 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
378 ;; Support functions 378 ;; Support functions
379
380 (defun ff-emacs-19 ()
381 (string-match "^19\\.[0-9]+\\.[0-9]+$" emacs-version))
382
383 (defun ff-xemacs ()
384 (or (string-match "Lucid" emacs-version)
385 (string-match "XEmacs" emacs-version)))
386 379
387 (defun ff-find-the-other-file (&optional in-other-window) 380 (defun ff-find-the-other-file (&optional in-other-window)
388 "Find the header or source file corresponding to the current file. 381 "Find the header or source file corresponding to the current file.
389 Being on a `#include' line pulls in that file, but see the help on 382 Being on a `#include' line pulls in that file, but see the help on
390 the `ff-ignore-include' variable. 383 the `ff-ignore-include' variable.
769 762
770 (ff-switch-file 'switch-to-buffer 763 (ff-switch-file 'switch-to-buffer
771 'switch-to-buffer-other-window 764 'switch-to-buffer-other-window
772 buffer-or-name in-other-window nil)) 765 buffer-or-name in-other-window nil))
773 766
774 (cond 767 (defun ff-goto-click (event)
775 ((ff-emacs-19) 768 (set-buffer (window-buffer (posn-window (event-end event))))
776 (defun ff-goto-click (event) 769 (goto-char (posn-point (event-end event))))
777 (set-buffer (window-buffer (posn-window (event-end event)))) 770
778 (goto-char (posn-point (event-end event)))) 771 ;;;###autoload
779 772 (defun ff-mouse-find-other-file (event)
780 ;;;###autoload 773 "Visit the file you click on."
781 (defun ff-mouse-find-other-file (event) 774 (interactive "e")
782 "Visit the file you click on." 775 (save-excursion
783 (interactive "e") 776 (ff-goto-click event)
784 (save-excursion 777 (ff-find-other-file nil)))
785 (ff-goto-click event) 778
786 (ff-find-other-file nil))) 779 ;;;###autoload
787 780 (defun ff-mouse-find-other-file-other-window (event)
788 ;;;###autoload 781 "Visit the file you click on."
789 (defun ff-mouse-find-other-file-other-window (event) 782 (interactive "e")
790 "Visit the file you click on." 783 (save-excursion
791 (interactive "e") 784 (ff-goto-click event)
792 (save-excursion 785 (ff-find-other-file t)))
793 (ff-goto-click event)
794 (ff-find-other-file t)))
795
796 ;;;###autoload
797 (defun locate-file (fname dirs &optional suffix-list ignore-perms)
798 "Defines XEmacs look-alike locate-file for GNU Emacs-19."
799 (interactive)
800 (ff-get-file dirs fname suffix-list))
801 )
802
803 ((ff-xemacs)
804
805 ;;;###autoload
806 (defun ff-mouse-find-other-file (event)
807 "Visit the file you click on."
808 (interactive "@e")
809 (save-excursion
810 (mouse-set-point event)
811 (ff-find-other-file nil)))
812
813 ;;;###autoload
814 (defun ff-mouse-find-other-file-other-window (event)
815 "Visit the file you click on."
816 (interactive "@e")
817 (save-excursion
818 (mouse-set-point event)
819 (ff-find-other-file t)))
820 ))
821 786
822 (provide 'find-file) 787 (provide 'find-file)
823 788
824 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 789 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
825 ;; This section offers an example of user defined function to select files 790 ;; This section offers an example of user defined function to select files