aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cedet/srecode/args.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cedet/srecode/args.el')
-rw-r--r--lisp/cedet/srecode/args.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el
index b91f96f611d..d6798f7523d 100644
--- a/lisp/cedet/srecode/args.el
+++ b/lisp/cedet/srecode/args.el
@@ -157,6 +157,30 @@ do not contain any text from preceding or following text."
157 (srecode-dictionary-show-section dict "RCS") 157 (srecode-dictionary-show-section dict "RCS")
158 ))) 158 )))
159 159
160;;; :project ARGUMENT HANDLING
161;;
162;; When the :project argument is required, fill the dictionary with
163;; information that the current project (from EDE) might know
164(defun srecode-semantic-handle-:project (dict)
165 "Add macros into the dictionary DICT based on the current ede project."
166 (let* ((bfn (buffer-file-name))
167 (dir (file-name-directory bfn)))
168 (if (ede-toplevel)
169 (let* ((projecttop (ede-toplevel-project default-directory))
170 (relfname (file-relative-name bfn projecttop))
171 (reldir (file-relative-name dir projecttop))
172 )
173 (srecode-dictionary-set-value dict "PROJECT_FILENAME" relfname)
174 (srecode-dictionary-set-value dict "PROJECT_DIRECTORY" reldir)
175 (srecode-dictionary-set-value dict "PROJECT_NAME" (ede-name (ede-toplevel)))
176 (srecode-dictionary-set-value dict "PROJECT_VERSION" (oref (ede-toplevel) :version))
177 )
178 ;; If there is no EDE project, then put in some base values.
179 (srecode-dictionary-set-value dict "PROJECT_FILENAME" bfn)
180 (srecode-dictionary-set-value dict "PROJECT_DIRECTORY" dir)
181 (srecode-dictionary-set-value dict "PROJECT_NAME" "N/A")
182 (srecode-dictionary-set-value dict "PROJECT_VERSION" "1.0"))))
183
160;;; :system ARGUMENT HANDLING 184;;; :system ARGUMENT HANDLING
161;; 185;;
162;; When a :system argument is required, fill the dictionary with 186;; When a :system argument is required, fill the dictionary with