]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/simula.el
Merge from emacs-24; up to 2012-12-13T09:45:54Z!lekktu@gmail.com
[gnu-emacs] / lisp / progmodes / simula.el
index 9deed398ea9af0b7fa99cf416dbc21116096107a..d71c9adbef4d65b082dd23f85d5c7d6a3576169c 100644 (file)
@@ -1,7 +1,7 @@
 ;;; simula.el --- SIMULA 87 code editing commands for Emacs
 
-;; Copyright (C) 1992, 1994, 1996, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009, 2010, 2011  Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2001-2013 Free Software Foundation,
+;; Inc.
 
 ;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
 ;; Maintainer: simula-mode@ifi.uio.no
@@ -49,7 +49,7 @@ Otherwise TAB indents only when point is within
 the run of whitespace at the beginning of the line.")
 
 (defcustom simula-tab-always-indent simula-tab-always-indent-default
-  "*Non-nil means TAB in SIMULA mode should always reindent the current line.
+  "Non-nil means TAB in SIMULA mode should always reindent the current line.
 Otherwise TAB indents only when point is within
 the run of whitespace at the beginning of the line."
   :type 'boolean
@@ -59,7 +59,7 @@ the run of whitespace at the beginning of the line."
   "Indentation of SIMULA statements with respect to containing block.")
 
 (defcustom simula-indent-level simula-indent-level-default
-  "*Indentation of SIMULA statements with respect to containing block."
+  "Indentation of SIMULA statements with respect to containing block."
   :type 'integer
   :group 'simula)
 
@@ -68,7 +68,7 @@ the run of whitespace at the beginning of the line."
   "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE.")
 
 (defcustom simula-substatement-offset simula-substatement-offset-default
-  "*Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE."
+  "Extra indentation after DO, THEN, ELSE, WHEN and OTHERWISE."
   :type 'integer
   :group 'simula)
 
@@ -80,7 +80,7 @@ the previous line of the statement.")
 
 (defcustom simula-continued-statement-offset
   simula-continued-statement-offset-default
-  "*Extra indentation for lines not starting a statement or substatement.
+  "Extra indentation for lines not starting a statement or substatement.
 If value is a list, each line in a multipleline continued statement
 will have the car of the list extra indentation with respect to
 the previous line of the statement."
@@ -91,7 +91,7 @@ the previous line of the statement."
   "Offset of SIMULA label lines relative to usual indentation.")
 
 (defcustom simula-label-offset simula-label-offset-default
-  "*Offset of SIMULA label lines relative to usual indentation."
+  "Offset of SIMULA label lines relative to usual indentation."
   :type 'integer
   :group 'simula)
 
@@ -101,7 +101,7 @@ Value is a cons cell, the car is extra THEN indentation and the cdr
 extra ELSE indentation.  IF after ELSE is indented as the starting IF.")
 
 (defcustom simula-if-indent simula-if-indent-default
-  "*Extra indentation of THEN and ELSE with respect to the starting IF.
+  "Extra indentation of THEN and ELSE with respect to the starting IF.
 Value is a cons cell, the car is extra THEN indentation and the cdr
 extra ELSE indentation.  IF after ELSE is indented as the starting IF."
   :type '(cons integer integer)
@@ -113,7 +113,7 @@ Value is a cons cell, the car is extra WHEN indentation
 and the cdr extra OTHERWISE indentation.")
 
 (defcustom simula-inspect-indent simula-inspect-indent-default
-  "*Extra indentation of WHEN and OTHERWISE with respect to the INSPECT.
+  "Extra indentation of WHEN and OTHERWISE with respect to the INSPECT.
 Value is a cons cell, the car is extra WHEN indentation
 and the cdr extra OTHERWISE indentation."
   :type '(cons integer integer)
@@ -123,7 +123,7 @@ and the cdr extra OTHERWISE indentation."
   "Non-nil means `simula-indent-line' function may reindent previous line.")
 
 (defcustom simula-electric-indent simula-electric-indent-default
-  "*Non-nil means `simula-indent-line' function may reindent previous line."
+  "Non-nil means `simula-indent-line' function may reindent previous line."
   :type 'boolean
   :group 'simula)
 
@@ -133,7 +133,7 @@ Value is one of the symbols `upcase', `downcase', `capitalize',
 \(as in) `abbrev-table' or nil if they should not be changed.")
 
 (defcustom simula-abbrev-keyword simula-abbrev-keyword-default
-  "*Specify how to convert case for SIMULA keywords.
+  "Specify how to convert case for SIMULA keywords.
 Value is one of the symbols `upcase', `downcase', `capitalize',
 \(as in) `abbrev-table' or nil if they should not be changed."
   :type '(choice (const upcase) (const downcase) (const capitalize)(const nil))
@@ -145,7 +145,7 @@ Value is one of the symbols `upcase', `downcase', `capitalize',
 \(as in) `abbrev-table', or nil if they should not be changed.")
 
 (defcustom simula-abbrev-stdproc simula-abbrev-stdproc-default
-  "*Specify how to convert case for standard SIMULA procedure and class names.
+  "Specify how to convert case for standard SIMULA procedure and class names.
 Value is one of the symbols `upcase', `downcase', `capitalize',
 \(as in) `abbrev-table', or nil if they should not be changed."
   :type '(choice (const upcase) (const downcase) (const capitalize)
@@ -153,7 +153,7 @@ Value is one of the symbols `upcase', `downcase', `capitalize',
   :group 'simula)
 
 (defcustom simula-abbrev-file nil
-  "*File with extra abbrev definitions for use in SIMULA mode.
+  "File with extra abbrev definitions for use in SIMULA mode.
 These are used together with the standard abbrev definitions for SIMULA.
 Please note that the standard definitions are required
 for SIMULA mode to function correctly."
@@ -325,7 +325,7 @@ for SIMULA mode to function correctly."
   "Keymap used in `simula-mode'.")
 
 ;; menus for Lucid
-(defun simula-popup-menu (e)
+(defun simula-popup-menu (_e)
   "Pops up the SIMULA menu."
   (interactive "@e")
   (popup-menu (cons (concat mode-name " Mode Commands") simula-mode-menu)))
@@ -1203,9 +1203,8 @@ If COUNT is negative, move backward instead."
        ((eq simula-abbrev-keyword 'downcase) (downcase-word -1))
        ((eq simula-abbrev-keyword 'capitalize) (capitalize-word -1)))
       (let ((pos (- (point-max) (point)))
-           (case-fold-search t)
-           null)
-       (condition-case null
+           (case-fold-search t))
+       (condition-case nil
            (progn
              ;; check if the expanded word is on the beginning of the line.
              (if (and (eq (char-syntax (preceding-char)) ?w)
@@ -1245,8 +1244,9 @@ An optional second argument BOUND bounds the search, it is a buffer position.
 The match found must not extend after that position.  Optional third argument
 NOERROR, if t, means if fail just return nil (no error).
 If not nil and not t, move to limit of search and return nil."
-  (let (begin end context (comb-regexp (concat regexp "\\|\\<end\\>"))
-             match (start-point (point)))
+  (let ((comb-regexp (concat regexp "\\|\\<end\\>"))
+        (start-point (point))
+        context match)
     (catch 'simula-backward
       (while (re-search-backward comb-regexp bound 1)
        ;; We have a match, check SIMULA context at match-beginning
@@ -1307,8 +1307,9 @@ An optional second argument BOUND bounds the search, it is a buffer position.
 The match found must not extend after that position.  Optional third argument
 NOERROR, if t, means if fail just return nil (no error).
 If not nil and not t, move to limit of search and return nil."
-  (let (begin end context (comb-regexp (concat regexp "\\|\\<begin\\>"))
-             match (start-point (point)))
+  (let ((comb-regexp (concat regexp "\\|\\<begin\\>"))
+        (start-point (point))
+       context match)
     (catch 'simula-forward
       (while (re-search-forward comb-regexp bound 1)
        ;; We have a match, check SIMULA context at match-beginning