diff options
Diffstat (limited to 'lisp/cedet/ede')
-rw-r--r-- | lisp/cedet/ede/base.el | 23 | ||||
-rw-r--r-- | lisp/cedet/ede/custom.el | 6 | ||||
-rw-r--r-- | lisp/cedet/ede/proj.el | 4 | ||||
-rw-r--r-- | lisp/cedet/ede/project-am.el | 10 | ||||
-rw-r--r-- | lisp/cedet/ede/speedbar.el | 10 |
5 files changed, 29 insertions, 24 deletions
diff --git a/lisp/cedet/ede/base.el b/lisp/cedet/ede/base.el index 4183ff4c61..ce7857b53a 100644 --- a/lisp/cedet/ede/base.el +++ b/lisp/cedet/ede/base.el @@ -1,6 +1,6 @@ ;;; ede/base.el --- Baseclasses for EDE. -;; Copyright (C) 2010-2014 Free Software Foundation, Inc. +;; Copyright (C) 2010-2015 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -159,6 +159,9 @@ and querying them will cause the actual project to get loaded.") ;; Projects can also affect how EDE works, by changing what appears in ;; the EDE menu, or how some keys are bound. ;; +(unless (fboundp 'ede-target-list-p) + (cl-deftype ede-target-list () '(list-of ede-target))) + (defclass ede-project (ede-project-placeholder) ((subproj :initform nil :type list @@ -287,16 +290,18 @@ All specific project types must derive from this project." ;; (defmacro ede-with-projectfile (obj &rest forms) "For the project in which OBJ resides, execute FORMS." - `(save-window-excursion - (let* ((pf (if (obj-of-class-p ,obj ede-target) - (ede-target-parent ,obj) - ,obj)) - (dbka (get-file-buffer (oref pf file)))) - (if (not dbka) (find-file (oref pf file)) - (switch-to-buffer dbka)) + (declare (indent 1)) + (unless (symbolp obj) + (message "Beware! ede-with-projectfile's first arg is copied: %S" obj)) + `(let* ((pf (if (obj-of-class-p ,obj 'ede-target) + (ede-target-parent ,obj) + ,obj)) + (dbka (get-file-buffer (oref pf file)))) + (with-current-buffer + (if (not dbka) (find-file-noselect (oref pf file)) + dbka) ,@forms (if (not dbka) (kill-buffer (current-buffer)))))) -(put 'ede-with-projectfile 'lisp-indent-function 1) ;;; The EDE persistent cache. ;; diff --git a/lisp/cedet/ede/custom.el b/lisp/cedet/ede/custom.el index ca36e1dc7c..a39b488028 100644 --- a/lisp/cedet/ede/custom.el +++ b/lisp/cedet/ede/custom.el @@ -1,6 +1,6 @@ ;;; ede/custom.el --- customization of EDE projects. -;; Copyright (C) 2010-2014 Free Software Foundation, Inc. +;; Copyright (C) 2010-2015 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -61,7 +61,7 @@ "Edit fields of the current target through EIEIO & Custom." (interactive) (require 'eieio-custom) - (if (not (obj-of-class-p ede-object ede-target)) + (if (not (obj-of-class-p ede-object 'ede-target)) (error "Current file is not part of a target")) (ede-customize-target ede-object)) @@ -72,7 +72,7 @@ "Edit fields of the current target through EIEIO & Custom. OBJ is the target object to customize." (require 'eieio-custom) - (if (and obj (not (obj-of-class-p obj ede-target))) + (if (and obj (not (obj-of-class-p obj 'ede-target))) (error "No logical target to customize")) (ede-customize obj)) diff --git a/lisp/cedet/ede/proj.el b/lisp/cedet/ede/proj.el index 7f3b186f50..fd789b3857 100644 --- a/lisp/cedet/ede/proj.el +++ b/lisp/cedet/ede/proj.el @@ -1,6 +1,6 @@ ;;; ede/proj.el --- EDE Generic Project file driver -;; Copyright (C) 1998-2003, 2007-2014 Free Software Foundation, Inc. +;; Copyright (C) 1998-2003, 2007-2015 Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> ;; Keywords: project, make @@ -297,7 +297,7 @@ for the tree being read in. If ROOTPROJ is nil, then assume that the PROJECT being read in is the root project." (save-excursion (let ((ret (eieio-persistent-read (concat project "Project.ede") - ede-proj-project)) + 'ede-proj-project)) (subdirs (directory-files project nil "[^.].*" nil))) (if (not (object-of-class-p ret 'ede-proj-project)) (error "Corrupt project file")) diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index 3e7a97cc94..a68412edf8 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -1,6 +1,6 @@ ;;; project-am.el --- A project management scheme based on automake files. -;; Copyright (C) 1998-2000, 2003, 2005, 2007-2014 +;; Copyright (C) 1998-2000, 2003, 2005, 2007-2015 ;; Free Software Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -853,13 +853,13 @@ Argument FILE is the file to extract the end directory name from." (defun project-am-preferred-target-type (file) "For FILE, return the preferred type for that file." (cond ((string-match "\\.texi?\\(nfo\\)$" file) - project-am-texinfo) + 'project-am-texinfo) ((string-match "\\.[0-9]$" file) - project-am-man) + 'project-am-man) ((string-match "\\.el$" file) - project-am-lisp) + 'project-am-lisp) (t - project-am-program))) + 'project-am-program))) (defmethod ede-buffer-header-file((this project-am-objectcode) buffer) "There are no default header files." diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index ded9c78cf4..e08562a373 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -1,6 +1,6 @@ ;;; ede/speedbar.el --- Speedbar viewing of EDE projects -;; Copyright (C) 1998-2001, 2003, 2005, 2007-2014 Free Software +;; Copyright (C) 1998-2001, 2003, 2005, 2007-2015 Free Software ;; Foundation, Inc. ;; Author: Eric M. Ludlam <zappo@gnu.org> @@ -121,9 +121,9 @@ Argument DIR is the directory from which to derive the list of objects." (let ((obj (eieio-speedbar-find-nearest-object))) (if (not (eieio-object-p obj)) nil - (cond ((obj-of-class-p obj ede-project) + (cond ((obj-of-class-p obj 'ede-project) (project-compile-project obj)) - ((obj-of-class-p obj ede-target) + ((obj-of-class-p obj 'ede-target) (project-compile-target obj)) (t (error "Error in speedbar structure")))))) @@ -133,9 +133,9 @@ Argument DIR is the directory from which to derive the list of objects." (let ((obj (eieio-speedbar-find-nearest-object))) (if (not (eieio-object-p obj)) (error "Error in speedbar or ede structure") - (if (obj-of-class-p obj ede-target) + (if (obj-of-class-p obj 'ede-target) (setq obj (ede-target-parent obj))) - (if (obj-of-class-p obj ede-project) + (if (obj-of-class-p obj 'ede-project) obj (error "Error in speedbar or ede structure"))))) |