aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/local-vars-list.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/local-vars-list.el')
-rw-r--r--lib/local-vars-list.el37
1 files changed, 22 insertions, 15 deletions
diff --git a/lib/local-vars-list.el b/lib/local-vars-list.el
index 3fa0103d..4d737d73 100644
--- a/lib/local-vars-list.el
+++ b/lib/local-vars-list.el
@@ -1,10 +1,16 @@
;;; local-vars.el --- local variables list utilities
-;;
-;; Copyright (C) 2006 Pierre Courtieu
+
+;; This file is part of Proof General.
+
+;; Portions © Copyright 1994-2012 David Aspinall and University of Edinburgh
+;; Portions © Copyright 2003, 2012, 2014 Free Software Foundation, Inc.
+;; Portions © Copyright 2001-2017 Pierre Courtieu
+;; Portions © Copyright 2010, 2016 Erik Martin-Dorel
+;; Portions © Copyright 2011-2013, 2016-2017 Hendrik Tews
+;; Portions © Copyright 2015-2017 Clément Pit-Claudel
+
;; Authors: Pierre Courtieu
;; Maintainer: Pierre Courtieu <Pierre.Courtieu@cnam.fr>
-;;
-;; $Id$
;; This software is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public
@@ -18,21 +24,19 @@
;; (enclosed in the file GPL).
;;; Commentary:
+;;
;; See documentation in variable local-var-list-doc
-
-;;; TODO: Rely on hack-file-local-variables instead
-
-;;; History:
;;
+;; TODO: Rely on hack-file-local-variables instead
-;;; Help:
+;;; Code:
(defconst local-vars-list-doc nil
"From Emacs Info:
-A file can contain a \"local variables list\", which specifies the values to use for
-certain Emacs variables when that file is edited. See info node \"(emacs)File
-Variables\".
+A file can contain a \"local variables list\", which specifies the values to use
+for certain Emacs variables when that file is edited.
+See info node \"(emacs)File Variables\".
local-vars-list provides two useful functions:
@@ -107,7 +111,7 @@ variable definition (or at the \"End:\" line)."
(read (buffer-substring boexp (point))))))) ; TODO: catch errors here?
-;; Only looks for file local vars. Not dir local vars.
+;; Only looks for file local vars. Not dir local vars.
(defun local-vars-list-get (symb)
"Return the value written in the local variable list for variable symb.
Raises an error if symb is not in the list.
@@ -118,14 +122,14 @@ alist. Proceed by looking in the file instead."
(save-excursion
(let*
((lrpat (local-vars-list-find))
- (dummy (if lrpat t (error "local variables zone not found. ")))
+ (dummy (if lrpat t (error "Local variables zone not found")))
(lpat (car lrpat))
(rpat (car (cdr lrpat)))
)
(beginning-of-line)
(if (local-vars-list-goto-var symb lpat rpat)
t
- (error "variable %s not found" symb))
+ (error "Variable %s not found" symb))
(beginning-of-line)
(local-vars-list-get-current lpat rpat))))
@@ -150,3 +154,6 @@ of the buffer first."
;;; fill-column: 85 ***
;;; indent-tabs-mode: nil ***
;;; End: ***
+
+(provide 'local-vars-list)
+;;; local-vars-list.el ends here