Commit graph

110 commits

Author SHA1 Message Date
Werner LEMBERG
2e8b9c7d51 * progmodes/cperl-mode.el, progmodes/idlw-shell.el,
progmodes/idlwave.el, progmodes/vhdl-mode.el: Replace `legal' with
`valid'.
2005-03-25 10:06:23 +00:00
Richard M. Stallman
7d441781a7 (cperl-mode): Use mode-require-final-newline. 2004-12-31 14:53:01 +00:00
Richard M. Stallman
f8fd4f555e (cperl-find-bad-style): Use with-no-warnings.
(cperl-font-lock-unfontify-region-function): No need to save and
restore info, since font-lock.el does it for us.
2004-12-27 15:39:42 +00:00
Richard M. Stallman
335dd1f105 (cperl-indent-region, cperl-imenu--create-perl-index, cperl-xsub-scan):
Don't print progress messages.
2004-11-25 03:04:16 +00:00
Richard M. Stallman
c326ddd190 (cperl-indent-region): Don't mind imenu-scanning-message. 2004-11-20 20:18:34 +00:00
Daniel Pfeiffer
a3c328ee89 run-mode-hooks instead of run-hooks 2004-11-12 23:47:30 +00:00
Richard M. Stallman
fc49c9c623 (cperl-info-on-command): Use goto-char instead of beginning-of-buffer. 2004-11-07 03:57:24 +00:00
Richard M. Stallman
21df56d56b (cperl-switch-to-doc-buffer): Don't use interactive-p. 2004-11-01 07:42:19 +00:00
Mark A. Hershberger
ae04ab88fd *** empty log message *** 2004-07-09 15:03:07 +00:00
Richard M. Stallman
0ce7de922c (cperl-putback-char): Delete Emacs 18 definition. 2004-04-21 19:19:44 +00:00
Juanma Barranquero
825d074503 (cperl-indent-alist, cperl-where-am-i): Comment out (it's unused and
unfinished code).
2004-03-25 22:45:20 +00:00
Stefan Monnier
cff301beed (cperl-fill-paragraph): Call fill-paragraph
with point inside rather than after the paragraph.
2004-02-04 22:55:17 +00:00
Stefan Monnier
82eb0daee6 (cperl-mode-map, cperl-do-auto-fill, cperl-menu): Use fill-paragraph,
not cperl-fill-paragraph.
(cperl-mode): Set fill-paragraph-function.
(cperl-fill-paragraph): Make it non-interactive.
2004-02-02 15:22:39 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Juanma Barranquero
15ca56993e (cperl-lineup): Don't quote nil and t in docstrings. 2003-05-06 17:43:22 +00:00
Richard M. Stallman
c73fce9a2c (cperl-nonoverridable-face): Doc fix. 2003-05-03 13:53:41 +00:00
Kim F. Storm
d6156ce844 (cperl-electric-backspace): Add delete-selection property. 2003-03-22 00:40:00 +00:00
Stefan Monnier
f739b53bda Merge changes from CPerl-5.0.
(toplevel): Require man.
(condition-case): Don't autoload tmm-prompt (it's in loaddefs.el).
(cperl-electric-backspace-untabify): New var.
(cperl-electric-backspace): Use it.
(cperl-vc-header-alist): Extract numeric version from the Id.
(cperl-build-manpage): New fun.
(cperl-menu): Use it.  Add toggle-autohelp.
(cperl-mode) <defun-prompt_regexp>: Understand prototypes.
(cperl-electric-brace): Use `cperl-after-block-p' for detection.
(cperl-electric-keyword): Make $if (etc: "$@%&*") non-electric.
'(' after keyword would insert a doubled paren.
(cperl-calculate-indent): Update syntaxification before checks.
Fix wrong indent of blocks starting with POD.
(cperl-find-pods-heres): If no end of HERE-doc found, mark to the end
of buffer.  This enables recognition of end of HERE-doc "as one types".
Require "\n" after trailing tag of HERE-doc.
\( made non-quoting outside of string/comment (gdj-contributed).
Likewise for \$.  Remove `here-doc-group' text property at start
(makes this property reliable).
Text property `first-format-line' ==> t.
Do not recognize $opt_s and $opt::s as s///.
(cperl-after-block-p): Optional arg pre-block to check for a pre-block
Recognize `continue' blocks too.
(cperl-after-expr-p): Update syntaxification before checks.  Work after
here-docs, formats, and PODs too (affects many electric constructs).
(cperl-fix-line-spacing): Allow "_" in $vars of foreach etc.
(cperl-perldoc): Use case-sensitive search.
2003-02-23 02:19:02 +00:00
Stefan Monnier
83261a2f13 Merge changes from CPerl-4.35.
(cperl-xemacs-p): Move.
(cperl-can-font-lock): New var to replace window-system.
(cperl-enable-font-lock): Use it.
(cperl-use-major-mode): New var.
(cperl-mode): Use it.
(cperl-calculate-indent): Remove code whose removal was missed
in some earlier merge.
(cperl-tags-hier-init): Use display-popup-menus-p.
2003-02-23 01:42:24 +00:00
Juanma Barranquero
0fe6068fef (cperl-electric-keyword, cperl-electric-pod, cperl-do-auto-fill): Fix character
constants.
2003-02-18 12:49:26 +00:00
Juanma Barranquero
07cb2aa33c (cperl-next-bad-style): Fix use of character constant. 2003-02-14 09:58:50 +00:00
Juanma Barranquero
a1506d2977 Trailing whitepace deleted. 2003-02-04 13:24:35 +00:00
Juanma Barranquero
0c602a0f28 (cperl-beautify-level, cperl-beautify-regexp): Fix use of
`prefix-numeric-value'.
(cperl-calculate-indent): Fix typo.
2003-01-29 12:18:13 +00:00
Juanma Barranquero
5cc679abf3 Don't make faces depend on window-system. 2003-01-18 15:32:16 +00:00
Richard M. Stallman
8937f01b8d (cperl-noscan-files-regexp): In addition to RCS, exclude CVS directories. 2002-09-09 19:38:22 +00:00
Juanma Barranquero
2022c546c0 (cperl-break-one-line-blocks-when-indent): Fix typo. 2002-07-02 14:50:00 +00:00
Richard M. Stallman
f94a632ae5 Many trivial doc fixes.
(cperl-non-problems): Definition deleted.
(cperl-menu): Don't refer to cperl-non-problems.
(cperl-word-at-point): Add doc string.
(cperl-beautify-regexp-piece): Fix error message.
(cperl-invert-if-unless): Fix error message.
2002-06-26 08:51:45 +00:00
Stefan Monnier
ce22dd539d (cperl-make-face, cperl-force-face):
Use defvar rather than defconst since it's meant to be settable.
(cperl-syntax-done-to): Don't hardcode 1 as (point-min).
(cperl-fix-line-spacing): Add missing \ in [ t].
2002-04-08 22:39:00 +00:00
Richard M. Stallman
95f433f40b (cperl-imenu--function-name-regexp-perl):
Move definition above cperl-outline-regexp.
2002-03-16 06:52:31 +00:00
Richard M. Stallman
8dd511f607 (cperl-outline-regexp): Move definition up. 2002-03-14 08:50:03 +00:00
Stefan Monnier
bedf0b73d1 (cperl-menu): Add "-emacs" to the version. 2002-03-04 01:09:58 +00:00
Pavel Janík
110c171f4d Fix typo. 2002-01-13 10:09:20 +00:00
Richard M. Stallman
58b64ac7d9 (various face definitions): Use :weight and :slant. 2001-12-31 20:43:36 +00:00
Richard M. Stallman
8e3acc6629 (cperl-problems, cperl-tips, cperl-non-problems, cperl-praise): Doc fixes. 2001-11-21 11:16:33 +00:00
Stefan Monnier
a8e1e57f4c (cperl-perldoc): Require man before binding `manual-program'. 2001-11-20 14:20:41 +00:00
Stefan Monnier
6c38915121 Merged in changes from v4.32.
After 4.23 and: After 4.24:
(cperl-contract-levels): Restore position.
(cperl-beautify-level): Likewise.
(cperl-beautify-regexp): Likewise.
(cperl-commentify): Rudimental support for length=1 runs
(cperl-find-pods-heres): Process 1-char long REx comments too /a#/x
 After 4.25:
(cperl-commentify): Was recognizing length=2 "strings" as length=1.
(imenu-example--create-perl-index): Was not enforcing
syntaxification-to-the-end.
(cperl-invert-if-unless): Allow `for', `foreach'.
(cperl-find-pods-heres): Quote `cperl-nonoverridable-face'.
Mark qw(), m()x as indentable.
(cperl-init-faces): Highlight `sysopen' too.
Highlight $var in `for my $var' too.
(cperl-invert-if-unless): Was leaving whitespace at end.
(cperl-linefeed): Was splitting $var{$foo} if point after `{'.
(cperl-calculate-indent): Remove old commented out code.
Support (primitive) indentation of qw(), m()x.
 After 4.26:
(cperl-problems): Mention `fill-paragraph' on comment. \"" and
q [] with intervening newlines.
(cperl-autoindent-on-semi): New customization variable.
(cperl-electric-semi): Use `cperl-autoindent-on-semi'.
(cperl-tips): Mention how to make CPerl the default mode.
(cperl-mode): Support `outline-minor-mode'.  From Mark A. Hershberger.
(cperl-outline-level): New function.
(cperl-highlight-variables-indiscriminately): New customization var.
(cperl-init-faces): Use `cperl-highlight-variables-indiscriminately'.
From Sean Kamath <kamath@pogo.wv.tek.com>.
(cperl-after-block-p): Support CHECK and INIT.
(cperl-init-faces, cperl-short-docs): Likewise and "our".
From Doug MacEachern <dougm@covalent.net>.
 After 4.27:
(cperl-find-pods-heres): Recognize \"" as a string.
Mark whitespace between q and [] as `syntax-type' => `prestring'.
Allow whitespace between << and "FOO".
(cperl-problems): Remove \"" and q [] with intervening newlines.
Mention multiple <<EOF as unsupported.
(cperl-highlight-variables-indiscriminately): Doc misprint fixed.
(cperl-indent-parens-as-block): New configuration variable.
(cperl-calculate-indent): Merge cases of indenting non-BLOCK groups.
Use `cperl-indent-parens-as-block'.
(cperl-find-pods-heres): Test for =cut without empty line instead of
complaining about no =cut.
(cperl-electric-pod): Change the REx for POD from "\n\n=" to "^\n=".
(cperl-find-pods-heres): Likewise.
(cperl-electric-pod): Change `forward-sexp' to `forward-word':
POD could've been marked as comment already.
(cperl-unwind-to-safe): Unwind before start of POD too.
 After 4.28:
(cperl-forward-re): Throw an error at proper moment REx unfinished.
 After 4.29:
(x-color-defined-p): Make an extra case to peacify the warning.
Toplevel: `defvar' to peacify the warnings.
(cperl-find-pods-heres): Could access `font-lock-comment-face' in -nw.
No -nw-compile time warnings now.
(cperl-find-tags): TAGS file had too short substring-to-search.
Be less verbose in non-interactive mode
(imenu-example--create-perl-index): Set index-marker after name
(cperl-outline-regexp): New variable.
(cperl-outline-level): Made compatible with `cperl-outline-regexp'.
(cperl-mode): Made use `cperl-outline-regexp'.
 After 4.30:
(cperl-find-pods-heres): =cut the last thing, no blank line, was error.
(cperl-outline-level): Make start-of-file same level as `package'.
 After 4.31:
(cperl-electric-pod): `head1' and `over' electric only if empty.
(cperl-unreadable-ok): New variable.
(cperl-find-tags): Use `cperl-unreadable-ok', do not fail
on an unreadable file.
(cperl-write-tags): Use `cperl-unreadable-ok', do not fail
on an unreadable directory.
2001-10-12 18:11:06 +00:00
Pavel Janík
e8af40eed4 Some fixes to follow coding conventions. 2001-07-16 12:23:00 +00:00
Stefan Monnier
5efe6a5673 (cperl-font-lock-keywords)
(cperl-font-lock-keywords-1, cperl-font-lock-keywords-2):
Renamed from perl-font-lock-keywords to avoid clashes.
(cperl-mode, cperl-load-font-lock-keywords, cperl-init-faces)
(cperl-load-font-lock-keywords-1, cperl-load-font-lock-keywords-2):
Updated correspondingly.
2001-05-04 20:16:56 +00:00
Stefan Monnier
996e261628 (cperl-msb-fix, cperl-get-help-defer):
Check major-mode for `cperl-mode' as well.
2001-03-06 21:55:33 +00:00
Stefan Monnier
029cb4d5b5 (cperl-mode): Set major-mode to cperl-mode
so that C-h m shows the correct information.
Use make-local-variable rather than make-variable-buffer-local.
(cperl-info-buffer, cperl-setup-tmp-buf):
Use make-local-variable rather than make-variable-buffer-local.

Updated to author version 4.23.
(cperl-electric-pod): SYNOPSIS was misspelled.
(cperl-find-pods-heres): @if ? a : b was considered a REx.
(cperl-after-expr-p): Make true after __END__.
2001-03-06 21:47:33 +00:00
Dave Love
ac6857fb16 (cperl-invalid-face): Don't double-quote
value.
(cperl-init-faces): Allow cperl-invalid-face to be a normal face.
2001-01-03 00:19:28 +00:00
Dave Love
072cb6f926 (cperl-mode): Set
normal-auto-fill-function correctly.
2000-10-25 13:41:19 +00:00
Dave Love
8661c643db (cperl-tips-faces): Doc fix.
(cperl-invalid-face): Revert last change.
(cperl-init-faces): Quote cperl-invalid-face.
2000-10-12 13:10:22 +00:00
Sam Steingold
5c8b7eaf15 (cperl-invalid-face): double-quote underline 2000-10-11 16:53:24 +00:00
Dave Love
80585273bd (top-level): Clean up
`eval-when-compile's and assorted defvars.
(cperl-invalid-face): Don't double-quote value.  Change custom
type.
(cperl-mode): Set normal-auto-fill-function and don't zap
auto-fill-function.
(cperl-imenu--function-name-regexp-perl): Renamed from
imenu-example--function-name-regexp-perl.
(cperl-imenu--create-perl-index): Renamed from
imenu-example--create-perl-index.
(cperl-xsub-scan): Don't require cl.
2000-09-21 18:28:41 +00:00
Gerd Moellmann
f1d851aecd Replace ^F with ^L. 2000-01-09 16:59:27 +00:00
Richard M. Stallman
8f22224849 (cperl-under-as-char): Make nil the default value. 1999-12-01 00:33:22 +00:00
Gerd Moellmann
b787fc059e Use new backquote syntax. 1999-11-15 14:26:07 +00:00
Karl Heuer
f39d5ac75a (cperl-invalid-face): Fix custom type. 1999-06-12 05:52:54 +00:00
Richard M. Stallman
5bd52f0ea6 Can use linear algorithm for indentation if Emacs supports it.
(cperl-after-expr-p):	It is BLOCK if we reach lim when backup sexp.
(cperl-after-block-p):	Likewise.
(cperl-after-block-and-statement-beg): Likewise.
(cperl-after-block-p):	After END/BEGIN we are a block.
(cperl-after-expr-p):	Skip labels when checking
(cperl-indent-region):	Make a marker for END - text added/removed.
Disable hooks during the call (how to call them later?).
Now indents 820-line-long function in 6.5 sec (including
syntaxification) the first time	(when buffer has few
properties), 7.1 sec the second time.
(cperl-indent-region):	Do not indent whitespace lines
(cperl-style-alist)
	Include `cperl-merge-trailing-else' where the value is clear.
(cperl-styles-entries): Likewise.
(cperl-problems):	Improvements to docs.
(cperl-tips):		Likewise.
(cperl-non-problems):	Likewise.
(cperl-mode):		Make lazy syntaxification possible.
Loads pseudo-faces for the sake of `cperl-find-pods-heres' (for 19.30).
`font-lock-unfontify-region-function' was set to a wrong function.

(cperl-find-pods-heres): Safe a position in buffer where it is safe to
restart syntaxification.  Changed so that -d ?foo? is a RE. Do
not warn on `=cut' if doing a chunk only. 1 << 6 was OK,
but 1<<6 was considered as HERE-doc.
<file/glob> made into a string.
Postpone addition of faces after syntactic step.
Recognition of <FH> was wrong.
Highlight `gem' in s///gem as a keyword.  `qr' recognized.
Knows that split// is null-RE.
Highlights separators in 3-parts expressions as labels.
<> was considered as a glob.
Would err if the last line is `=head1'.
$a-1 ? foo : bar; was a considered a regexp.
`<< (' was considered a start of HERE-doc.
mark qq[]-etc sections as syntax-type=string
Was not processing sub protos after a comment ine.
Was treating $a++ <= 5 as a glob.
Tolerate unfinished REx at end-of-buffer.
`unwind-protect' was left commented.
/ and ? after : start a REx.

(cperl-syntaxify-by-font-lock): Set to t, should be safe now.
Better default, customizes to `message' too, off in text-mode.

(cperl-array-face): Renamed from `font-lock-emphasized-face',
`defface'd.
(cperl-hash-face): Renamed from `font-lock-other-emphasized-face'.
`defface'd.
(cperl-emacs-can-parse):	New state variable.
(cperl-indent-line):	Corrected to use global state.
(cperl-calculate-indent):	Likewise.
(cperl-fix-line-spacing):	Likewise (not used yet).
(cperl-calculate-indent):	Did not consider `,' as
continuation mark for statements.
(cperl-calculate-indent): Avoid parse-data optimization at toplevel.
Remove another parse-data optimization at toplevel: would
indent correctly.
Correct for labels when calculating indentation of continuations.
Docstring updated.
(cperl-choose-color):	Converted to a function (to be
compilable in text-mode).
(cperl-dark-background):	Disable without window-system.
Do `defface' only if window-system.
(cperl-fix-line-spacing):	sped up to bail out early.
(x-color-defined-p): was not compiling on XEmacs
Was defmacro'ed with a tick.  Remove another def.
(cperl-clobber-lisp-bindings): if set, C-c variants are the old ones
(cperl-unwind-to-safe):	New function.
(cperl-fontify-syntaxically): Use `cperl-unwind-to-safe' to start at reasonable position.
(cperl-fontify-syntaxically): Unwinds start and end to go out of
			     long strings (not very successful).
(cperl-forward-re):	Highlight the trailing / in s/foo// as string.
Highlight the starting // in s//foo/ as function-name.
Emit a meaningful error instead of a cryptic one for an
uncomplete REx near end-of-buffer.

(cperl-electric-keyword):	`qr' recognized.
(cperl-electric-else):		Likewise
(cperl-to-comment-or-eol):	Likewise
(cperl-make-regexp-x):	Likewise
(cperl-init-faces):	Likewise, and `lock' (as overridable?).
Corrected to use new macros;
`if' for copying `reference-face' to `constant-face' was backward.
remove init `font-lock-other-emphasized-face',
`font-lock-emphasized-face', `font-lock-keyword-face'.
Interpolate `cperl-invalid-face'.
(cperl-make-regexp-x):	Misprint in a message.
(cperl-syntaxify-unwind): New configuration variable
(cperl-fontify-m-as-s):	New configuration variable
(cperl-electric-pod):	check for after-expr was performed
inside of POD too.
(cperl-backward-to-noncomment):	better treatment of PODs and HEREs.
(cperl-clobber-mode-lists): New configuration variable.
(cperl-not-bad-style-regexp):	Updated.
Init:			`cperl-is-face' was busted.
(cperl-make-face):	New macros.
(cperl-force-face):	New macros.
(font-lock-other-type-face): Done via `defface' too.
(cperl-nonoverridable-face):	New face.  Renamed from
`font-lock-other-type-face'.
(cperl-init-faces-weak):	use `cperl-force-face'.
(cperl-comment-indent):	Commenting __END__ was not working.
(cperl-indent-for-comment):	Likewise.
(cperl-write-tags):	Correct for XEmacs's `visit-tags-table-buffer'.
When removing old TAGS info was not relativizing filename.
(cperl-tags-hier-init):	Gross hack to pretend we work (are we?).
Another try to work around XEmacs problems.  Better progress messages.
(toplevel):		require custom unprotected => failure on 19.28.
(cperl-xemacs-p):	defined when compile too
(cperl-find-tags):	Was writing line/pos in a wrong order,
pos off by 1 and not at beg-of-line.
(cperl-etags-snarf-tag): New macro
(cperl-etags-goto-tag-location): New macro
(cperl-version):	New variable.  New menu entry
random docstrings:	References to "future" 20.3 removed.
Menu was described as `CPerl' instead of `Perl'
(perl-font-lock-keywords): Would not highlight `sub foo($$);'.
(cperl-toggle-construct-fix): Was toggling to t instead of 1.
(cperl-ps-print-init):	Associate `cperl-array-face', `cperl-hash-face'
Remove `font-lock-emphasized-face', `font-lock-other-emphasized-face',
`font-lock-reference-face', `font-lock-keyword-face'.
Use `eval-after-load'.
Remove not-CPerl-related faces.
(cperl-tips-faces):	New variable and an entry into Mini-docs.
(cperl-indent-exp):	Was not processing else-blocks.
(cperl-get-state):	NOP line removed.
(cperl-ps-print):	New function and menu entry.
(cperl-ps-print-face-properties):	New configuration variable.
(cperl-invalid-face):	New configuration variable.
(perl-font-lock-keywords):	Highlight trailing whitespace
(cperl-contract-levels):	Documentation corrected.
(cperl-contract-level):		Likewise.
(cperl-ps-extend-face-list):	New macro.
(cperl-invalid-face):	Change to ''underline.
1999-01-02 00:16:05 +00:00