diff options
| author | John Wiegley <johnw@newartisans.com> | 2016-02-03 23:56:08 -0800 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2016-02-03 23:56:08 -0800 |
| commit | 0608bf1c3d91196bcf06a6da96243f0fac119089 (patch) | |
| tree | d79a6c43cd10c681445b75f859545c9f88e41899 /lisp/progmodes/prolog.el | |
| parent | 91ab66201cedbcd2e4e8533a7152f6736ad08731 (diff) | |
| parent | ee7399792f865905d393df05c3d4e5ec309aa06c (diff) | |
| download | emacs-0608bf1c3d91196bcf06a6da96243f0fac119089.tar.gz | |
Merge from origin/emacs-25
ee73997 Make erc work better when encountering unknown prefix chars
b99141d Make erc completion case-insensitive again
66c4620 Make complection in erc use consistent casing
8c562b2 Make /QUIT in erc more robust
d93d2c5 Make tracking faces in Emacs work more reliably
af6ab7e Make shr not bug out on images on non-graphical displays
3311f40 Fix bookmark display widths
d90ab1e Fix typo in eww-make-unique-file-name
7f81825 Make it possible to TAB to input fields
a43a1dc Insert complete alt texts when images are disabled
56ed4e1 Allow eww text fields to grow
66b315c Make erc work when subword-mode is switched on
255b68f Fix IMAP doc example
91557f5 Quoting fixes in doc strings and diagnostics
2c0dc9f Fix warning message in hack-local-variables
504696d Etags: yet another improvement in Ruby tags
8784ebf Fix x-popup-menu on TTYs without a mouse
8b87ecb * lisp/emacs-lisp/map.el: Improvements to the docstring of the
pcase macro
6191003 Use pop-to-buffer-same-window in eww
fe321fd * autogen.sh: Revert all recent changes.
74ebd4a * make-dist: Updates related to nt/.
737193a * make-dist: Add modules/.
3696bf2 * make-dist: Update for super-special file that can't live in etc/.
a4278e2 Fix failure to compile ns-win.el in parallel builds
860da4d Fix names of tags generated for Ruby accessors
f6213ce Fix file-name recognition in 'etags'
e42e662 Change Ruby file names and extensions recognized by 'etags'
58bfb6a More improvements for Ruby support in 'etags'
c04e911 Add --git-config option to autogen.sh
5713466 Fix editing undo changes in eww fields
51362d6 Allow the user more control of popping up the eww window
ee0fbd8 Make eww-browse-url with new-window parameter work again
9c3142d Clean up eww code slightly
cb035f3 Don't insert nil faces in shr
4c3fae3 ; * lisp/progmodes/prolog.el: Remove some obsolete commentary.
93f2153 Improve the custom type of some user options.
9f60d7e Mark some risky calendar variables.
1d07dcd Highlight two additional SCSS keywords
ee8b466 Recommend enabling integrity-checking in git
e639e10 Some corrections in Elisp manual
d766ca8 Chatter when autogen.sh changes Git configuration
3b734e1 * org/org-compat.el (org-font-lock-ensure): Fix bogus test (bug#22399)
43cb9f8 Omit unnecessary history from Lisp intro
2fbd1da * etc/HISTORY: Add some more history, plus git tags.
c90e1b4 Improve elisp “Security Considerations” doc
cedd7ca autogen.sh now arranges for git to check hashes
86ce76b ; Fix ChangeLog.2 commit ID.
7b1d2b1 Fix (c & 040) typo in emergency escapes
a8273da Fix display of overlay strings with 'display' and 'box' property
fc48106 Fix imap-starttls-open
cdecbed Fix return value of imap-starttls-open
20c7e34 ; * etc/NEWS: Fix renamed command name
98bdbdb Correct reference to DARWIN_OS preprocessor symbol
b250d29 Spelling fix
b920a0e Spelling fixes
93b144b Pacify GCC on C library without glibc API
Diffstat (limited to 'lisp/progmodes/prolog.el')
| -rw-r--r-- | lisp/progmodes/prolog.el | 79 |
1 files changed, 36 insertions, 43 deletions
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index 3767dbaa1e8..9ee405b31e1 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -53,34 +53,16 @@ ;; all the bells and whistles one would expect, including syntax ;; highlighting and auto indentation. It can also send regions to an ;; inferior Prolog process. -;; -;; The code requires the comint, easymenu, info, imenu, and font-lock -;; libraries. These are normally distributed with GNU Emacs and -;; XEmacs. -;;; Installation: -;; -;; Insert the following lines in your init file: -;; -;; (setq load-path (cons "/usr/lib/xemacs/site-lisp" load-path)) -;; (autoload 'run-prolog "prolog" "Start a Prolog sub-process." t) -;; (autoload 'prolog-mode "prolog" "Major mode for editing Prolog programs." t) -;; (autoload 'mercury-mode "prolog" "Major mode for editing Mercury programs." t) +;; Some settings you may wish to use: + ;; (setq prolog-system 'swi) ; optional, the system you are using; ;; ; see `prolog-system' below for possible values -;; (setq auto-mode-alist (append '(("\\.pl$" . prolog-mode) -;; ("\\.m$" . mercury-mode)) +;; (setq auto-mode-alist (append '(("\\.pl\\'" . prolog-mode) +;; ("\\.m\\'" . mercury-mode)) ;; auto-mode-alist)) ;; -;; where the path in the first line is the file system path to this file. -;; MSDOS paths can be written like "d:/programs/emacs-19.34/site-lisp". -;; Note: In XEmacs, either `/usr/lib/xemacs/site-lisp' (RPM default in -;; Red Hat-based distributions) or `/usr/local/lib/xemacs/site-lisp' -;; (default when compiling from sources) are automatically added to -;; `load-path', so the first line is not necessary provided that you -;; put this file in the appropriate place. -;; -;; The last s-expression above makes sure that files ending with .pl +;; The last expression above makes sure that files ending with .pl ;; are assumed to be Prolog files and not Perl, which is the default ;; Emacs setting. If this is not wanted, remove this line. It is then ;; necessary to either @@ -98,8 +80,8 @@ ;; If the command to start the prolog process ('sicstus', 'pl' or ;; 'swipl' for SWI prolog, etc.) is not available in the default path, ;; then it is necessary to set the value of the environment variable -;; EPROLOG to a shell command to invoke the prolog process. In XEmacs -;; and Emacs 20+ you can also customize the variable +;; EPROLOG to a shell command to invoke the prolog process. +;; You can also customize the variable ;; `prolog-program-name' (in the group `prolog-inferior') and provide ;; a full path for your Prolog system (swi, scitus, etc.). ;; @@ -109,6 +91,7 @@ ;; to keep the GNU Emacs compatibility. So if you work under Emacs ;; and see something that does not work do drop me a line, as I have ;; a smaller chance to notice this kind of bugs otherwise. +; [The above comment dates from 2011.] ;; Changelog: @@ -272,9 +255,6 @@ ;; Version 0.1.35: ;; o Minor font-lock bug fixes. -;;; TODO: - -;; Replace ":type 'sexp" with more precise Custom types. ;;; Code: @@ -441,7 +421,12 @@ Legal values: "Alist of Prolog keywords which is used for font locking of directives." :version "24.1" :group 'prolog-font-lock - :type 'sexp + ;; Note that "(repeat string)" also allows "nil" (repeat-count 0). + ;; This gets processed by prolog-find-value-by-system, which + ;; allows both the car and the cdr to be a list to eval. + ;; Though the latter must have the form '(eval ...)'. + ;; Of course, none of this is documented... + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-types @@ -451,7 +436,7 @@ Legal values: "Alist of Prolog types used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-mode-specificators @@ -461,7 +446,7 @@ Legal values: "Alist of Prolog mode specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-determinism-specificators @@ -472,7 +457,7 @@ Legal values: "Alist of Prolog determinism specificators used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defcustom prolog-directives @@ -482,7 +467,7 @@ Legal values: "Alist of Prolog source code directives used by font locking." :version "24.1" :group 'prolog-font-lock - :type 'sexp + :type '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) @@ -569,7 +554,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 '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-program-name () (prolog-find-value-by-system prolog-program-name)) @@ -580,7 +566,7 @@ 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 '(repeat (list (choice symbol sexp) (choice (repeat string) sexp))) :risky t) (defun prolog-program-switches () (prolog-find-value-by-system prolog-program-switches)) @@ -604,7 +590,8 @@ 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 '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-consult-string () @@ -631,17 +618,21 @@ 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 '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-compile-string () (prolog-find-value-by-system prolog-compile-string)) (defcustom prolog-eof-string "end_of_file.\n" - "Alist of strings that represent end of file for prolog. -nil means send actual operating system end of file." + "String or alist of strings that represent end of file for prolog. +If nil, send actual operating system end of file." :group 'prolog-inferior - :type 'sexp + :type '(choice string + (const nil) + (alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp)))) :risky t) (defcustom prolog-prompt-regexp @@ -653,7 +644,8 @@ 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 '(alist :key-type (choice symbol sexp) + :value-type (group (choice string (const nil) sexp))) :risky t) (defun prolog-prompt-regexp () @@ -664,7 +656,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 '(alist :key-type (choice symbol sexp) +;; :value-type (group (choice string (const nil) sexp))) ;; :risky t) (defcustom prolog-debug-on-string "debug.\n" @@ -1036,7 +1029,7 @@ VERSION is of the format (Major . Minor)" (define-abbrev-table 'prolog-mode-abbrev-table ()) -;; Becauses this can `eval' its arguments, any variable that gets +;; Because 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'." |
