1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-23 10:34:07 +00:00
Commit Graph

54 Commits

Author SHA1 Message Date
Stefan Monnier
e8a12926bb (easy-mmode-define-navigation): Use a more robust check of widening. 2004-01-27 22:54:45 +00:00
Thien-Thi Nguyen
877f9b0513 (easy-mmode-define-navigation): Take additional
optional arg NARROWFUN.  For the generated functions: Add local var
`was-narrowed-p'.  Also, if NARROWFUN is specified, include frags that
arrange to check for and save narrowing state before the move and then
conditionally call NARROWFUN after the move.
2003-11-14 16:18:01 +00:00
Dave Love
6c119ac0b4 (easy-mmode-define-navigation): Avoid
incf in macro expansion.
2003-10-20 19:07:02 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Andreas Schwab
8fd9bef258 (easy-mmode-define-navigation): Avoid
variable as format argument for error.  Don't call symbol-name on
string.
2003-06-22 16:55:47 +00:00
Stefan Monnier
2e2a00756f (define-minor-mode): Add edebug spec.
Accept a :keymap argument, as you'd expect.
2003-05-29 21:54:35 +00:00
Stefan Monnier
eb81f2758f (define-minor-mode): Only echo a message if the body didn't do so already.
(easy-mmode-define-keymap): Remove unused var `suppress'.
2003-04-18 17:31:05 +00:00
Stefan Monnier
73ceba9f1a (define-minor-mode): Use custom-set-minor-mode.
Pass unknown keyword args blindly to defcustom.
2003-03-24 17:41:43 +00:00
Juanma Barranquero
a1506d2977 Trailing whitepace deleted. 2003-02-04 13:24:35 +00:00
Markus Rost
dce88ea679 (define-minor-mode): Use `custom-current-group'.
Pass all groups to the hook.
(easy-mmode-define-global-mode): Use `custom-current-group'.
2002-12-13 23:54:45 +00:00
Richard M. Stallman
a6ce686959 (define-minor-mode): Doc fix. 2002-10-07 22:49:39 +00:00
Stefan Monnier
bb76239ba1 (define-minor-mode): Don't add properties
to the name since they're added by mode-line-format already.
(define-minor-mode): Run (,mode -1) when needed.
2002-09-27 21:12:12 +00:00
Stefan Monnier
c8fb3bf9c6 (define-minor-mode): Add a :require arg.
Don't call the function during init if mode is on by default.
2002-09-13 14:16:02 +00:00
Stefan Monnier
d99d3266b0 (define-minor-mode): Use customize-mark-as-set for global minor modes. 2002-08-26 16:40:49 +00:00
Stefan Monnier
5ddfa187e9 (easy-mmode-define-global-mode): Use find-file-hook instead of find-file-hooks.
(define-minor-mode): Get rid of this silly `togglep'.
Add an explicit `toggle' argument (used for interactive calls).
Emit a warning when a nil argument turns the mode off.
2002-08-15 01:06:05 +00:00
Richard M. Stallman
0256550475 (easy-mmode-define-global-mode): Put `definition-name' properties on
the functions whose names are constructed.
2002-08-13 01:49:13 +00:00
Richard M. Stallman
3881a18674 (define-minor-mode): Use "P" in interactive spec of minor mode commands. 2002-03-04 22:27:03 +00:00
Richard M. Stallman
d743da2643 (define-minor-mode): Make no arg by default in an interactive call,
so that repeating the command toggles again.
2001-12-21 14:12:30 +00:00
Gerd Moellmann
ed771c89bc (define-minor-mode): Use
mode-line-minor-mode-keymap for the minor mode name.
2001-08-09 14:54:05 +00:00
Pavel Janík
9781053a4c *** empty log message *** 2001-07-17 07:37:19 +00:00
Pavel Janík
e8af40eed4 Some fixes to follow coding conventions. 2001-07-16 12:23:00 +00:00
Stefan Monnier
851040a566 (define-minor-mode): Use eval-after-load
to delay the call to <mode> for global minor modes.
(easy-mmode-define-navigation): Only recenter if interactive.
2001-07-08 22:58:10 +00:00
Stefan Monnier
2a83a11dc1 (easy-mmode-defsyntax): Unquote `doc'. 2001-04-19 22:45:04 +00:00
Stefan Monnier
a2ed96700b (define-minor-mode): Docstring fix. 2001-01-25 15:31:14 +00:00
Stefan Monnier
8b262a6549 (define-derived-mode,easy-mmode-derived-mode-p): Remove (moved to derived.el). 2000-12-03 21:41:06 +00:00
Stefan Monnier
165958d2b4 (easy-mmode-define-keymap):
Add keyword arg :name.
2000-11-12 18:09:09 +00:00
Stefan Monnier
eed083e697 (easy-mmode-define-navigation):
Allow `next' to jump to after the end of the last match.
2000-11-09 23:51:59 +00:00
Stefan Monnier
34befa9a5b (easy-mmode-define-global-mode): Only turn mode off if it's on. 2000-11-03 04:38:41 +00:00
Stefan Monnier
0a74e3bf90 (define-minor-mode): Remove :toggle arg.
Correctly handle the case where several :group args are supplied.
Allow :extra-args.
(easy-mmode-define-global-mode): Allow :extra-args.
Correctly handle the case where several :group args are supplied.
2000-11-03 04:26:33 +00:00
Stefan Monnier
bff5341176 (define-minor-mode):
Revert the latest changes.
Allow the three positional arguments to be skipped and replaced
by keyword arguments.
Add a :toggle argument to determine whether a nil arg means toggle
or means turn-on.  The default is unchanged.
Add a call to force-mode-line-update.
2000-11-01 23:31:59 +00:00
Miles Bader
3ffa67e03d Doc fix. 2000-10-28 06:24:19 +00:00
Miles Bader
eab6e8b99b (define-minor-mode): Generate turn-on-MODE' and turn-off-MODE'
functions unless the mode is global.  If :global is followed by a
non-nil but non-t value, make the mode buffer-local, but also generate a
`global-MODE' version using `easy-mmode-define-global-mode'.  Add
:conditional-turn-on keyword argument.
2000-10-28 06:07:30 +00:00
Stefan Monnier
e4fe3460db (easy-mmode-define-syntax): Use plist-get and allow :inherit. 2000-10-15 05:25:57 +00:00
Miles Bader
09cb764685 (define-derived-mode): Tweak generated docstring parts. 2000-10-06 05:32:14 +00:00
Miles Bader
aa0c3dca64 (easy-mmode-define-navigation):
Call `recenter' with an arg to prevent redrawing the display.
2000-10-01 03:38:23 +00:00
Stefan Monnier
b643ec5311 (easy-mmode-pretty-mode-name): Prettier. 2000-10-01 00:58:35 +00:00
Stefan Monnier
5d78d57daf (easy-mmode-define-keymap): Autoload.
(easy-mmode-defmap): Remove the now useless autoload.
2000-09-29 03:27:28 +00:00
Stefan Monnier
cb5da1a31e (define-minor-mode): Use `symbol-value' to keep the byte-compiler quiet. 2000-08-16 20:16:33 +00:00
Stefan Monnier
1328a6dfa2 (define-minor-mode): If KEYMAP is a symbol, just use it.
Use byte-compile-current-file and load-file-name to infer the
proper :require to pass to defcustom.
Wrap the hook var into `progn' so as not to autoload it.
Add a :autoload-end cookie.
Be more careful about the evaluation of KEYMAP.
(easy-mmode-define-global-mode): Add a :autoload-end cookie.
(define-derived-mode): Move define-abbrev-table outside of defvar.
2000-06-11 04:55:57 +00:00
Stefan Monnier
d5b037c5bf (easy-mmode-define-global-mode): Autoload.
Use find-file-hooks in the minor-mode function.
Be careful not to loop indefinitely in the post-command-hook function.
2000-06-05 06:06:30 +00:00
Stefan Monnier
be22f4cc63 Require CL during compilation.
(easy-mmode-define-global-mode): New macro.
(define-minor-mode): Fix the handling of `group'.
(easy-mmode-define-keymap): Use case.
2000-06-04 23:40:58 +00:00
Stefan Monnier
b5bbbb7612 (easy-mmode-define-toggle): Remove (inline into define-minor-mode).
(easy-mmode-pretty-mode-name): Rename from easy-mmode-derive-name
and improve to use the lighter to guess the capitalization.
(define-minor-mode): Inline code from easy-mmode-define-toggle.
Add keyword arguments to specify global-ness or the custom group.
Add local-map and help-echo properties to the lighter.
(easy-mmode-define-navigation): Add the errors to debug-ignored-errors.
2000-06-04 20:59:47 +00:00
Stefan Monnier
3837de1250 (easy-mmode-derive-name): New function.
(easy-mmode-define-toggle, define-minor-mode): Use it.
(easy-mmode-define-keymap): Docstring fix.
(define-derived-mode): Default PARENT to fundamental-mode.
Add the derived-mode-parent symbol-property.
(easy-mmode-derived-mode-p): New function.
2000-06-02 23:07:08 +00:00
Stefan Monnier
c8c21615b8 Update copyright and commentary.
(easy-mmode-define-toggle): Deprecate the use of *-(on|off)-hook.
Print a status message if the toggle is called interactively.
(define-minor-mode): Allow INIT-VALUE to be (global . INIT-VALUE)
for global minor modes and use `defcustom' for them.
Use add-minor-mode.
(easy-mmode-define-derived-mode): Remove.
(define-derived-mode): Fancier default docstring.
(easy-mmode-define-navigation): Signal an error rather than (ding).
2000-05-21 01:44:08 +00:00
Stefan Monnier
36a5b60e8e (easy-mmode-define-navigation): Only use `ding' for interactive use
else, use `error' (to enable the caller to react to the problem).
2000-03-21 16:53:06 +00:00
Stefan Monnier
c7ea3acc6b * derived.el (define-derived-mode): Don't autoload anymore.
Prefer the macro-only version provided by easy-mmode.el.
* emacs-lisp/easy-mmode.el (define-derived-mode): New name for
`easy-mmode-define-derived-mode'.
Use `combine-run-hooks'.
(easy-mmode-define-navigation): New macro.
2000-03-21 15:35:06 +00:00
Stefan Monnier
e4ad5f9e5f (easy-mmode-defmap, easy-mmode-defsyntax): Autoload the functions used.
(easy-mmode-define-syntax): Fix CL typo.
(easy-mmode-define-derived-mode): Improve the docstring generation.
2000-03-11 03:37:37 +00:00
Stefan Monnier
5a7a545cc5 (easy-mmode-define-keymap): Extend to allow more flexibility.
(easy-mmode-set-keymap-parents, easy-mmode-define-syntax): New functions.
(easy-mmode-defmap, easy-mmode-defsyntax, easy-mmode-define-derived-mode):
New macros.
2000-03-10 01:17:04 +00:00
Stefan Monnier
29cc3b845b Changed maintainer.
(easy-mmode-define-toggle): New BODY arg; Never append `-mode';
  Use defcustom for the hooks; Improve the auto-generated docstrings.
(easy-mmode-define-minor-mode): Renamed `define-minor-mode'.
(define-minor-mode): Add BODY arg; Only declare the keymap if
  provided; Improve the auto-generated docstrings.
1999-11-23 09:08:38 +00:00
Karl Heuer
5e21ef7a07 (easy-mmode-define-minor-mode):
On repeated call, override previous values put into
minor-mode-map-alist and minor-mode-alist.
1999-08-28 15:13:37 +00:00