From af721abd3ad489f98cc8f67ba15d4dc44d187a5d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 11 Jul 2015 23:18:52 -0400 Subject: [PATCH] * ada-mode: Use lexical-binding since it requires Emacs-24.2 anyway * ada-mode/ada-mode-compat-23.4.el: Remove. * ada-mode/ada-build.el: Remove redundant :group arg on defcustoms. * ada-mode/ada-gnat-compile.el (ada-gnat-fix-error): Remove unused vars `ident', `type', and `param'. * ada-mode/ada-gnat-xref.el (ada-gnat-xref-other): Remove unused var `status'. (ada-gnat-xref-parents): Remove unused vars `found-file', `found-line', and `found-col'. (ada-gnat-xref-all): Rename (dynbound) mode-name to (lexbound) mode. * ada-mode/ada-indent-user-options.el: Remove redundant :group arg on defcustoms. * ada-mode/ada-mode.el: Remove redundant :group arg on defcustoms. (ada-case-exception-file, ada-case-keyword): Comment-out dangerous :safep. (ada-language-version): Remove redundant calls to make-variable-buffer-local. (ada-prj-current-file): Declare. (ada-identifier-at-point): Remove unused var `identifier'. * ada-mode/gnat-core.el (ada-gnat-ada-name-from-file-name): Remove unused var `status'. --- packages/ada-mode/ada-build.el | 21 ++--- packages/ada-mode/ada-fix-error.el | 2 +- packages/ada-mode/ada-gnat-compile.el | 14 ++- packages/ada-mode/ada-gnat-xref.el | 11 +-- packages/ada-mode/ada-grammar-wy.el | 4 +- packages/ada-mode/ada-imenu.el | 6 +- packages/ada-mode/ada-indent-user-options.el | 34 +++---- packages/ada-mode/ada-mode-compat-23.4.el | 41 --------- packages/ada-mode/ada-mode-compat-24.2.el | 4 +- packages/ada-mode/ada-mode.el | 93 +++++++++----------- packages/ada-mode/ada-prj.el | 2 +- packages/ada-mode/ada-ref-man.el | 4 +- packages/ada-mode/ada-skel.el | 6 +- packages/ada-mode/ada-stmt.el | 2 +- packages/ada-mode/ada-wisi-opentoken.el | 4 +- packages/ada-mode/ada-wisi.el | 2 +- packages/ada-mode/ada-xref.el | 2 +- packages/ada-mode/gnat-core.el | 7 +- packages/ada-mode/gnat-inspect.el | 11 ++- packages/ada-mode/gpr-grammar-wy.el | 4 +- packages/ada-mode/gpr-mode.el | 4 +- packages/ada-mode/gpr-query.el | 11 ++- packages/ada-mode/gpr-skel.el | 14 +-- packages/ada-mode/gpr-wisi.el | 4 +- 24 files changed, 116 insertions(+), 191 deletions(-) delete mode 100644 packages/ada-mode/ada-mode-compat-23.4.el diff --git a/packages/ada-mode/ada-build.el b/packages/ada-mode/ada-build.el index 6166836e8..c54cae21d 100644 --- a/packages/ada-mode/ada-build.el +++ b/packages/ada-mode/ada-build.el @@ -1,7 +1,7 @@ -;;; ada-build.el --- extensions to ada-mode for compiling and running -;;; Ada projects without 'make' or similar tool +;;; ada-build.el --- Extensions to ada-mode for compiling and running -*- lexical-binding:t -*- +;; Ada projects without 'make' or similar tool ;; -;;; Copyright (C) 1994, 1995, 1997 - 2014 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1997 - 2015 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; Maintainer: Stephen Leake @@ -52,35 +52,30 @@ (const prompt-default) (const prompt-exist) (const error)) - :group 'ada-build - :safe 'symbolp) + :safe #'symbolp) (defcustom ada-build-confirm-command nil "If non-nil, prompt for confirmation/edit of each command before it is run." :type 'boolean - :group 'ada-build - :safe 'booleanp) + :safe #'booleanp) (defcustom ada-build-check-cmd (concat "${cross_prefix}gnatmake -u -c -gnatc ${gnatmake_opt} ${full_current} -cargs -I${src_dir} ${comp_opt}") "Default command to syntax check a single file. Overridden by project variable 'check_cmd'." - :type 'string - :group 'ada-build) + :type 'string) (defcustom ada-build-make-cmd (concat "${cross_prefix}gnatmake -P${gpr_file} -o ${main} ${main} ${gnatmake_opt} " "-cargs -I${src_dir} ${comp_opt} -bargs ${bind_opt} -largs ${link_opt}") "Default command to compile the application. Overridden by project variable 'make_cmd'." - :type 'string - :group 'ada-build) + :type 'string) (defcustom ada-build-run-cmd "./${main}" "Default command to run the application, in a spawned shell. Overridden by project variable 'run_cmd'." - :type 'string - :group 'ada-build) + :type 'string) ;;;; code diff --git a/packages/ada-mode/ada-fix-error.el b/packages/ada-mode/ada-fix-error.el index 3e648eeab..800810478 100644 --- a/packages/ada-mode/ada-fix-error.el +++ b/packages/ada-mode/ada-fix-error.el @@ -1,4 +1,4 @@ -;;; ada-fix-error.el --- utilities for automatically fixing +;;; ada-fix-error.el --- utilities for automatically fixing -*- lexical-binding:t -*- ;; errors reported by the compiler. ;; Copyright (C) 1999-2009, 2012-2015 Free Software Foundation, Inc. diff --git a/packages/ada-mode/ada-gnat-compile.el b/packages/ada-mode/ada-gnat-compile.el index f3d69ac2d..a09c48201 100644 --- a/packages/ada-mode/ada-gnat-compile.el +++ b/packages/ada-mode/ada-gnat-compile.el @@ -1,5 +1,5 @@ -;; Ada mode compiling functionality provided by the 'gnat' -;; tool. Includes related functions, such as gnatprep support. +;; ada-gnat-compile.el --- Ada mode compiling functionality provided by 'gnat' -*- lexical-binding:t -*- +;; Includes related functions, such as gnatprep support. ;; ;; These tools are all Ada-specific; use Makefiles for multi-language ;; GNAT compilation tools. @@ -165,7 +165,7 @@ Prompt user if more than one." (completing-read "correct spelling: " choices)) ))) -(defun ada-gnat-fix-error (msg source-buffer source-window) +(defun ada-gnat-fix-error (_msg source-buffer _source-window) "For `ada-gnat-fix-error-hook'." (let ((start-pos (point)) message-column @@ -192,8 +192,7 @@ Prompt user if more than one." ;; Then style errors. ((looking-at (concat ada-gnat-quoted-name-regexp " is not visible")) - (let ((ident (match-string 1)) - (done nil) + (let ((done nil) (file-line-struct (progn (beginning-of-line) (ada-get-compilation-message))) pos choices unit-name) ;; next line may contain a reference to where ident is @@ -348,7 +347,7 @@ Prompt user if more than one." t))) ((looking-at (concat "expected \\(private \\)?type " ada-gnat-quoted-name-regexp)) - (let ((type (match-string 2))) + (progn (forward-line 1) (move-to-column message-column) (cond @@ -470,8 +469,7 @@ Prompt user if more than one." t) ((looking-at (concat "warning: formal parameter " ada-gnat-quoted-name-regexp " is not modified")) - (let ((param (match-string 1)) - (mode-regexp "\"\\([in out]+\\)\"") + (let ((mode-regexp "\"\\([in out]+\\)\"") new-mode old-mode) (forward-line 1) diff --git a/packages/ada-mode/ada-gnat-xref.el b/packages/ada-mode/ada-gnat-xref.el index c5f675e17..05961a08d 100644 --- a/packages/ada-mode/ada-gnat-xref.el +++ b/packages/ada-mode/ada-gnat-xref.el @@ -1,5 +1,4 @@ -;; Ada mode cross-reference functionality provided by the 'gnat xref' -;; tool. +;;; ada-gnat-xref.el --- Ada mode cross-reference functionality provided by the 'gnat xref' tool -*- lexical-binding:t -*- ;; ;; These tools are all Ada-specific; see gpr-query for multi-language ;; GNAT cross-reference tools. @@ -57,7 +56,6 @@ (switches (concat "-a" (when (ada-prj-get 'gpr_ext) (concat "--ext=" (ada-prj-get 'gpr_ext))))) - status (result nil)) (with-current-buffer (gnat-run-buffer) (gnat-run-gnat "find" (list switches arg)) @@ -121,10 +119,7 @@ ;; error in *.gpr; ignore here. (forward-line 1) ;; else process line - (let ((found-file (match-string 1)) - (found-line (string-to-number (match-string 2))) - (found-col (string-to-number (match-string 3)))) - + (progn (skip-syntax-forward "^ ") (skip-syntax-forward " ") (if (looking-at (concat "derived from .* (" ada-gnat-file-line-col-regexp ")")) @@ -164,7 +159,7 @@ (compilation-start cmd 'compilation-mode - (lambda (mode-name) (concat mode-name "-gnatfind"))) + (lambda (mode) (concat mode "-gnatfind"))) )))) ;;;;; setup diff --git a/packages/ada-mode/ada-grammar-wy.el b/packages/ada-mode/ada-grammar-wy.el index f3684dcb6..32665130e 100644 --- a/packages/ada-mode/ada-grammar-wy.el +++ b/packages/ada-mode/ada-grammar-wy.el @@ -1,6 +1,6 @@ -;;; ada-grammar-wy.el --- Generated parser support file +;;; ada-grammar-wy.el --- Generated parser support file -*- lexical-binding:t -*- -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2015 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/packages/ada-mode/ada-imenu.el b/packages/ada-mode/ada-imenu.el index 459aa12d6..f5af9e177 100644 --- a/packages/ada-mode/ada-imenu.el +++ b/packages/ada-mode/ada-imenu.el @@ -1,6 +1,6 @@ -;;; ada-imenu.el - Ada mode interface to imenu for Ada Mode +;;; ada-imenu.el - Ada mode interface to imenu for Ada Mode -*- lexical-binding:t -*- -;; Copyright (C) 2012, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc. ;; ;; Author: Simon Wright ;; Contributors: see ada-mode.el, and specifically Christian Egli @@ -70,7 +70,7 @@ each type of entity that can be found in an Ada file.") ) ;; ada--imenu-mode does not depend on file local variables -(add-hook 'ada-mode-hook 'ada--imenu-mode) +(add-hook 'ada-mode-hook #'ada--imenu-mode) (provide 'ada-imenu) diff --git a/packages/ada-mode/ada-indent-user-options.el b/packages/ada-mode/ada-indent-user-options.el index fabe076d4..78e1854e9 100644 --- a/packages/ada-mode/ada-indent-user-options.el +++ b/packages/ada-mode/ada-indent-user-options.el @@ -1,6 +1,6 @@ -;;; user options shared by Ada mode indentation engines +;;; user options shared by Ada mode indentation engines -*- lexical-binding:t -*- ;; -;; Copyright (C) 2012, 2013 Free Software Foundation, Inc. +;; Copyright (C) 2012, 2013, 2015 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; Contributors: Simon Wright @@ -36,8 +36,7 @@ procedure Foo is begin >>>null;" :type 'integer - :group 'ada-indentation - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent) (defvar ada-broken-indent nil) @@ -58,16 +57,14 @@ Example : My_Var : My_Type := >>(Field1 => Value);" :type 'integer - :group 'ada-indentation - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-broken) (defcustom ada-indent-comment-col-0 nil "If non-nil, comments currently starting in column 0 are left in column 0. Otherwise, they are indented with previous comments or code." :type 'boolean - :group 'ada-indentation - :safe 'booleanp) + :safe #'booleanp) (make-variable-buffer-local 'ada-indent-comment-col-0) (defvar ada-label-indent nil) @@ -95,8 +92,7 @@ Example : <> <<<>>record" :type 'integer - :group 'ada-indent - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-record-rel-type) (defcustom ada-indent-renames 2 @@ -136,8 +131,7 @@ Examples: return C >>>>>>>>>>>renames Foo;" :type 'integer - :group 'ada-indent - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-renames) (defcustom ada-indent-return 0 @@ -155,8 +149,7 @@ An example is: function A (B : Integer) >>>>>>>>>>>return C;" :type 'integer - :group 'ada-indent - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-return) (defvar ada-use-indent nil) @@ -177,8 +170,7 @@ An example is: use Ada.Text_IO, >>Ada.Numerics;" :type 'integer - :group 'ada - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-use) (defvar ada-when-indent nil) @@ -199,8 +191,7 @@ An example is: case A is >>>when B =>" :type 'integer - :group 'ada-indent - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-when) (defvar ada-with-indent nil) @@ -221,8 +212,7 @@ An example is: with Ada.Text_IO, >>Ada.Numerics;" :type 'integer - :group 'ada - :safe 'integerp) + :safe #'integerp) (make-variable-buffer-local 'ada-indent-with) (provide 'ada-indent-user-options) diff --git a/packages/ada-mode/ada-mode-compat-23.4.el b/packages/ada-mode/ada-mode-compat-23.4.el deleted file mode 100644 index 8f7879735..000000000 --- a/packages/ada-mode/ada-mode-compat-23.4.el +++ /dev/null @@ -1,41 +0,0 @@ -;;; ada-mode-compat-23.4.el --- Implement current Emacs features not present in Emacs 23.4 - -;; Copyright (C) 2013 Free Software Foundation, Inc. - -;; This file is part of GNU Emacs. - -;; GNU Emacs is free software: you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation, either version 3 of the License, or -;; (at your option) any later version. - -;; GNU Emacs is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs. If not, see . - -(defvar compilation-filter-start (make-marker) - "") - -(defun compilation-filter-start (proc) - "" - (set-marker compilation-filter-start (point-max))) - -(defun compilation--put-prop (matchnum prop val) - (when (and (integerp matchnum) (match-beginning matchnum)) - (put-text-property - (match-beginning matchnum) (match-end matchnum) - prop val))) - -;; FIXME: emacs 24.x manages compilation-filter-start, emacs 23.4 does not -;; -;; gnat-core.el gnat-prj-parse-emacs-final needs: -;; (add-hook 'compilation-start-hook 'ada-gnat-compilation-start)) -;; -;; ada-gnat.el ada-gnat-compilation-filter needs: -;; (set-marker compilation-filter-start (point))) - -;; end of file diff --git a/packages/ada-mode/ada-mode-compat-24.2.el b/packages/ada-mode/ada-mode-compat-24.2.el index aa152db4e..2338ff65c 100644 --- a/packages/ada-mode/ada-mode-compat-24.2.el +++ b/packages/ada-mode/ada-mode-compat-24.2.el @@ -1,6 +1,6 @@ -;;; ada-mode-compat-24.2.el --- Implement current Emacs features not present in Emacs 24.2 +;;; ada-mode-compat-24.2.el --- Implement current Emacs features not present in Emacs 24.2 -*- lexical-binding:t -*- -;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2015 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. diff --git a/packages/ada-mode/ada-mode.el b/packages/ada-mode/ada-mode.el index fc3552efd..9e0bdfcc6 100644 --- a/packages/ada-mode/ada-mode.el +++ b/packages/ada-mode/ada-mode.el @@ -1,6 +1,6 @@ -;;; ada-mode.el --- major-mode for editing Ada sources +;;; ada-mode.el --- major-mode for editing Ada sources -*- lexical-binding:t -*- ;; -;;; Copyright (C) 1994, 1995, 1997 - 2015 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1997 - 2015 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; Maintainer: Stephen Leake @@ -196,8 +196,7 @@ Non-nil means automatically change case of preceding word while typing. Casing of Ada keywords is done according to `ada-case-keyword', identifiers are Mixed_Case." :type 'boolean - :group 'ada - :safe 'booleanp) + :safe #'booleanp) (make-variable-buffer-local 'ada-auto-case) (defcustom ada-case-exception-file nil @@ -215,8 +214,8 @@ character, and end either at the end of the word or at a _ character. Characters after the first word are ignored, and not preserved when the list is written back to the file." :type '(repeat (file)) - :group 'ada - :safe 'listp) + ;; :safe #'listp ;FIXME: is '("~/.emacs" "~/.bashrc" "/etc/passwd") safe? + ) (defcustom ada-case-keyword 'downcase-word "Buffer-local value that may override project variable `case_keyword'. @@ -224,8 +223,8 @@ Global value is default for project variable `case_keyword'. Function to call to adjust the case of Ada keywords." :type '(choice (const downcase-word) (const upcase-word)) - :group 'ada - :safe 'functionp) + ;; :safe #'functionp ; FIXME: `functionp' CANNOT be safe! + ) (make-variable-buffer-local 'ada-case-keyword) (defcustom ada-case-identifier 'ada-mixed-case @@ -239,8 +238,8 @@ force-case - if t, treat `ada-strict-case' as t" :type '(choice (const ada-mixed-case) (const ada-lower-case) (const ada-upper-case)) - :group 'ada - :safe 'functionp) + ;; :safe #'functionp ; FIXME: `functionp' CANNOT be safe! + ) ;; we'd like to check that there are 3 args, since the previous ;; release required 2 here. But there doesn't seem to be a way to ;; access the arg count, which is only available for byte-compiled @@ -253,8 +252,7 @@ Global value is default for project variable `case_strict'. If non-nil, force Mixed_Case for identifiers. Otherwise, allow UPPERCASE for identifiers." :type 'boolean - :group 'ada - :safe 'booleanp) + :safe #'booleanp) (make-variable-buffer-local 'ada-case-strict) (defcustom ada-language-version 'ada2012 @@ -265,36 +263,29 @@ indentation parser accepts." (const ada95) (const ada2005) (const ada2012)) - :group 'ada - :safe 'symbolp) + :safe #'symbolp) (make-variable-buffer-local 'ada-language-version) (defcustom ada-fill-comment-prefix "-- " "Comment fill prefix." - :type 'string - :group 'ada) -(make-variable-buffer-local 'ada-language-version) + :type 'string) (defcustom ada-fill-comment-postfix " --" "Comment fill postfix." - :type 'string - :group 'ada) -(make-variable-buffer-local 'ada-language-version) + :type 'string) (defcustom ada-prj-file-extensions '("adp" "prj") "List of Emacs Ada mode project file extensions. Used when searching for a project file. Any file with one of these extensions will be parsed by `ada-prj-parse-file-1'." - :type 'list - :group 'ada) + :type 'list) (defcustom ada-prj-file-ext-extra nil "List of secondary project file extensions. Used when searching for a project file that can be a primary or secondary project file (referenced from a primary). The user must provide a parser for a file with one of these extensions." - :type 'list - :group 'ada) + :type 'list) ;;;;; end of user variables @@ -468,7 +459,7 @@ Values defined by cross reference packages.") ["Other File" ada-find-other-file t] ["Other file don't find decl" ada-find-other-file-noset t])) -(defun ada-popup-menu (position) +(defun ada-popup-menu (_position) "Pops up a `ada-context-menu', with `ada-context-menu-on-identifer' set appropriately. POSITION is the location the mouse was clicked on. Sets `ada-context-menu-last-point' to the current position before @@ -994,6 +985,8 @@ replacing current values of `ada-case-full-exceptions', `ada-case-partial-except (push (cons word t) exceptions)) exceptions) +(defvar ada-prj-current-file) + (defun ada-case-create-exception (&optional word file-name partial) "Define WORD as an exception for the casing system, save it in FILE-NAME. If PARTIAL is non-nil, create a partial word exception. WORD @@ -1083,10 +1076,10 @@ User is prompted to choose a file from project variable casing if it is a list." (point)))) (member (downcase word) ada-keywords))) -(defun ada-lower-case (start end force-case-strict) +(defun ada-lower-case (start end _force-case-strict) (downcase-region start end)) -(defun ada-upper-case (start end force-case-strict) +(defun ada-upper-case (start end _force-case-strict) (upcase-region start end)) (defun ada-mixed-case (start end force-case-strict) @@ -1997,7 +1990,7 @@ don't move to corresponding declaration." (interactive "P") (ada-find-other-file other-window t)) -(defun ada-find-other-file (other-window &optional no-set-point) +(defun ada-find-other-file (other-window &optional _no-set-point) "Move to the corresponding declaration in another file. - If region is active, assume it contains a package name; @@ -2076,36 +2069,34 @@ identifier. May be an Ada identifier or operator." (when (ada-in-comment-p) (error "Inside comment")) - (let (identifier) + (skip-chars-backward "a-zA-Z0-9_<>=+\\-\\*/&") - (skip-chars-backward "a-zA-Z0-9_<>=+\\-\\*/&") - - ;; Just in front of, or inside, a string => we could have an - ;; operator function declaration. + ;; Just in front of, or inside, a string => we could have an + ;; operator function declaration. + (cond + ((ada-in-string-p) (cond - ((ada-in-string-p) - (cond - ((and (= (char-before) ?\") - (progn - (forward-char -1) - (looking-at (concat "\"\\(" ada-operator-re "\\)\"")))) - (setq identifier (concat "\"" (match-string-no-properties 1) "\""))) + ((and (= (char-before) ?\") + (progn + (forward-char -1) + (looking-at (concat "\"\\(" ada-operator-re "\\)\"")))) + (concat "\"" (match-string-no-properties 1) "\"")) - (t - (error "Inside string or character constant")) - )) + (t + (error "Inside string or character constant")) + )) - ((and (= (char-after) ?\") - (looking-at (concat "\"\\(" ada-operator-re "\\)\""))) - (setq identifier (concat "\"" (match-string-no-properties 1) "\""))) + ((and (= (char-after) ?\") + (looking-at (concat "\"\\(" ada-operator-re "\\)\""))) + (concat "\"" (match-string-no-properties 1) "\"")) - ((looking-at "[a-zA-Z0-9_]+\\|[+\\-*/&=<>]") - (setq identifier (match-string-no-properties 0))) + ((looking-at "[a-zA-Z0-9_]+\\|[+\\-*/&=<>]") + (match-string-no-properties 0)) - (t - (error "No identifier around")) - ))) + (t + (error "No identifier around")) + )) ;; FIXME: use find-tag-marker-ring, ring-insert, pop-tag-mark (see xref.el) (defvar ada-goto-pos-ring '() diff --git a/packages/ada-mode/ada-prj.el b/packages/ada-mode/ada-prj.el index c05afbf6f..819c970ec 100644 --- a/packages/ada-mode/ada-prj.el +++ b/packages/ada-mode/ada-prj.el @@ -1,4 +1,4 @@ -;; dummy file to hide obsolete bundled version +;;; ada-prj.el --- Dummy file to hide obsolete bundled version -*- lexical-binding:t -*- (require 'ada-mode) (provide 'ada-prj) (message "'ada-prj' is obsolete; use 'ada-mode' instead") diff --git a/packages/ada-mode/ada-ref-man.el b/packages/ada-mode/ada-ref-man.el index 53f60c743..d481411d4 100755 --- a/packages/ada-mode/ada-ref-man.el +++ b/packages/ada-mode/ada-ref-man.el @@ -1,6 +1,6 @@ -;;; ada-ref-man.el --- Ada Reference Manual 2012 +;;; ada-ref-man.el --- Ada Reference Manual 2012 -*- lexical-binding:t -*- ;; -;;; Copyright (C) 2014 Free Software Foundation, Inc. +;; Copyright (C) 2014-2015 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; Maintainer: Stephen Leake diff --git a/packages/ada-mode/ada-skel.el b/packages/ada-mode/ada-skel.el index e6c543040..d8b6a68b0 100644 --- a/packages/ada-mode/ada-skel.el +++ b/packages/ada-mode/ada-skel.el @@ -1,4 +1,4 @@ -;;; ada-skel.el --- an extension to Ada mode for inserting statement skeletons +;;; ada-skel.el --- Extension to Ada mode for inserting statement skeletons -*- lexical-binding:t -*- ;; Copyright (C) 1987, 1993, 1994, 1996-2015 Free Software Foundation, Inc. @@ -74,11 +74,11 @@ -- This text was inserted by ada-skel-initial-string; -- M-x customize-variable ada-skel-initial-string -- (info \"(ada-mode)Statement skeletons\")" - "*String to insert in empty buffer. + "String to insert in empty buffer. This could end in a token recognized by `ada-skel-expand'." :type 'string :group 'ada - :safe 'stringp) + :safe #'stringp) (define-skeleton ada-skel-user-restricted "Example copyright/license skeleton, with automatic year and owner." diff --git a/packages/ada-mode/ada-stmt.el b/packages/ada-mode/ada-stmt.el index 163c1de4f..3f5ed2403 100644 --- a/packages/ada-mode/ada-stmt.el +++ b/packages/ada-mode/ada-stmt.el @@ -1,4 +1,4 @@ -;; dummy file to hide obsolete bundled version +;;; ada-stmt.el --- Dummy file to hide obsolete bundled version -*- lexical-binding:t -*- (require 'ada-mode) (provide 'ada-stmt) (message "'ada-stmt' is obsolete; use 'ada-mode' instead") diff --git a/packages/ada-mode/ada-wisi-opentoken.el b/packages/ada-mode/ada-wisi-opentoken.el index 7b7ad0b44..cd869813c 100644 --- a/packages/ada-mode/ada-wisi-opentoken.el +++ b/packages/ada-mode/ada-wisi-opentoken.el @@ -1,7 +1,7 @@ -;;; ada-wisi-opentoken.el --- An indentation function for ada-wisi that indents OpenToken +;;; ada-wisi-opentoken.el --- An indentation function for ada-wisi that indents OpenToken -*- lexical-binding:t -*- ;; grammar statements nicely. -;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; This file is part of GNU Emacs. diff --git a/packages/ada-mode/ada-wisi.el b/packages/ada-mode/ada-wisi.el index 7bb3bd9e5..6d53739cd 100644 --- a/packages/ada-mode/ada-wisi.el +++ b/packages/ada-mode/ada-wisi.el @@ -1,4 +1,4 @@ -;;; An indentation engine for Ada mode, using the wisi generalized LALR parser +;;; ada-wisi.el --- Indentation engine for Ada mode, using the wisi generalized LALR parser -*- lexical-binding:t -*- ;; ;; [1] ISO/IEC 8652:2012(E); Ada 2012 reference manual ;; diff --git a/packages/ada-mode/ada-xref.el b/packages/ada-mode/ada-xref.el index be8edc2cd..e58cba867 100644 --- a/packages/ada-mode/ada-xref.el +++ b/packages/ada-mode/ada-xref.el @@ -1,4 +1,4 @@ -;; dummy file to hide obsolete bundled version +;;; ada-xref.el --- Dummy file to hide obsolete bundled version -*- lexical-binding:t -*- (require 'ada-mode) (provide 'ada-xref) (message "'ada-xref' is obsolete; use 'ada-mode' instead") diff --git a/packages/ada-mode/gnat-core.el b/packages/ada-mode/gnat-core.el index 72d2d48e9..ff62610ae 100644 --- a/packages/ada-mode/gnat-core.el +++ b/packages/ada-mode/gnat-core.el @@ -1,4 +1,4 @@ -;; Support for running GNAT tools, which support multiple programming +;; gnat-core.el --- Support for running GNAT tools, which support multiple programming -*- lexical-binding:t -*- ;; languages. ;; ;; GNAT is provided by AdaCore; see http://libre.adacore.com/ @@ -396,9 +396,8 @@ list." (defun ada-gnat-ada-name-from-file-name (file-name) "For `ada-ada-name-from-file-name'." - (let* (status - (ada-name (file-name-sans-extension (file-name-nondirectory file-name))) - (predefined (cdr (assoc ada-name ada-gnat-predefined-package-alist)))) + (let* ((ada-name (file-name-sans-extension (file-name-nondirectory file-name))) + (predefined (cdr (assoc ada-name ada-gnat-predefined-package-alist)))) (if predefined predefined diff --git a/packages/ada-mode/gnat-inspect.el b/packages/ada-mode/gnat-inspect.el index eb1c48845..b7b839bd6 100644 --- a/packages/ada-mode/gnat-inspect.el +++ b/packages/ada-mode/gnat-inspect.el @@ -1,10 +1,9 @@ -;;; gnat-inspect.el --- minor-mode for navigating sources using the -;;; AdaCore cross reference tool gnatinspect. -;;; -;;; gnatinspect supports Ada and any gcc language that supports the -;;; -fdump-xref switch (which includes C, C++). +;;; gnat-inspect.el --- Minor-mode for navigating sources using gnatinspect -*- lexical-binding:t -*- + +;; gnatinspect supports Ada and any gcc language that supports the +;; -fdump-xref switch (which includes C, C++). ;; -;;; Copyright (C) 2013-2015 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; Author: Stephen Leake ;; Maintainer: Stephen Leake diff --git a/packages/ada-mode/gpr-grammar-wy.el b/packages/ada-mode/gpr-grammar-wy.el index 70cf8605c..34c355317 100644 --- a/packages/ada-mode/gpr-grammar-wy.el +++ b/packages/ada-mode/gpr-grammar-wy.el @@ -1,6 +1,6 @@ -;;; gpr-grammar-wy.el --- Generated parser support file +;;; gpr-grammar-wy.el --- Generated parser support file -*- lexical-binding:t -*- -;; Copyright (C) 2013 Free Software Foundation, Inc. +;; Copyright (C) 2013, 2015 Free Software Foundation, Inc. ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as diff --git a/packages/ada-mode/gpr-mode.el b/packages/ada-mode/gpr-mode.el index 2eb7011b5..8e64eb79a 100644 --- a/packages/ada-mode/gpr-mode.el +++ b/packages/ada-mode/gpr-mode.el @@ -1,6 +1,6 @@ -;;; gpr-mode --- major-mode for editing GNAT project files +;;; gpr-mode.el --- Major-mode for editing GNAT project files -*- lexical-binding:t -*- -;; Copyright (C) 2004, 2007, 2008, 2012-2014 Free Software Foundation, Inc. +;; Copyright (C) 2004, 2007, 2008, 2012-2015 Free Software Foundation, Inc. ;; Author: Stephen Leake ;; Maintainer: Stephen Leake diff --git a/packages/ada-mode/gpr-query.el b/packages/ada-mode/gpr-query.el index 7fa91bdcd..014d3c6fb 100644 --- a/packages/ada-mode/gpr-query.el +++ b/packages/ada-mode/gpr-query.el @@ -1,10 +1,9 @@ -;;; gpr-query.el --- minor-mode for navigating sources using the -;;; custom gpr_query tool. -;;; -;;; gpr-query supports Ada and any gcc language that supports the -;;; AdaCore -fdump-xref switch (which includes C, C++). +;;; gpr-query.el --- Minor-mode for navigating sources using gpr_query -*- lexical-binding:t -*- ;; -;;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc. +;; gpr-query supports Ada and any gcc language that supports the +;; AdaCore -fdump-xref switch (which includes C, C++). +;; +;; Copyright (C) 2013 - 2015 Free Software Foundation, Inc. ;; Author: Stephen Leake ;; Maintainer: Stephen Leake diff --git a/packages/ada-mode/gpr-skel.el b/packages/ada-mode/gpr-skel.el index 9990f0944..08a8d6d10 100644 --- a/packages/ada-mode/gpr-skel.el +++ b/packages/ada-mode/gpr-skel.el @@ -1,6 +1,6 @@ -;;; gpr-skel.el --- an extension to Gpr mode for inserting statement skeletons +;;; gpr-skel.el --- an extension to Gpr mode for inserting statement skeletons -*- lexical-binding:t -*- -;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; Authors: Stephen Leake @@ -42,11 +42,11 @@ ;;;;; user variables, example skeletons intended to be overwritten (defcustom gpr-skel-initial-string "{header}\n{project}" - "*String to insert in empty buffer. + "String to insert in empty buffer. This could end in a token recognized by `gpr-skel-expand'." :type 'string - :group 'gpr - :safe 'stringp) + :group 'gpr ;FIXME: Unknown! + :safe #'stringp) (define-skeleton gpr-skel-user-restricted "Example copyright/license skeleton, with automatic year and owner." @@ -264,8 +264,8 @@ it is a name, and use the word before that as the token." (provide 'gpr-skeletons) (provide 'gpr-skel) -(setq gpr-expand 'skeleton-expand) +(setq gpr-expand #'skeleton-expand) -(add-hook 'gpr-mode-hook 'gpr-skel-setup) +(add-hook 'gpr-mode-hook #'gpr-skel-setup) ;;; end of file diff --git a/packages/ada-mode/gpr-wisi.el b/packages/ada-mode/gpr-wisi.el index 2883e5210..67c625fd2 100644 --- a/packages/ada-mode/gpr-wisi.el +++ b/packages/ada-mode/gpr-wisi.el @@ -1,8 +1,8 @@ -;;; An indentation engine for gpr mode, using the wisent LALR parser +;;; gpr-wisi.el --- An indentation engine for gpr mode, using the wisent LALR parser -*- lexical-binding:t -*- ;; ;; [1] GNAT user guide (info "gnat_ugn") ;; -;; Copyright (C) 2013, 2014 Free Software Foundation, Inc. +;; Copyright (C) 2013-2015 Free Software Foundation, Inc. ;; ;; Author: Stephen Leake ;; -- 2.39.2