Commit graph

33 commits

Author SHA1 Message Date
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
Andreas Schwab
300f7bb347 (cperl-lazy-help-time): Fix customize
type.
1998-09-18 09:17:02 +00:00
Richard M. Stallman
b7ec9e590e (pod2man-program): Var reinstalled.
(cperl-pod-to-manpage, cperl-pod2man-build-command): Fns reinstalled.
1998-06-09 04:03:45 +00:00
Richard M. Stallman
f6cfd0b0c5 Comment change. 1998-06-08 20:19:47 +00:00
Richard M. Stallman
46c7246857 (cperl-problems): Doc fix. 1998-06-08 00:02:30 +00:00
Richard M. Stallman
bab27c0c4d Second half of changes in version 1.4. 1998-06-07 23:58:48 +00:00
Richard M. Stallman
026d871394 (cperl-pod-to-manpage): Function deleted
(cperl-pod2man-build-command, cperl-perldoc-at-point): Likewise.
(cperl-perldoc): Likewise.
(pod2man-program): Variable deleted.
1998-06-07 23:37:02 +00:00
Richard M. Stallman
db133cb603 (cperl-style-alist): New variable, since `c-mode'
is no longer loaded.
- (Somebody who uses the styles should check that they work OK!)
- (a lot of work is needed, especially with new
  `cperl-fix-line-spacing').
Old value of style is memorized when choosing a new style, may be
restored from the same menu.
(cperl-perldoc, cperl-pod-to-manpage): New commands; thanks to
Anthony Foiani <afoiani@uswest.com> and Nick Roberts
<Nick.Roberts@src.bae.co.uk>.
(`Perl doc', `Regexp'): New submenus (latter to allow short displays).
(cperl-clobber-lisp-bindings): New cfg variable.
(cperl-find-pods-heres): $a->y() is not y///.
(cperl-after-block-p): Add save-excursion.
(cperl-init-faces): Was failing.
Init faces when loading `ps-print'.
(cperl-toggle-autohelp): New command.
(cperl-electric-paren): `while SPACE LESS' was buggy.
(cperl-init-faces): `-text' in `[-text => 1]' was not highlighted.
(cperl-after-block-p): was FALSE after `sub f {}'.
(cperl-electric-keyword): `foreachmy', `formy' expanded too,
Expands `=pod-directive'.
(cperl-linefeed): behaves reasonable in POD-directive lines.
(cperl-message-electric-keyword): new cfg variable.
(cperl-electric-keyword): print a message, governed by
`cperl-message-electric-keyword'.
(cperl-electric-paren): Typing `}' was not checking for being
block or not.
(cperl-beautify-regexp-piece): Did not know about lookbehind;
finding *which* level to work with was not intuitive.
(cperl-beautify-levels): New command.
(cperl-electric-keyword): Allow here-docs contain `=head1'
and friends for keyword expansion.
Fix for broken `font-lock-unfontify-region-function'.  Should
preserve `syntax-table' properties even with `lazy-lock'.
(cperl-indent-region-fix-else): New command.
(cperl-fix-line-spacing): New command.
(cperl-invert-if-unless): New command (C-c C-t and in Menu).
(cperl-hints): mention 20.2's goods/bads.
(cperl-extra-newline-before-brace-multiline): Started to use it.
(cperl-break-one-line-blocks-when-indent): New cfg variable.
(cperl-fix-hanging-brace-when-indent): New cfg variable.
(cperl-merge-trailing-else): New cfg variable.
Workaround for another `font-lock's `syntax-table' text-property bug.
`zerop' could be applied to nil.
At last, may work with `font-lock' without setting `cperl-font-lock'.
(cperl-indent-region-fix-constructs): Renamed from
`cperl-indent-region-fix-constructs'.
(cperl-fix-line-spacing): could be triggered inside strings, would not
know what to do with BLOCKs of map/printf/etc.
(cperl-merge-trailing-else): Handle `continue' too.
(cperl-fix-line-spacing): Likewise.
(cperl-calculate-indent): Knows about map/printf/etc before {BLOCK};
treat after-comma lines as continuation lines.
(cperl-mode): `continue' made electric.
(cperl-electric-keyword): Electric `do' inserts `do/while'.
(cperl-fontify-syntaxically): New function.
(cperl-syntaxify-by-font-lock): New cfg variable.
Make syntaxification to be autoredone via `font-lock',
switched on by `cperl-syntaxify-by-font-lock', off by default so far.
Remove some commented out chunks.
(cperl-set-style-back): Old value of style is memorized when
choosing a new style, may be restored from the same menu.
Mode-documentation added to micro-docs.
(cperl-praise): updated.
(cperl-toggle-construct-fix): New command.  Added on C-c C-w and menu.
(auto-fill-mode): added on C-c C-f and menu.
(cperl-style-alist): `PerlStyle' style added.
(cperl-find-pods-heres): Message for termination of scan corrected.
(cperl-speed): New variable with hints.
(cperl-electric-else): Make backspace electric after
expansion of `else/continue' too.
Fixed customization to honor cperl-hairy.
Created customization groups.
All the compile-time warnings fixed.
(cperl-syntaxify-by-font-lock): Interaction with `font-lock-hot-pass'
fixed.
(cperl-after-block-and-statement-beg): It is BLOCK if we reach lim
when backup sexp.
(cperl-after-block-p, cperl-after-expr-p): Likewise.
(cperl-indent-region): Make a marker for END - text added/removed.
(cperl-style-alist): Include `cperl-merge-trailing-else'
where the value is clear.
(cperl-styles-entries): Likewise.
(cperl-tips, cperl-problems): Improvements to docs.
1998-05-30 15:43:16 +00:00
Stephen Eglen
ccc3ce39b4 Commented out line 471 (miniperl entry in interpreter-mode-alist)
Removed stray =06 entry on line 4445.
Customized.
1998-02-22 20:03:39 +00:00
Simon Marshall
883212ce69 Changed font-lock-reference-face to font-lock-constant-face. 1998-02-20 14:58:27 +00:00
Karl Heuer
f83d2997fb Initial revision 1997-11-23 02:10:07 +00:00