Chong Yidong
7600cf4599
Fix a cc-cmds.el patch from acm that I applied incorrectly (Bug#7595).
...
* lisp/progmodes/cc-cmds.el (c-beginning-of-statement): Fix incorrect
application of patch from Alan Mackenzie (Bug#7595).
2011-03-07 15:29:03 -05:00
Alan Mackenzie
bdfbdbb219
(c-end-of-statement): Set macro-end correctly at the end of a loop.
2011-02-20 18:36:29 +00:00
Chong Yidong
14beddf471
Merge changes from emacs-23 branch
2011-01-31 18:54:50 -05:00
Alan Mackenzie
3b95603fb5
Fix an infloop in CC-mode (Bug#7595).
...
* progmodes/cc-cmds.el (c-forward-over-illiterals): Continue
parsing if we encounter a naked # (Bug#7595).
(c-beginning-of-statement): Avoid loop in locating the beginning
of a macro.
2011-01-31 18:07:43 -05:00
Glenn Morris
95df8112a0
Refill some long/short copyright headers.
2011-01-26 00:36:39 -08:00
Glenn Morris
73b0cd5003
Convert consecutive FSF copyright years to ranges.
2011-01-24 20:08:28 -08:00
Glenn Morris
0d9f702fd0
Nuke arch-tags.
2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054
Merge from emacs-23
2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3
Add 2011 to FSF/AIST copyright years.
2011-01-02 15:50:46 -08:00
Stefan Monnier
175069efeb
Derive from prog-mode, use derived-mode-p, and fix up various
...
minor style issues in lisp/progmodes.
* lisp/progmodes/vhdl-mode.el (vhdl-write-file-hooks-init)
(vhdl-hs-minor-mode, vhdl-ps-print-init): Fix make-local-variable ->
make-local-hook.
* lisp/progmodes/sh-script.el (sh-require-final-newline): Remove.
(sh-set-shell): Don't set require-final-newline since it's already done
by prog-mode.
* lisp/progmodes/modula2.el (m2-mode): Don't make m2-end-comment-column
since we never set it.
* lisp/progmodes/ebrowse.el (ebrowse-set-tree-indentation):
Use read-string and standard prompt.
* lisp/progmodes/dcl-mode.el (dcl-mode-map): Move init into declaration.
* lisp/progmodes/meta-mode.el (meta-mode-abbrev-table): Merge init and decl.
(meta-common-mode-syntax-table): Rename from meta-mode-syntax-table.
(meta-common-mode-map): Rename from meta-mode-map.
Remove C-m binding, which is a user preference, not mode specific.
(meta-common-mode): New major mode; replace meta-common-initialization.
* lisp/progmodes/js.el (js-mode): Call syntax-propertize rather than messing
around with font-lock.
* lisp/progmodes/etags.el (select-tags-table-mode):
Derive from special-mode.
* lisp/progmodes/octave-mod.el (octave-mode):
* lisp/progmodes/gdb-mi.el (gdb-inferior-io-mode, gdb-threads-mode)
(gdb-memory-mode, gdb-disassembly-mode, gdb-breakpoints-mode)
(gdb-frames-mode, gdb-locals-mode, gdb-registers-mode):
Let define-derived-mode do its job.
* lisp/progmodes/cpp.el (cpp-edit-mode-map):
Move initialization into declaration.
(cpp-edit-mode): Use define-derived-mode.
(cpp-edit-load): Use derived-mode-p.
* lisp/progmodes/mixal-mode.el (mixal-mode):
* lisp/progmodes/f90.el (f90-mode):
* lisp/progmodes/cfengine.el (cfengine-mode): Don't bother setting
require-final-newline since prog-mode does it already.
* lisp/progmodes/cc-cmds.el (c-update-modeline): Use match-string.
* lisp/progmodes/asm-mode.el (asm-mode-map): Fix menu setup.
* lisp/progmodes/antlr-mode.el: Require cc-mode upfront.
(antlr-mode-syntax-table, antlr-action-syntax-table): Initialize in
the declaration.
(antlr-directory-dependencies, antlr-show-makefile-rules):
Use derived-mode-p.
(antlr-language-option): Don't assume point-min==1.
(antlr-mode): Use define-derived-mode.
* lisp/progmodes/ada-mode.el: Use derived-mode-p.
(ada-mode): Use define-derived-mode.
Use hack-local-variables-hook.
* lisp/progmodes/vhdl-mode.el (vhdl-mode):
* lisp/progmodes/verilog-mode.el (verilog-mode):
* lisp/progmodes/vera-mode.el (vera-mode):
* lisp/progmodes/sql.el (sql-mode):
* lisp/progmodes/scheme.el (scheme-mode):
* lisp/progmodes/perl-mode.el (perl-mode):
* lisp/progmodes/octave-inf.el (inferior-octave-mode):
* lisp/progmodes/autoconf.el (autoconf-mode):
* lisp/progmodes/m4-mode.el (m4-mode):
* lisp/progmodes/inf-lisp.el (inferior-lisp-mode):
* lisp/progmodes/idlwave.el (idlwave-mode):
* lisp/progmodes/icon.el (icon-mode):
* lisp/progmodes/idlw-help.el (idlwave-help-mode):
* lisp/progmodes/dcl-mode.el (dcl-mode):
* lisp/progmodes/idlw-shell.el (idlwave-shell-mode):
* lisp/progmodes/ebrowse.el (ebrowse-tree-mode, ebrowse-electric-list-mode)
(ebrowse-member-mode, ebrowse-electric-position-mode):
Use define-derived-mode.
* lisp/progmodes/xscheme.el (xscheme-start)
(local-set-scheme-interaction-buffer, scheme-interaction-mode):
* lisp/progmodes/which-func.el (which-function):
* lisp/progmodes/vhdl-mode.el (vhdl-set-style):
* lisp/progmodes/verilog-mode.el (verilog-set-compile-command)
(verilog-modify-compile-command, verilog-error-regexp-add-xemacs)
(verilog-set-define, verilog-auto-reeval-locals):
* lisp/progmodes/sql.el (sql-product-font-lock, sql-interactive-mode):
* lisp/progmodes/simula.el (simula-mode):
* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode):
* lisp/progmodes/python.el (python-check, python-mode):
* lisp/progmodes/prolog.el (prolog-mode-variables):
* lisp/progmodes/gud.el (gud-tooltip-activate-mouse-motions):
* lisp/progmodes/ebrowse.el (ebrowse-view-file-other-frame):
* lisp/progmodes/delphi.el (delphi-mode):
* lisp/progmodes/cc-styles.el (c-setup-paragraph-variables):
* lisp/progmodes/cc-mode.el (c-basic-common-init, c-common-init)
(c-font-lock-init): Move make-local-variable to their setq.
* lisp/progmodes/xscheme.el (exit-scheme-interaction-mode)
(xscheme-enter-interaction-mode, xscheme-enter-debugger-mode)
(xscheme-debugger-mode-p, xscheme-send-string-1):
* lisp/progmodes/tcl.el (inferior-tcl-proc, tcl-current-word)
(tcl-load-file, tcl-restart-with-file):
* lisp/progmodes/ps-mode.el (ps-run-running):
* lisp/progmodes/gdb-mi.el (gud-watch, gdb-mouse-set-clear-breakpoint):
* lisp/progmodes/js.el (js--get-all-known-symbols):
* lisp/progmodes/inf-lisp.el (inferior-lisp-proc):
* lisp/progmodes/idlwave.el (idlwave-beginning-of-statement)
(idlwave-template, idlwave-update-buffer-routine-info)
(idlwave-update-current-buffer-info)
(idlwave-get-routine-info-from-buffers, idlwave-choose)
(idlwave-scan-class-info, idlwave-fix-keywords)
(idlwave-list-buffer-load-path-shadows):
* lisp/progmodes/idlw-toolbar.el (idlwave-toolbar, idlwave-toolbar-add)
(idlwave-toolbar-remove):
* lisp/progmodes/idlw-shell.el (idlwave-shell-save-and-action)
(idlwave-shell-file-name, idlwave-shell-electric-debug-all-off)
(idlwave-shell-menu-def):
* lisp/progmodes/idlw-complete-structtag.el
(idlwave-prepare-structure-tag-completion):
* lisp/progmodes/gud.el (gud-set-buffer):
* lisp/progmodes/f90.el (f90-backslash-not-special):
* lisp/progmodes/delphi.el (delphi-find-unit): Use derived-mode-p.
2010-12-10 15:00:25 -05:00
Alan Mackenzie
e6ef5dd9ce
progmodes/cc-cmds.el (c-mask-paragraph): Fix an off-by-1 error. Fixes
...
bug #7185 .
2010-10-31 11:54:02 +00:00
Chong Yidong
bd78fa1d54
Add "Package:" file headers to denote built-in packages.
2010-08-29 12:17:13 -04:00
Alan Mackenzie
bd4c5e3e06
cc-cmds.el (c-mask-paragraph, c-fill-paragraph): Fix for the case that a
...
C style comment has its delimiters alone on their respective lines.
2010-08-06 19:48:59 +00:00
Alan Mackenzie
28e5cf7c6a
cc-cmds.el (c-mask-paragraph): Fix bug #6688 , Auto-fill broken in C/C++
...
modes.
2010-07-31 09:39:24 +00:00
Alan Mackenzie
38d93f03c7
* progmodes/cc-cmds.el (c-beginning-of-defun, c-end-of-defun):
...
Push the mark at the start of these functions when appropriate.
2010-05-12 11:06:12 +00:00
Alan Mackenzie
7af4bf3aea
Reverse change 2010-02-04T21:15:37Z!acm@muc.de: "Change strategy for marking < and > as template
...
delimiters: mark them strictly in matching pairs."
2010-04-12 15:15:07 +00:00
Alan Mackenzie
dd969a56a5
Change strategy for marking < and > as template delimiters: mark them
...
strictly in matching pairs.
2010-02-04 21:15:37 +00:00
Glenn Morris
114f9c9679
Add 2010 to copyright years.
2010-01-13 00:35:10 -08:00
Tassilo Horn
a9b76eec39
* progmodes/cc-cmds.el (c-forward-into-nomenclature)
...
(c-backward-into-nomenclature): Adapt to subword renaming.
* subword.el (subword-forward, subword-backward, subword-mark)
(subword-kill, subword-backward-kill, subword-transpose)
(subword-downcase, subword-upcase, subword-capitalize)
(subword-forward-internal, subword-backward-internal): Renamed
from forward-subword, backward-subword, mark-subword kill-subword,
backward-kill-subword, transpose-subwords, downcase-subword,
upcase-subword, capitalize-subword forward-subword-internal,
backward-subword-internal.
2009-11-20 18:09:29 +00:00
Tassilo Horn
ab84bfa00e
* progmodes/cc-cmds.el: declare-functioned forward-subword and
...
backward-subword to quit the byte-compiler.
2009-11-20 14:28:54 +00:00
Tassilo Horn
653d15547a
2009-11-20 Tassilo Horn <tassilo@member.fsf.org>
...
* progmodes/cc-cmds.el (c-update-modeline)
(c-forward-into-nomenclature, c-backward-into-nomenclature): Refer
to subword.el functions instead of cc-subword.el.
* progmodes/cc-mode.el (subword-mode, c-mode-base-map): Refer to
subword.el functions instead of cc-subword.el.
* progmodes/cc-subword.el: Renamed to subword.el.
* subword.el: Renamed from progmodes/cc-subword.el.
(subword-mode-map): Renamed from c-subword-mode-map.
(subword-mode): Renamed from c-subword-mode.
(global-subword-mode): New global minor mode.
(forward-subword): Renamed from c-forward-subword.
(backward-subword): Renamed from c-backward-subword.
(mark-subword): Renamed from c-mark-subword.
(kill-subword): Renamed from c-kill-subword.
(backward-kill-subword): Renamed from c-backward-kill-subword.
(transpose-subwords): Renamed from c-tranpose-subword.
(downcase-subword): Renamed from c-downcase-subword.
(capitalize-subword): Renamed from c-capitalize-subword.
(forward-subword-internal): Renamed from
c-forward-subword-internal.
(backward-subword-internal): Renamed from
c-backward-subword-internal.
2009-11-20 08:22:32 +00:00
Alan Mackenzie
0a218d34a2
(c-scan-conditionals): A new function like c-forward-conditionals, but it
...
doesn't move point and doesn't set the mark.
(c-up-conditional, c-up-conditional-with-else, c-down-conditional)
(c-down-conditional-with-else, c-backward-conditional)
(c-forward-conditional): Refactor to use c-scan-conditionals.
2009-09-24 20:19:58 +00:00
Stefan Monnier
efbc652a8f
* progmodes/cc-vars.el (c-comment-continuation-stars):
...
* progmodes/cc-engine.el (c-looking-at-bos):
* progmodes/cc-cmds.el (c-toggle-auto-state)
(c-forward-into-nomenclature, c-backward-into-nomenclature)
(c-comment-line-break-function): Add version of obsolescence.
2009-08-29 02:07:42 +00:00
Alan Mackenzie
2b78d42cb5
(c-mask-paragraph): Remove a spurious correction between the visible
...
width of TABs and their number of bytes, so that point is undisturbed
after typing a space, when there are tabs just before "*/".
2009-06-29 14:44:04 +00:00
Alan Mackenzie
649504a17b
(c-defun-name): Widen, to allow it to work in narrowed buffers.
2009-02-13 14:54:27 +00:00
Chong Yidong
21d461130e
Minor doc fix.
2009-01-25 21:31:49 +00:00
Glenn Morris
5858f68cd1
Comment (minor header format fixes).
2009-01-11 00:37:05 +00:00
Glenn Morris
1ba983e8d9
Replace last-command-char with last-command-event.
2009-01-09 04:23:38 +00:00
Glenn Morris
ae940284fa
Add 2009 to copyright years.
2009-01-05 03:18:22 +00:00
Sam Steingold
55d150f329
(c-defun-name): Handle DEFFOO(name,...),
...
mostly for CLISP modules, but could also be useful elsewhere.
2008-12-15 18:31:59 +00:00
Sam Steingold
3f71582da6
(c-defun-name): Fix CLISP DEFUN handling.
2008-11-07 15:39:53 +00:00
Alan Mackenzie
4588b317cd
(c-defun-name): Make it work for "struct foo bar [] = { ...".
2008-10-17 20:24:45 +00:00
Alan Mackenzie
9644a7dac3
(c-indent-region): Fix previous patch so that the function works on
...
one-line macros.
2008-10-13 18:34:05 +00:00
Alan Mackenzie
24f15006fe
(c-indent-region): Fix so that indenting a macro followed by blank lines
...
doesn't backslash the following non-blank line into the macro.
2008-10-07 13:14:17 +00:00
Glenn Morris
b1fc2b5014
Switch to recommended form of GPLv3 permissions notice.
2008-05-06 07:25:26 +00:00
Stefan Monnier
cbee283dd7
Fix up comment convention on the arch-tag lines.
2008-04-10 14:10:46 +00:00
Alan Mackenzie
fa7056bcee
(c-defun-name, c-cpp-define-name): New optimised functions to get the
...
name of the current defun/macro.
2008-04-02 21:24:30 +00:00
Alan Mackenzie
4fae8922be
Introduce elements for the syntactic symbol arglist-cont-nonempty into
...
c-hanging-braces-alist. Amend pertinent functions and 5 styles.
2008-01-27 13:59:47 +00:00
Miles Bader
59ce725a3b
Merge from emacs--rel--22
...
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-987
2008-01-08 20:46:54 +00:00
Glenn Morris
4e643dd23c
Add 2008 to copyright years.
2008-01-07 02:11:00 +00:00
Richard M. Stallman
c02a1ee94d
(c-indent-line-or-region):
...
Pass prefix arg to `c-indent-command'. Use `use-region-p'.
2007-12-25 22:14:07 +00:00
Martin Rudalics
dc56b2ba13
(c-mask-paragraph): Avoid invalid search
...
bound error in block comment branch.
2007-12-08 09:55:50 +00:00
Glenn Morris
6b7513e304
(top level): Use mapc rather than mapcar.
2007-10-13 03:01:31 +00:00
Dan Nicolaescu
62035afde2
(c-indent-line-or-region): Only indent the
...
region if in transient-mark-mode.
2007-09-26 03:18:21 +00:00
Glenn Morris
1a484753b2
Switch license to GPLv3 or later.
2007-07-25 04:29:40 +00:00
Richard M. Stallman
c05ddcf77b
Whitespace change.
2007-04-22 16:53:13 +00:00
Alan Mackenzie
0abe900ba1
(c-electric-slash): Replace wrong use of `kill-region' by
...
`delete-region'.
2007-04-21 20:05:53 +00:00
Alan Mackenzie
8007b73c14
(c-in-function-trailer-p): Fix this: when a function return type contains
...
"struct", "union", etc. c-end-of-defun goes too far forward.
2007-04-19 17:35:16 +00:00
Alan Mackenzie
f7510c4036
(c-beginning-of-defun): With -ve arg and point too close to EOB, leave
...
point at EOB rather than last `}'.
2007-04-17 20:48:43 +00:00
Alan Mackenzie
28abe5e279
Changes to make narrow-to-defun' and
mark-defun' work properly in CC
...
Mode:
cc-defs.el (c-beginning-of-defun-1):
cc-cmds.el (c-beginning-of-defun, c-end-of-defun): bind
beginning/end-of-defun-function to nil around calls to
beginning/end-of-defun.
cc-langs.el (beginning-of-defun-function, end-of-defun-function): new
c-lang-setvar's.
cc-awk.el (c-awk-beginning-of-defun): Add "(or arg (setq arg 1))" to
enable non-interactive call.
2007-04-09 10:51:29 +00:00