X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/dcabbd29259b59525c2d074ecd59a1ae41118bd2..0ead54c6ffb0e744fbbc32c9dd8614856ebbc354:/packages/ada-mode/gpr-wisi.el diff --git a/packages/ada-mode/gpr-wisi.el b/packages/ada-mode/gpr-wisi.el old mode 100755 new mode 100644 index 9efaa4877..07360949e --- a/packages/ada-mode/gpr-wisi.el +++ b/packages/ada-mode/gpr-wisi.el @@ -2,7 +2,7 @@ ;; ;; [1] GNAT user guide (info "gnat_ugn") ;; -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; @@ -25,8 +25,6 @@ ;; ;;; code style ;; -;; not using lexical-binding or cl-lib because we support Emacs 23 -;; ;; I don't use 'pcase', because it gives _really_ confusing errors ;; when I forget a ')' somewhere. Even worse, the error message is ;; given when you use edebug on a defun, not when you eval it. This @@ -46,6 +44,7 @@ block-middle block-end close-paren + list-break open-paren statement-end statement-other @@ -53,7 +52,8 @@ )) (defun gpr-wisi-indent-cache (offset cache) - "Return indentation of OFFSET relative to CACHE or containing ancestor of CACHE that is at a line beginning." + "Return indentation of OFFSET relative to indentation of line containing CACHE +or containing ancestor of CACHE that is at a line beginning." (let ((indent (current-indentation))) (while (and cache (not (= (current-column) indent))) @@ -115,6 +115,20 @@ (gpr-wisi-indent-cache ada-indent cache)) )) + (list-break + ;; test/gpr/simple.gpr + ;; type GNAT_Version_Type + ;; is ("7.0.1", + ;; "6.2.2", "6.2.1", + ;; "GPL-2012", "GPL-2011"); + ;; + ;; for Source_Dirs use + ;; ("../auto", + ;; External ("GNAT_VERSION") & "/foo", + ;; "../../1553"); + (wisi-goto-containing cache) + (1+ (current-column))) + (open-paren (1+ (current-column))) @@ -155,7 +169,7 @@ (setq cache (wisi-goto-containing cache))) (when cache (wisi-forward-token); package | project - (wisi-forward-token t); name + (wisi-token-text (wisi-forward-token)); name ))) ;;; debugging @@ -168,7 +182,6 @@ ) ;;;; -;;;###autoload (defun gpr-wisi-setup () "Set up a buffer for parsing Ada files with wisi." (wisi-setup '(gpr-wisi-before-cache