comparison lisp/oobr/br-c-ft.el @ 24:4103f0995bd7 r19-15b95

Import from CVS: tag r19-15b95
author cvs
date Mon, 13 Aug 2007 08:51:03 +0200
parents 376386a54a3c
children 131b0175ea99
comparison
equal deleted inserted replaced
23:0edd3412f124 24:4103f0995bd7
4 ;; SUMMARY: OO-Browser C construct handling. 4 ;; SUMMARY: OO-Browser C construct handling.
5 ;; USAGE: GNU Emacs Lisp Library 5 ;; USAGE: GNU Emacs Lisp Library
6 ;; KEYWORDS: c, tools 6 ;; KEYWORDS: c, tools
7 ;; 7 ;;
8 ;; AUTHOR: Bob Weiner 8 ;; AUTHOR: Bob Weiner
9 ;; ORG: Motorola, Inc. 9 ;; ORG: InfoDock Associates
10 ;; 10 ;;
11 ;; ORIG-DATE: 3-May-95 at 16:47:05 11 ;; ORIG-DATE: 3-May-95 at 16:47:05
12 ;; LAST-MOD: 21-Oct-95 at 04:30:51 by Bob Weiner 12 ;; LAST-MOD: 21-Feb-97 at 17:31:44 by Bob Weiner
13 ;; 13 ;;
14 ;; Copyright (C) 1995 Free Software Foundation, Inc. 14 ;; Copyright (C) 1995, 1996 Free Software Foundation, Inc.
15 ;; See the file BR-COPY for license information. 15 ;; See the file BR-COPY for license information.
16 ;; 16 ;;
17 ;; This file is part of the OO-Browser. 17 ;; This file is part of the OO-Browser.
18 ;; 18 ;;
19 ;; DESCRIPTION: 19 ;; DESCRIPTION:
20 ;; DESCRIP-END. 20 ;; DESCRIP-END.
21
22 ;;; ************************************************************************
23 ;;; Other required Elisp libraries
24 ;;; ************************************************************************
25 21
26 ;;; ************************************************************************ 22 ;;; ************************************************************************
27 ;;; Public variables 23 ;;; Public variables
28 ;;; ************************************************************************ 24 ;;; ************************************************************************
29 25
67 ; (expand-file-name "br-c-tags" br-directory) 63 ; (expand-file-name "br-c-tags" br-directory)
68 ; br-tags-file 64 ; br-tags-file
69 ; (mapcar 'expand-file-name 65 ; (mapcar 'expand-file-name
70 ; (delq nil (append br-sys-search-dirs 66 ; (delq nil (append br-sys-search-dirs
71 ; br-lib-search-dirs)))) 67 ; br-lib-search-dirs))))
72 (apply 'call-process (expand-file-name "br-c-tags" br-directory) 68 (if hyperb:microcruft-os-p
73 nil nil nil 69 (apply 'call-process "bash"
74 ;; If no etags program in exec-directory, use one in user's $PATH. 70 nil nil nil
75 (let ((etags (expand-file-name "etags" exec-directory))) 71 (expand-file-name "br-c-tags" br-directory)
76 (if (file-executable-p etags) etags "etags")) 72 ;; If no etags program in exec-directory, use one in user's $PATH.
77 br-tags-file 73 (let ((etags (expand-file-name "etags" exec-directory)))
78 (mapcar 'expand-file-name 74 (if (file-executable-p etags) etags "etags"))
79 (delq nil (append br-sys-search-dirs br-lib-search-dirs)))) 75 br-tags-file
76 (mapcar 'expand-file-name
77 (delq nil (append br-sys-search-dirs br-lib-search-dirs))))
78 (apply 'call-process (expand-file-name "br-c-tags" br-directory)
79 nil nil nil
80 ;; If no etags program in exec-directory, use one in user's $PATH.
81 (let ((etags (expand-file-name "etags" exec-directory)))
82 (if (file-executable-p etags) etags "etags"))
83 br-tags-file
84 (mapcar 'expand-file-name
85 (delq nil (append br-sys-search-dirs br-lib-search-dirs)))))
80 (goto-char (point-max)) 86 (goto-char (point-max))
81 (let ((c-tags-start (point))) 87 (let ((c-tags-start (point)))
82 (insert-file-contents br-tags-file) 88 (insert-file-contents br-tags-file)
83 (goto-char (point-max)) 89 (goto-char (point-max))
84 (insert "\^L\n") ;; To mark end of C tags insertion. 90 (insert "\^L\n") ;; To mark end of C tags insertion.
98 ;; searching backward but are actually single line comments. 104 ;; searching backward but are actually single line comments.
99 (save-excursion 105 (save-excursion
100 (and (re-search-backward "\\(^\\|[^/]\\)/\\*\\|\\*/" nil t) 106 (and (re-search-backward "\\(^\\|[^/]\\)/\\*\\|\\*/" nil t)
101 (not (looking-at "\\*/"))))) 107 (not (looking-at "\\*/")))))
102 108
103 ;;; ************************************************************************
104 ;;; Private functions
105 ;;; ************************************************************************
106
107 ;;; ************************************************************************
108 ;;; Private variables
109 ;;; ************************************************************************
110
111 (provide 'br-c-ft) 109 (provide 'br-c-ft)