diff options
| author | Joakim Verona | 2013-03-26 16:20:17 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-03-26 16:20:17 +0100 |
| commit | 6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8 (patch) | |
| tree | 4a58903b4c3d010e90fc37fe10ea4d9895876d01 /lisp/cedet/srecode/args.el | |
| parent | 62dd123f7c11ddbe156bc0e84dcb7ca1da5368bb (diff) | |
| parent | 48c226c2c2592e31a47559bd1689fcc4354d9479 (diff) | |
| download | emacs-6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8.tar.gz emacs-6f6db22fc74ffb7fbdd4d805545b7e28cd59f0c8.zip | |
conflict resolve
Diffstat (limited to 'lisp/cedet/srecode/args.el')
| -rw-r--r-- | lisp/cedet/srecode/args.el | 24 |
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 |