mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 05:52:32 -08:00
Mark some risky prolog variables.
* lisp/progmodes/prolog.el (prolog-system-version) (prolog-keywords, prolog-types, prolog-mode-specificators) (prolog-determinism-specificators, prolog-directives) (prolog-program-name, prolog-program-switches) (prolog-consult-string, prolog-compile-string) (prolog-eof-string, prolog-prompt-regexp, prolog-help-function): Mark anything processed by prolog-find-value-by-system as risky.
This commit is contained in:
parent
c51943d71d
commit
59e39ccf2a
1 changed files with 31 additions and 12 deletions
|
|
@ -367,6 +367,7 @@ The version numbers are of the format (Major . Minor)."
|
|||
:type '(repeat (list (symbol :tag "System")
|
||||
(cons :tag "Version numbers" (integer :tag "Major")
|
||||
(integer :tag "Minor"))))
|
||||
:risky t
|
||||
:group 'prolog)
|
||||
|
||||
;; Indentation
|
||||
|
|
@ -440,7 +441,8 @@ Legal values:
|
|||
"Alist of Prolog keywords which is used for font locking of directives."
|
||||
:version "24.1"
|
||||
:group 'prolog-font-lock
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defcustom prolog-types
|
||||
'((mercury
|
||||
|
|
@ -449,7 +451,8 @@ Legal values:
|
|||
"Alist of Prolog types used by font locking."
|
||||
:version "24.1"
|
||||
:group 'prolog-font-lock
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defcustom prolog-mode-specificators
|
||||
'((mercury
|
||||
|
|
@ -458,7 +461,8 @@ Legal values:
|
|||
"Alist of Prolog mode specificators used by font locking."
|
||||
:version "24.1"
|
||||
:group 'prolog-font-lock
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defcustom prolog-determinism-specificators
|
||||
'((mercury
|
||||
|
|
@ -468,7 +472,8 @@ Legal values:
|
|||
"Alist of Prolog determinism specificators used by font locking."
|
||||
:version "24.1"
|
||||
:group 'prolog-font-lock
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defcustom prolog-directives
|
||||
'((mercury
|
||||
|
|
@ -477,7 +482,8 @@ Legal values:
|
|||
"Alist of Prolog source code directives used by font locking."
|
||||
:version "24.1"
|
||||
:group 'prolog-font-lock
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
|
||||
;; Keyboard
|
||||
|
|
@ -563,7 +569,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
|
|||
(or (car names) "prolog"))))
|
||||
"Alist of program names for invoking an inferior Prolog with `run-prolog'."
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
(defun prolog-program-name ()
|
||||
(prolog-find-value-by-system prolog-program-name))
|
||||
|
||||
|
|
@ -573,7 +580,8 @@ the first column (i.e., DCG heads) inserts ` -->' and newline."
|
|||
"Alist of switches given to inferior Prolog run with `run-prolog'."
|
||||
:version "24.1"
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
(defun prolog-program-switches ()
|
||||
(prolog-find-value-by-system prolog-program-switches))
|
||||
|
||||
|
|
@ -596,7 +604,9 @@ Some parts of the string are replaced:
|
|||
region of a buffer, in which case it is the number of lines before
|
||||
the region."
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defun prolog-consult-string ()
|
||||
(prolog-find-value-by-system prolog-consult-string))
|
||||
|
||||
|
|
@ -621,7 +631,9 @@ Some parts of the string are replaced:
|
|||
If `prolog-program-name' is non-nil, it is a string sent to a Prolog process.
|
||||
If `prolog-program-name' is nil, it is an argument to the `compile' function."
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defun prolog-compile-string ()
|
||||
(prolog-find-value-by-system prolog-compile-string))
|
||||
|
||||
|
|
@ -629,7 +641,8 @@ If `prolog-program-name' is nil, it is an argument to the `compile' function."
|
|||
"Alist of strings that represent end of file for prolog.
|
||||
nil means send actual operating system end of file."
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defcustom prolog-prompt-regexp
|
||||
'((eclipse "^[a-zA-Z0-9()]* *\\?- \\|^\\[[a-zA-Z]* [0-9]*\\]:")
|
||||
|
|
@ -640,7 +653,9 @@ nil means send actual operating system end of file."
|
|||
"Alist of prompts of the prolog system command line."
|
||||
:version "24.1"
|
||||
:group 'prolog-inferior
|
||||
:type 'sexp)
|
||||
:type 'sexp
|
||||
:risky t)
|
||||
|
||||
(defun prolog-prompt-regexp ()
|
||||
(prolog-find-value-by-system prolog-prompt-regexp))
|
||||
|
||||
|
|
@ -649,7 +664,8 @@ nil means send actual operating system end of file."
|
|||
;; (t "^|: +"))
|
||||
;; "Alist of regexps matching the prompt when consulting `user'."
|
||||
;; :group 'prolog-inferior
|
||||
;; :type 'sexp)
|
||||
;; :type 'sexp
|
||||
;; :risky t)
|
||||
|
||||
(defcustom prolog-debug-on-string "debug.\n"
|
||||
"Predicate for enabling debug mode."
|
||||
|
|
@ -1020,6 +1036,8 @@ VERSION is of the format (Major . Minor)"
|
|||
|
||||
(define-abbrev-table 'prolog-mode-abbrev-table ())
|
||||
|
||||
;; Becauses this can `eval' its arguments, any variable that gets
|
||||
;; processed by it should be marked as :risky.
|
||||
(defun prolog-find-value-by-system (alist)
|
||||
"Get value from ALIST according to `prolog-system'."
|
||||
(let ((system (or prolog-system
|
||||
|
|
@ -2341,6 +2359,7 @@ In effect it sets the `fill-prefix' when inside comments and then calls
|
|||
(swi prolog-help-online)
|
||||
(t prolog-help-online))
|
||||
"Alist for the name of the function for finding help on a predicate.")
|
||||
(put 'prolog-help-function 'risky-local-variable t)
|
||||
|
||||
(defun prolog-help-on-predicate ()
|
||||
"Invoke online help on the atom under cursor."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue