Commit graph

117 commits

Author SHA1 Message Date
Dan Nicolaescu
61acee9902 * progmodes/asm-mode.el (asm-mode-map):
* progmodes/hideif.el (hide-ifdef-mode-menu): Add :help.

* progmodes/m4-mode.el (m4-mode-map): Add menu.
2008-04-21 05:02:06 +00:00
Stefan Monnier
fb970f91df (hif-factor): Handle unary minus. 2008-04-12 04:38:45 +00:00
Stefan Monnier
d302e5cfe3 (hif-token-alist): New var.
(hif-token-regexp, hif-tokenize): Use it.
(hif-mathify-binop): New macro.
(hif-plus, hif-minus, hif-notequal, hif-greater, hif-less)
(hif-greater-equal, hif-less-equal): Use it.
(hif-logior, hif-logand): New functions.
(hif-math): Accept | and & as well.
2008-04-05 03:32:05 +00:00
Glenn Morris
881c0f33dd Remove out-of-date section of commentary. 2008-01-24 04:46:59 +00:00
Martin Rudalics
c23346134d (hide-ifdef-shadow): Add version number for defcustom.
(hide-ifdef-shadow): Add version number for defface.
2008-01-23 10:29:49 +00:00
Glenn Morris
0dedb2bee0 (hide-ifdef-initially, hide-ifdef-read-only)
(hide-ifdef-lines, hide-ifdef-shadow, hide-ifdef-shadow):
Remove autoload cookies.
2008-01-22 06:56:23 +00:00
Glenn Morris
adcc05dc92 Move defcustoms and defface to start of file. 2008-01-21 04:46:12 +00:00
Martin Rudalics
f3a221cf73 (hide-ifdef-shadow): New option.
(hide-ifdef-shadow): New face.
(hide-ifdef-toggle-shadowing): New function to toggle between
shadowing and making code invisible.
(hide-ifdef-mode-submap): Add binding for
hide-ifdef-toggle-shadowing.
(hide-ifdef-mode-menu): Add entry for
hide-ifdef-toggle-shadowing.
(hide-ifdef-region-internal): Give new overlay hide-ifdef
property.  Shadow text when hide-ifdef-shadow is non-nil.
(hif-show-ifdef-region): Remove overlays with hide-ifdef
property set.
(hif-hide-line): Use when instead of if.
(hide-ifdef-initially, hide-ifdef-read-only, hide-ifdef-lines):
Remove unneeded * from doc-strings.
2008-01-19 16:29:08 +00:00
Glenn Morris
4e643dd23c Add 2008 to copyright years. 2008-01-07 02:11:00 +00:00
Nick Roberts
47aef245fc (hide-ifdef-mode-menu): Put hide-ifdef commands
on menu bar.
2008-01-06 21:29:20 +00:00
Glenn Morris
1a484753b2 Switch license to GPLv3 or later. 2007-07-25 04:29:40 +00:00
Glenn Morris
d7a0267c8d Add 2007 to copyright years. 2007-01-21 03:53:13 +00:00
Eli Zaretskii
d689858f8a (show-ifdef-block): Fix bug where parts of a hidden block remained hidden if
`hide-ifdef-lines' is non-nil.
2006-05-20 17:27:07 +00:00
Nick Roberts
d91362c9e0 Update copyright for 2006. 2006-02-10 09:00:31 +00:00
Nick Roberts
034babe1e1 Update copyright for release of 22.1 for progmodes directory. 2005-08-01 08:43:45 +00:00
Stefan Monnier
521b27480a (hide-ifdef-use-define-alist): Pass a list of
strings rather than a list of symbols to the completion function.
2005-07-07 04:31:17 +00:00
Lute Kamstra
3a35cf56e7 Update FSF's address. 2005-07-04 17:55:18 +00:00
Lute Kamstra
0f06a4df3f (hide-ifdef-mode): Specify :group. 2005-04-04 09:25:36 +00:00
Kim F. Storm
48d66f99eb (hide-ifdef-use-define-alist): Use
completing-read.  Suggested by Juan-Leon Lahoz Garcia.
2005-02-22 20:52:39 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Juanma Barranquero
a1506d2977 Trailing whitepace deleted. 2003-02-04 13:24:35 +00:00
Andreas Schwab
2dc2ec3d49 Augment expression parser to handle conditional expressions. 2002-03-06 15:12:01 +00:00
Stefan Monnier
f1259a53b0 (hif-nexttoken): Move to before first def. 2001-12-01 18:20:52 +00:00
Stefan Monnier
f71d927d8b (hide-ifdef-mode): Only modify
`change-major-mode-hook' locally.  Reset invisibility spec.
2001-11-30 23:58:24 +00:00
Stefan Monnier
5b5907acb7 Fix copyright year. 2001-11-28 20:55:38 +00:00
Stefan Monnier
722fa77ffa (hif-end-of-line): New function.
(hide-ifdef-mode): Set line-move-ignore-invisible.
(hide-ifdef-region-internal): New function.
(hide-ifdef-region): Use it.
(hif-defined): Return an integer.
(hif-infix-to-prefix): Remove.
(hif-tokenize): Parse from the buffer rather than from a string.
Correctly tokenize integers.  Use forward-comment.
(hif-expr): Use hif-or.
(hif-term): Use hif-and.
(hif-factor): Use hif-not.  Handle numbers properly.
Don't require parenthesis around `defined's argument.
(hif-and, hif-or, hif-not): New funs.
(hif-canonicalize): Pass a region to hif-tokenize.  Use hif-not.
(hif-hide-line): Don't hide the \n before the line.
(hif-possibly-hide): Correctly handle numeric evaluation results.
2001-11-28 20:53:28 +00:00
Stefan Monnier
067d92a1b8 Misc cleanup.
(hide-ifdef-mode-submap): Put the def in the defvar.
Use substitute-key-definition.
(hide-ifdef-mode): Use define-minor-mode.
(hif-outline-flag-region): Remove.
(hif-show-all): Define in terms of hif-show-ifdef-region.
(hif-after-revert-function): Rename from hif-before-revert-function.
(hide-ifdef-region, hif-show-ifdef-region): Use overlays.
(hif-tokenize): Use with-syntax-table.
(hif-make-range): Use `else' also for `else-p'.
(hif-range-else-p): Remove.
(hif-find-range): Simplify.
(hif-hide-line): Don't bother preserving buffer-modified-p.
(hide-ifdefs, show-ifdefs, hide-ifdef-block, show-ifdef-block):
Don't use selective-display and inhibit-read-only.
2001-11-28 04:12:47 +00:00
Pavel Janík
5553563924 Some fixes to follow coding conventions in files maintained by FSF. 2001-07-15 16:15:35 +00:00
Gerd Moellmann
f367dfc1d6 Change authors' mail address. 2000-08-15 12:39:23 +00:00
Gerd Moellmann
482bb01b8b Correct author's email address. Fix typo in comment. 2000-07-19 15:51:05 +00:00
Stefan Monnier
16fdbdceda (hif-compress-define-list)
(hide-ifdef-use-define-alist): Don't quote lambda.
2000-06-12 05:22:26 +00:00
Gerd Moellmann
d8f1319a79 Use new backquote syntax. 1999-11-21 14:50:21 +00:00
Dave Love
b6339cee8e (hide-ifdef-mode): Add autoload cookie. 1999-09-13 22:43:15 +00:00
Andreas Schwab
4e391a67d1 (hide-ifdef-env, hif-outside-read-only):
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.
1998-10-13 09:52:54 +00:00
Andreas Schwab
28d16ed35b Customized. 1998-01-26 11:29:46 +00:00
Richard M. Stallman
958ef4fe21 (hif-greater, hif-less, hif-greater-equal)
(hif-less-equal): New functions.
(hif-tokenize): Handle new tokens >, <, >=, <=.
(hif-eq-expr): Handle parsing these new tokens.
(hif-token-regexp): Match >, <. >=, <=
1997-08-25 17:06:42 +00:00
Richard M. Stallman
2fe16d3bc0 (hif-token-regexp): Move ! after !=. 1996-09-13 21:53:55 +00:00
Richard M. Stallman
46b9324699 (hide-ifdef-mode): Doc fix. 1996-05-05 17:27:24 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
46c63acf93 Comment fix. 1996-01-05 00:05:12 +00:00
Richard M. Stallman
3edc14ae84 (hide-ifdefs): Set hif-outside-read-only here. 1995-12-25 21:03:10 +00:00
Richard M. Stallman
f5356416e9 Many doc fixes.
(hide-ifdefs): New arg NOMSG.
(hif-before-revert-function): New function.  Put on after-revert-hook.
1995-12-25 20:44:18 +00:00
Richard M. Stallman
048fb1b748 Provide hideif; require cc-mode. 1995-10-26 03:13:43 +00:00
Richard M. Stallman
539fbabbec (hide-ifdef-hiding): Delete duplicate defvar. 1995-08-27 17:18:05 +00:00
Richard M. Stallman
0f21f770b2 (hide-ifdef-mode-prefix-key): Change to C-c @.
(hide-ifdef-mode-submap): Get rid of \e from all bindings.
1995-05-02 03:57:27 +00:00
Karl Heuer
c63e0f9a7d (hide-ifdef-toggle-read-only): Use force-mode-line-update.
(hide-ifdef-toggle-outside-read-only): Use force-mode-line-update.
1995-04-25 22:29:17 +00:00
Richard M. Stallman
612abcae5d Comment change. 1995-04-14 23:24:11 +00:00
Richard M. Stallman
7bbe1dea3b Handle ==, !=, + and -.
(hif-tokenize): Handle ==, !=, + and -.
(hif-token-regexp): Handle ==, !=, + and -.
(hif-notequal, hif-plus, hif-minus, hif-mathify): New functions.
(hif-math, hif-eq-expr): New functions.
(hif-term): Call hif-eq-expr.
(hide-ifdef-define): Pass 1 to hif-set-var.
1994-09-19 05:29:15 +00:00
Richard M. Stallman
d1fa6affef (hide-ifdefs): Doc fix. 1994-07-29 20:00:00 +00:00
Richard M. Stallman
260600e5fb (minor-mode-map-alist): Add missing quote. 1994-06-30 19:21:03 +00:00