* progmodes/fortran.el (fortran-mode-map): Change "Join
Continuation Line" to "Join Line".
(font-lock-keywords-1): Add "cycle", "exit".
1998-10-14 Emilio Lopes <Emilio.Lopes@Physik.TU-Muenchen.DE>
* progmodes/fortran.el (fortran-join-line): Use
`delete-indentation' instead of issuing an error message if not on
a continuation line. Provide for joining several lines using
prefix arg.
Move declaration before first use.
(hif-parse-if-exp, hif-nexttoken, hif-expr, hif-term, hif-eq-expr,
hif-math, hif-factor): Rename token to hif-token and token-list to
hif-token-list.
(hif-token, hif-token-list): Declare them.
(hif-find-ifdef-block): Return cons of top and bottom point
instead of setting dynamically bound variables.
(hide-ifdef-block, show-ifdef-block): Use return value of
hif-find-ifdef-block.
front of the "begin" string.
(pascal-beg-of-defun): Used to locate the beginning of a function
incorrectly when a function contained several begin-end blocks. Fixed.
(grep-find-command): Initialize to nil.
(grep-find-use-xargs): Initialize to nil.
(grep-compute-defaults): New function, sets those three vars properly.
(grep, grep-find): Call grep-compute-defaults if ...command variable
is still nil.
(grep-program): Doc fix.
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.
Renamed from vhdl-use-default-colors, and sense reversed.
(vhdl-customize-faces):
Renamed from vhdl-use-default-faces, and sense reversed.
(vhdl-font-lock-init, vhdl-ps-init): Implement those changes.
(vhdl-submit-bug-report): Use new variable names.
(compilation-mode): Accept optional parameter and initialize
mode-name from it.
(compile-internal): Pass name-of-mode to compilation-mode. Don't
set mode-name here.
(compilation-minor-mode): Don't let mode-line-process change.
(compilation-next-error-locus): Use forward-char instead of
move-to-column.
(compilation-parse-errors): Set default-directory from head of
compilation-directory-stack.
(scheme-font-lock-keywords-1, scheme-font-lock-keywords-2,
scheme-font-lock-keywords): Moved here from font-lock.el.
(dsssl-mode): Move font-lock-defaults setting and running hooks.
nil when calling fill-paragraph, to avoid bogus recursion which
will signal an error.
(c-fill-paragraph): Always keep point in the same
relative position. Fill comment before point if there's nothing
else on the same line. Fill block comments after code a little
better. Try harder to find a good fill-prefix when point is on a
block comment ender line. Use c-Java-javadoc-paragraph-start in
block comments in Java mode. Leave block comment ender alone when
c-hanging-comment-ender-p is nil and point is on that line.
Detect paragraph-separate in multiparagraph comments. Fix for bug
that may strip the `*' off `*/' if fill-prefix ends with `*' and
c-hanging-comment-ender-p is t. Added filling of multiline string
literals. Always return t to disable filling in any unhandled
area, i.e. actual code where fill-paragraph only mess things up.
(c-collect-line-comments): Require same comment start column.
(c-guess-basic-syntax): Fixes for nesting of and
repeated defun-open's inside extern and namespace clauses. This
is done by passing a relpos to `inextern-lang' and `innamespace'.
Also, the relpos in `defun-open' is no longer always bol. It's
always bol when on the top level, however. Changed cases: 5A.5, 5I, 14A.
(c-forward-token-1, c-backward-token-1): New functions to move by tokens.
c-guess-basic-syntax): Fixes for Java 1.1 array initialization brace lists.
between make-variable-buffer-local and make-local-variable. Generalize.
(c-offsets-alist): Three new syntactic symbols: innamespace,
namespace-open, namespace-close. These support C++ namespace blocks.
Also, new syntactic symbol cpp-macro-cont, by default bound to
c-lineup-dont-change. This symbol is assigned to subsequent lines of
a multi-line C preprocess macro definition.
(c-style-alist): "jdk" style for conformance with Sun's JDK style.
(c-set-style-2, c-initialize-builtin-style): Don't special case
"cc-mode", it's a derived style. Fix setup of derived style
"cc-mode". Introduce the new default style "user" which contains all
user customizations.
imenu-case-fold-search to nil.
(java-mode): Set c-method-key to nil. I don't think this is necessary
for Java, and besides, the old value was inherited from Objective-C
which was clearly not right.
(c++-mode): Set c-extra-toplevel-key to c-C++-extra-toplevel-key.
(c-initialize-on-load): New variable, *not* customized.
make the variables local to the buffer (via make-local-variable).
(c-java-method-key): Variable deleted.
(c-C-extra-toplevel-key)
(c-C++-extra-toplevel-key, c-extra-toplevel-key): New variables
which parameterize the search for additional top-level enclosing
constructs.
(c-mode-base-map): c-mark-function moved back to M-C-h.
Don't narrow, just make a simple check against the given limit.
(c-collect-line-comments): New function.
(c-literal-limits): New function that finds the start and end pos
of a comment or string surrounding point.
(c-literal-limits-fast): A faster variant of `c-literal-limits'
for newer Emacsen where the state returned from
`parse-partial-sexp' contains the starting pos of the last literal.
(c-parse-state): Use (c-point 'bod) instead of
beginning-of-defun directly.
(c-guess-basic-syntax): Fixed a few byte compiler warnings.
(c-backward-to-start-of-do): Break infloop for
invalid code, e.g. when someone types while (TRUE) { at the top of
a buffer, we shouldn't hang when the { is typed!
(c-backward-to-start-of-if): Ensure never
move forward, not even if point < lim.
(c-search-uplist-for-classkey): When searching up for a class key,
instead of hardcoding the extended search for "extern", use the new
variable c-extra-toplevel-key, which is language dependent. For C++,
this variable includes the keyword "namespace" which will match C++
namespace introducing blocks.
(c-guess-basic-syntax): Support for recognizing C++ namespace
blocks, by elaborating on the mechanism used to find external
language blocks. Searches which hardcoded "extern" now use
c-extra-toplevel-key, a language dependent variable. Case clauses
that were modified: CASE 5A.1, CASE 5A.4, CASE 5F, CASE 5I, CASE
14A.
CASE 3: we can now determine whether we're at the beginning of a
cpp macro definition, or inside the middle of one. Set syntax to
'cpp-macro in the former case, 'cpp-macro-cont in the latter. In
both cases, the relpos is the beginning of the macro.
(c-forward-syntactic-ws): Added code that skips forward over
multi-line cpp macros.
(c-beginning-of-macro): Moved, and made into a defsubst. This
function can now actually find the beginning of a multi-line C
preprocessor macro.
(c-backward-syntactic-ws): Use c-beginning-of-macro to skip backwards
over multi-line macro definitions.
(c-in-literal, c-fast-in-literal): Use c-beginning-of-macro to
find out whether we're in a multi-line macro definition.
(c-fast-in-literal): Function which should be faster than
c-in-literal. In XEmacs, this uses buffer-syntactic-context.
(c-end-of-statement): Do not move by sentence in strings.
(c-beginning-of-statement): Major rewrite.
(c-beginning-of-defun, c-indent-defun):
Use (c-point 'bod) instead of beginning-of-defun directly.
(c-beginning-of-defun, c-end-of-defun): New commands.
(c-beginning-of-statement): When moving forward by sentences, because
we're either inside or at the start of a comment, be sure to limit
movement to only within the extent of the comment.
(c-electric-colon): Don't insert newlines before or after scope
operators, regardless of the value of c-hanging-colons.
(c-electric-brace): namespace-open and namespace-close braces can hang.
(c-comment-line-break-function): When breaking a
line-oriented comment, copy the comment leader from the previous
line instead of hardcoding it to "// ". This ensures that
whitespace between the slashes and the text is preserved.
(c-electric-pound, c-electric-brace)
(c-electric-slash, c-electric-star, c-electric-semi&comma)
(c-electric-colon, c-electric-lt-gt, c-scope-operator)
(c-electric-backspace, c-electric-delete)
(c-indent-command, c-indent-exp, c-indent-defun)
(c-backslash-region, c-fill-paragraph): Add "*" to interactive spec.
(c-fill-paragraph): regexp-quote the
fill-prefix when search forward for the end of line oriented comments.
(c-backslash-region): Do not preserve the zmacs region (XEmacs).
(c-indent-one-line-block): New indentation functions.
(c-semi&comma-no-newlines-before-nonblanks)
(c-semi&comma-no-newlines-for-oneline-inliners): New functions.
(c-lineup-dont-change): New lineup function that leaves the current
line's indentation unchanged. Used for the new cpp-macro-cont
syntactic symbol.
(dsssl-imenu-generic-expression): Likewise
(scheme-mode-variables): Set imenu-syntax-alist.
(dsssl-mode): Remove `!' from font-lock-defaults. Set
imenu-syntax-alist.
note of current maintainer.
(fortran-mode): Use imenu-syntax-alist.
(fortran-imenu-generic-expression): Use
fortran-continuation-string, not always `+'.
(fortran-font-lock-keywords-1): Include symbol syntax as well
as word, following syntax table changes.
(fortran-imenu-generic-expression): Likewise.
(fortran-mode-map): Add a menu.
(fortran-mode-version, fortran-startup-message): Delete
misleading variables.
(fortran-mode): Don't use them.
(fortran-column-ruler-fixed, fortran-column-ruler-tab): Fix
leading \ which made `0' into null.
(fortran-join-lines): New function and key binding.
(fortran-narrow-to-subprogram): New function and key binding.
(fortran-mode-syntax-table): Make ?., ?_, ?$ symbol, not word.
(octave-electric-semi, octave-electric-space): Use it.
(octave-before-magic-comment-p): New func.
(calculate-octave-indent, octave-comment-indent): Use it.
(octave-auto-indent): New variable.
(octave-electric-semi, octave-electric-space): Use it.
(octave-maybe-insert-continuation-string):
New function.
(octave-auto-fill): No longer calls do-auto-fill. Should now
avoid breaking lines after comment starts or before code line
continuation expressions.
(octave-fill-paragraph): Move forward a line if octave-auto-fill
gave up.
(octave-before-magic-comment-p): New func.
(octave-comment-indent): Handle magic comments correctly.
(calculate-octave-indent): Handle magic comments correctly.
(octave-abbrev-table): Added abbrevs for
switch, case, otherwise, and endswitch.
(octave-begin-keywords): Added switch.
(octave-else-keywords): Added case and otherwise.
(octave-end-keywords): Added endswitch.
(octave-block-match-alist): Added an entry for switch syntax.
(calculate-octave-indent): Added support for switch syntax.
(octave-block-end-offset): New function.
(octave-comment-indent): Fix a typo.
(octave-block-match-alist): Move
`otherwise' to right after `case' to have octave-close-block()
correctly close a `switch' block by `endswitch'.
Be slient if c-progress-interval
is nil.
(c-comment-line-break-function):
Fix for when comment starts at
comment-column and there is non-whitespace preceding this on the
current line.
CASE 5F: extern-lang-close relpos should be
element 0 of inclass-p, not element 1.
(c-beginning-of-statement-1):
Watch out for keywords which have a
preceding underscore.
Fixes in sentence movement to properly
handle M-e moving forward into a comment when looking at preceding
whitespace, and M-a moving backward into comment when looking at
following whitespace.
Uncommented the looking-at call in the
sentence-flag clause so that moving by forward-sentence when looking
at the beginning of a comment works again. A previous log message in
cc-mode.el indicates this was commented out "because
c-beginning-of-statement-1 should do the right thing", but clearly it
doesn't.
I don't know if this breaks something else, because I can't figure out
why it was commented out in the first place.
Use existing copy-tree if it's defined.
copy-sequence doesn't work; the
c-offsets-alist must be copied recursively. Use copy-tree solution
given by Simon Marshall.
(cc-imenu-c++-generic-expression): Patches to better match C++ code.
Given by jan.dubois@ibm.net (Jan Dubois)
(cc-imenu-java-generic-expression):
Removed test for declaration
statements. Patch given by Ake Stenhoff <etxaksf@aom.ericsson.se>, as
forwarded to me by RMS.
Imenu support for Objective-C given by Masatake (jet) YAMATO.
could make compilation-parse-errors loop infinitely. Each round
of the parsing loop now either moves point ahead at least a line
or sets `found-desired' to true to stop the loop.
error results when buffer contains only a comment and point is at eob.
(c-inside-bracelist-p): Add a test to the enum list test so that enum
in a k&r arg decl doesn't confuse handling of the function body.
handle M-e moving forward into a comment when looking at preceding
whitespace, and M-a moving backward into comment when looking at
following whitespace.
(c-comment-line-break-function): Don't break line in the middle of a string.
(hif-less-equal): New functions.
(hif-tokenize): Handle new tokens >, <, >=, <=.
(hif-eq-expr): Handle parsing these new tokens.
(hif-token-regexp): Match >, <. >=, <=
Also, put permanent-local property on variable so it's value won't get
killed by kill-all-local-variables. This makes it easier for non-CC
Mode derived modes to be initialized correctly.
(c++-mode, java-mode, objc-mode, idl-mode):
Remove obsolete variable c-double-slash-is-comments-p.
Move `/' as an electric character
from c++-mode-map to c-mode-base-map for all languages.
(c-common-init): Set comment-multi-line and
comment-line-break-function here for all modes.
Make comment-line-break-function buffer local iff it's boundp.
(c-C-comment-start-regexp): Obsolete.
(c-comment-start-regexp): Initialize from c-C++-comment-start-regexp.
(c-populate-syntax-table, c-setup-dual-comments): Merge both functions
into c-populate-syntax-table. With the new 9X draft C standard, both
line and block oriented comments are supported in all modes, so always
set up the syntax tables to support both comment styles.
(c-enable-//-in-c-mode): Obsolete.
(c++-mode-syntax-table, java-mode-syntax-table)
(objc-mode-syntax-table, idl-mode-syntax-table): Added autoload
cookies. c-mode-syntax-table already has one. Use the new syntax
table initialization idioms.
(c-initialize-cc-mode): Require 'cc-mode-19
if functionp is not bound. Check cc-mode-19 interface requirements.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode):
Don't set comment-multi-line here.
(c-mode): c-comment-start-regexp uses
c-C++-comment-start-regexp to support line oriented comments.
don't have the variable comment-line-break-function.
(c-electric-slash): Make this work as the final slash in a */ block
oriented comment closing token.
(c-comment-line-break-function): New function for proposed
mode-specific comment-line-break-function variable.
(c-initialize-cc-mode): Move the calling of
c-make-styles-buffer-local into c-initialize-builtin-style.
(c-initialize-cc-mode): Run the c-initialization-hook, but only once
per Emacs session.
on a semi following a close brace.
(c-guess-basic-syntax): CASE 5I: When adding 'inclass syntax, use the
relpos pointing to the class opening brace, unless that hangs on the
right side, in which case, use the start of the class/struct keyword.
First character must be a letter or underscore.
(c-styles-are-initialized): Variable deleted.
(c-common-init): Don't initialize styles here.
(idl-mode-abbrev-table): New variable.
(idl-mode-map, idl-mode-syntax-table): New variables.
(c-idl-menu): New menu.
(pascal-indent-case): Removed unnecessary calls to marker-position.
(pascal-indent-declaration): Editing a parameterlist at the end of
a buffer does not hang. Removed unnecessary call to marker-position.
(pascal-get-lineup-indent): Removed unused variable.
Now indents parameterlist correctly.
(pascal-completion-response): Removed unused variable.
Just make (background-color . COLOR).
(cpp-highlight-buffer): Don't die if buffer-invisibility-spec is t.
(cpp-face-default-list): Doc fix, fix custom type.
(c-electric-backspace): Must get 'supercede property
values to work with delsel and pending-del.
(c-electric-brace): Fix ebola eradication consequence
in the preserve-p test.
(c-symbol-key): First character must be a letter or underscore.
(c-make-inherited-keymap): Change to a defun.
(c-mode-menu): Added uncomment region and slight rearrangement of items.
Put defcustom's into this group.
(scheme-mode-commands): Remove keybinding of \t to old `scheme-indent-line'.
Bind \e\C-q to `indent-sexp', not `scheme-indent-sexp'.
(scheme-mit-dialect): Use defcustom.
(dsssl-sgml-declaration): Likewise. Fix doc string.