]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/f90-interface-browser/f90-interface-browser.el
Fix some quoting problems in doc strings
[gnu-emacs-elpa] / packages / f90-interface-browser / f90-interface-browser.el
index d499ba021a0f8dc8bcc06dc96690eae07a35f7aa..1b69061c25b42651dad827ebea135638b2911815 100644 (file)
@@ -1,6 +1,6 @@
 ;;; f90-interface-browser.el --- Parse and browse f90 interfaces
 
-;; Copyright (C) 2011, 2012, 2013, 2014  Free Software Foundation, Inc
+;; Copyright (C) 2011, 2012, 2013, 2014, 2015  Free Software Foundation, Inc
 
 ;; Author: Lawrence Mitchell <wence@gmx.li>
 ;; Created: 2011-07-06
@@ -243,7 +243,7 @@ If NAME is like type(TYPENAME) return TYPENAME, otherwise just NAME."
 
 Recurse over all (non-hidden) directories below DIR and parse
 interfaces found within them using `f90-parse-interfaces-in-dir',
-a directory is considered hidden if it's name doesn't start with
+a directory is considered hidden if its name doesn't start with
 an alphanumeric character."
   (interactive "DParse files in tree: ")
   (let (dirs
@@ -272,7 +272,8 @@ an alphanumeric character."
   (loop for file in (directory-files dir t
                                      (rx-to-string
                                       `(and "." (or ,@f90-file-extensions)
-                                            eos) t))
+                                            eos)
+                                      t))
         do (f90-parse-interfaces file f90-all-interfaces)))
 
 (defun f90-find-tag-interface (name &optional match-sublist)
@@ -530,11 +531,11 @@ default is the type of the variable."
       "UNION-TYPE"
     ;; Ignore name
     (setq type (cdr type))
-    (mapconcat 'identity (loop for a in type
+    (mapconcat #'identity (loop for a in type
                                if (and (consp a)
                                        (string= (car a) "dimension"))
                                collect (format "dimension(%s)"
-                                               (mapconcat 'identity
+                                               (mapconcat #'identity
                                                           (make-list (cdr a)
                                                                      ":")
                                                           ","))
@@ -555,9 +556,10 @@ default is the type of the variable."
                          arglist "\n")))
     (f90-mode)
     (if (fboundp 'font-lock-ensure)
-        (font-lock-ensure) (font-lock-fontify-buffer))
+        (font-lock-ensure)
+      (with-no-warnings (font-lock-fontify-buffer)))
     (goto-char (point-min))
-    (mapconcat 'identity
+    (mapconcat #'identity
                (loop while (not (eobp))
                      collect (buffer-substring (line-beginning-position)
                                                (- (line-end-position)
@@ -662,7 +664,7 @@ see `f90-insert-fluidity-refcount'."
 (defun f90-insert-fluidity-refcount (file fname)
   "Insert a Fluidity reference count template for FILE.
 
-If FNAME matches \\\\`Reference_count_.*\\\\.F90 then this file
+If FNAME matches \\\\=`Reference_count_\\([^\\.]+\\)\\.F90 then this file
 needs a reference count interface, so insert one."
   (when (string-match "\\`Reference_count_\\([^\\.]+\\)\\.F90" fname)
     (insert-file-contents-literally
@@ -817,16 +819,16 @@ needs a reference count interface, so insert one."
 
 (defun f90-parse-type-definition ()
   "Parse a type definition at (or in front of) `point'."
-  (let (type slots slot fn)
-    (goto-char (point-min))
-    (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
-      (error "Trying parse a type but no type found"))
-    (setq type (format "type(%s)" (f90-normalise-string (match-string 1))))
+  (goto-char (point-min))
+  (unless (re-search-forward "^[ \t]*type[ \t]+\\(.+?\\)[ \t]*$" nil t)
+    (error "Trying parse a type but no type found"))
+  (let ((type (format "type(%s)" (f90-normalise-string (match-string 1))))
+        (slots ()))
     (while (not (eobp))
-      (setq slot (f90-parse-single-type-declaration))
-      (when slot
-        (setf slots (nconc slot slots)))
-      (forward-line 1))
+      (let ((slot (f90-parse-single-type-declaration)))
+        (when slot
+          (setf slots (nconc slot slots)))
+        (forward-line 1)))
     (setf (gethash type f90-types) slots)))
 
 (defun f90-arglist-types ()