Commit graph

46 commits

Author SHA1 Message Date
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
Karl Heuer
e945e87d7f (hide-ifdef-syntax-table): New variable.
(hif-tokenize): Use it.
(hide-ifdef-mode): Don't clobber `c-mode-syntax-table'.
1994-05-07 01:42:48 +00:00
Richard M. Stallman
36f063e869 (show-ifdefs, hide-ifdefs): Bind inhibit-read-only.
Set buffer-read-only directly.
(hide-ifdef-block): Likewise.
(show-ifdef-block): Bind inhibit-read-only; don't set buffer-read-only.

Delete bindings for C-c C-f, C-c C-b, C-c C-u, C-c C-d,
C-c C-p and C-c C-n.  Move C-c C-h to C-c C-d.
(define-hide-ifdef-mode-map): Remove this code
from a function and execute it at load time.
(hide-ifdef-mode-submap): New variable holds the list of commands.
(hide-ifdef-mode-map): Set this up with a prefix key
and put it in minor-mode-map-alist.
(hide-ifdef-mode-map-before): Variable deleted.
(hide-ifdef-mode): Use force-mode-line-update.
Delete the code to manipulate keymaps.

(define-hide-ifdef-mode-map):
Pass (keymap) as KEYMAP arg to where-is-internal.
1994-05-04 23:20:44 +00:00
Richard M. Stallman
ae34566ab4 (hif-tokenize): Handle // comments after #if. 1994-01-11 05:47:14 +00:00
Jim Blandy
eb8c3be94e Apply typo patches from Paul Eggert. 1993-06-09 11:59:12 +00:00
Richard M. Stallman
81b2711286 (define-hide-ifdef-mode-map): Don't bind C-c LETTER.
Use C-c ESC LETTER instead.
Handle case where where-is-internal returns nil.
1993-06-03 19:35:54 +00:00
Eric S. Raymond
e41b2db1da Added or corrected Commentary sections 1993-03-22 03:27:18 +00:00
Christopher Zaborsky
579e495a70 Doc fix. 1992-10-25 21:05:35 +00:00
Jim Blandy
fbfed6f05f entered into RCS 1992-08-19 03:54:46 +00:00
Jim Blandy
0b030df78b *** empty log message *** 1992-08-04 04:09:07 +00:00
Richard M. Stallman
c9ed5a4721 *** empty log message *** 1992-07-29 05:22:04 +00:00
Jim Blandy
067ffa38a5 *** empty log message *** 1992-07-22 21:20:04 +00:00
Eric S. Raymond
3a801d0c71 *** empty log message *** 1992-07-22 04:22:42 +00:00
Eric S. Raymond
fd7fa35a05 *** empty log message *** 1992-07-17 08:15:29 +00:00
Eric S. Raymond
fc68affa4e *** empty log message *** 1992-07-16 07:28:05 +00:00
Eric S. Raymond
1a06eabd17 *** empty log message *** 1992-05-30 23:12:08 +00:00
Jim Blandy
073c95314f *** empty log message *** 1991-03-06 21:14:11 +00:00
Richard M. Stallman
175ce21873 Initial revision 1989-08-05 03:56:31 +00:00