;;; simula.el --- SIMULA 87 code editing commands for Emacs
-;; Copyright (C) 1992, 1994, 1996, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1994, 1996, 2001-2014 Free Software Foundation,
+;; Inc.
;; Author: Hans Henrik Eriksen <hhe@ifi.uio.no>
;; Maintainer: simula-mode@ifi.uio.no
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
"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)
"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)
(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."
"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)
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)
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)
"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)
\(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))
\(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)
: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."
; it determines the flavor of the Emacs running
(defvar simula-mode-menu
- '(["Report Bug" simula-submit-bug-report t]
- ["Indent Line" simula-indent-line t]
+ '(["Indent Line" simula-indent-line t]
["Backward Statement" simula-previous-statement t]
["Forward Statement" simula-next-statement t]
["Backward Up Level" simula-backward-up-level t]
;; Emacs 19 defines menus in the mode map
(define-key map [menu-bar simula]
(cons "SIMULA" (make-sparse-keymap "SIMULA")))
- (define-key map [menu-bar simula bug-report]
- '("Submit Bug Report" . simula-submit-bug-report))
- (define-key map [menu-bar simula separator-indent]
- '("--"))
(define-key map [menu-bar simula indent-exp]
'("Indent Expression" . simula-indent-exp))
(define-key map [menu-bar simula indent-line]
"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)))
((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)
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
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
(defconst simula-mode-help-address "bug-gnu-emacs@gnu.org"
"Address accepting submission of `simula-mode' bug reports.")
-(defun simula-submit-bug-report ()
- "Submit via mail a bug report on `simula-mode'."
- (interactive)
- (and
- (y-or-n-p "Do you want to submit a report on simula-mode? ")
- (reporter-submit-bug-report
- simula-mode-help-address
- (concat "simula-mode from Emacs " emacs-version)
- (list
- ;; report only the vars that affect indentation
- 'simula-indent-level
- 'simula-substatement-offset
- 'simula-continued-statement-offset
- 'simula-label-offset
- 'simula-if-indent
- 'simula-inspect-indent
- 'simula-electric-indent
- 'simula-abbrev-keyword
- 'simula-abbrev-stdproc
- 'simula-abbrev-file
- 'simula-tab-always-indent
- ))))
+(make-obsolete-variable 'simula-mode-help-address 'report-emacs-bug-address
+ "24.4")
+
+(define-obsolete-function-alias 'simula-submit-bug-report
+ 'report-emacs-bug "24.4")
(provide 'simula)