Al Petrofsky | 7 Feb 2002 00:08

Re: sit-for considered harmful in kbd-macros

> From: "Stefan Monnier" <monnier+gnu/emacs <at> RUM.cs.yale.edu>
> 
> How about short-circuiting sit-for when called from a kbd-macro,
> as if input was pending ?

> +  if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_macro))
>      return Qnil;

I'm pretty sure that's inappropriate when the argument to sit-for is
non-zero, so the code should check for that.  (After all, what fun
would C-x ( M-` t g t C-u C-x ) be if it did no redisplay?)

-al

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

Stefan Monnier | 7 Feb 2002 00:19
Picon

Re: sit-for considered harmful in kbd-macros

> > From: "Stefan Monnier" <monnier+gnu/emacs <at> RUM.cs.yale.edu>
> > 
> > How about short-circuiting sit-for when called from a kbd-macro,
> > as if input was pending ?
> 
> > +  if (detect_input_pending_run_timers (display) || !NILP (Vexecuting_macro))
> >      return Qnil;
> 
> I'm pretty sure that's inappropriate when the argument to sit-for is
> non-zero, so the code should check for that.  (After all, what fun
> would C-x ( M-` t g t C-u C-x ) be if it did no redisplay?)

Actually, no, the whole point of the patch is to make sit-for
not wait even when the argument is non-zero.
The redisplay/noredisplay is handled by the other argument.

	Stefan

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

Kim F. Storm | 7 Feb 2002 00:25
Picon

Re: sit-for considered harmful in kbd-macros

"Stefan Monnier" <monnier+gnu/emacs <at> RUM.cs.yale.edu> writes:

> How about short-circuiting sit-for when called from a kbd-macro,
> as if input was pending ?
> 

I agree that it should definitely not delay execution (in fact, I
don't think 20.7 did that).  I don't know if it should perform
redisplay though.

--

-- 
Kim F. Storm <storm <at> cua.dk> http://www.cua.dk

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

Kim F. Storm | 7 Feb 2002 00:44
Picon

Re: Updated Patch for command remapping through keymaps

storm <at> cua.dk (Kim F. Storm) writes:

> Richard Stallman <rms <at> gnu.org> writes:
> 
> >     However, I don't really understand the lack of GCPRO in some of the
> >     functions in keymap.c.  Specifically, I would have expected GCPRO
> >     before the calls to
> >       keymap = get_keymap (..., ..., 1);
> >     in
> >       Fset_keymap_parent  (parent)
> > 
> > You are right.  This was not needed in the past, but now that
> > get_keymap can autoload and thus run Lisp code, the gcpro is needed.
> > Could someone add that?
> 
> I will do that as soon as I have committed my current set of patches.

Well, I have looked at it, and it is more complicated than that.  If
get_keymap can GC, then all the functions which calls it can also GC -
and so on.  For example, functions calling Fkeymap_parent may also GC.

I think fixing this requires a better understanding of the relationships
between these functions, so the maintainer of keymap.c should make the
changes.

--

-- 
Kim F. Storm <storm <at> cua.dk> http://www.cua.dk

_______________________________________________
Emacs-devel mailing list
(Continue reading)

Pavel Janík | 7 Feb 2002 07:44
X-Face
Picon

Re: mule-diag changes

   From: Dave Love <d.love <at> dl.ac.uk>
   Date: 03 Feb 2002 18:11:09 +0000

Hi Dave,

   > Can someone running the current sources please merge and test these
   > diffs made against 21.1.  This version follows comments from handa,
   > but it probably needs checking again after merging.

I rediffed it against current CVS (attached).

I have tested it, and see two problems:

1.

pavel <at> SnowWhite:~> emacs -q -nw -batch -f list-input-methods
Unknown button type `describe-input-method'

2. LEIM is now part of Emacs, so we should take care of the following and
   similar stuff:

 (defun list-input-methods-1 ()
   (if (not input-method-alist)
       (progn
 	(princ "
 No input method is available, perhaps because you have not yet
-installed LEIM (Libraries of Emacs Input Method).
+installed LEIM (Libraries of Emacs Input Methods).

 LEIM is available from the same ftp directory as Emacs.  For instance,
(Continue reading)

Pavel Janík | 7 Feb 2002 07:50
X-Face
Picon

Show/Hide: Line and column numbers in the mode-line?

What about this? Yes, people keep to ask how to display column number in
the mode-line, and we also have in the FAQ. Hmm, still Google tells me at
http://groups.google.com/groups?q=%2Bemacs+%2Bcolumn+%2Bnumber&hl=en&sa=N&tab=wg

Results 1 - 10 of about 9,760.

--- menu-bar.el.~1.194.~	Sun Feb  3 11:06:42 2002
+++ menu-bar.el	Wed Feb  6 22:22:34 2002
 <at>  <at>  -572,6 +572,19  <at>  <at> 

 (defvar menu-bar-showhide-menu (make-sparse-keymap "Show/Hide"))

+(define-key menu-bar-showhide-menu [column-number-mode]
+  (menu-bar-make-toggle column-number-mode column-number-mode
+			"Show Column Number" "Column number mode %s"
+			"Show the current column number in the mode-line"))
+
+(define-key menu-bar-showhide-menu [line-number-mode]
+  (menu-bar-make-toggle line-number-mode line-number-mode
+			"Show Line Number" "Line number mode %s"
+			"Show the current line number in the mode-line"))
+
+(define-key menu-bar-showhide-menu [linecolumn-separator]
+  '("--"))
+
 (defun showhide-date-time ()
   "Toggle whether to show date and time in the mode-line."
   (interactive)

(Continue reading)

Juanma Barranquero | 7 Feb 2002 10:39
Picon
Favicon

Re: Updated Patch for command remapping through keymaps


On 06 Feb 2002 22:23:56 +0100, storm <at> cua.dk (Kim F. Storm) wrote:

> I will do that as soon as I have committed my current set of patches.

Before your patches:

ELISP> (global-set-key (kbd "C-c a") #'(lambda (arg) (interactive "p") (message "%s" arg)))
(lambda
  (arg)
  (interactive "p")
  (message "%s" arg))

ELISP> (where-is-internal (lookup-key global-map (kbd "C-c a")))
([3 97])

After your patches:

ELISP> (global-set-key (kbd "C-c a") #'(lambda (arg) (interactive "p") (message "%s" arg)))
(lambda
  (arg)
  (interactive "p")
  (message "%s" arg))

ELISP> (where-is-internal (lookup-key global-map (kbd "C-c a")))
*** Eval error ***  Wrong type argument: arrayp, (lambda (arg) (interactive "p") (message "%s" arg))

                                                           /L/e/k/t/u

_______________________________________________
(Continue reading)

Eli Zaretskii | 7 Feb 2002 10:42
Picon

Re: Updated Patch for command remapping through keymaps


On 7 Feb 2002, Kim F. Storm wrote:

> Well, I have looked at it, and it is more complicated than that.  If
> get_keymap can GC, then all the functions which calls it can also GC -
> and so on.  For example, functions calling Fkeymap_parent may also GC.
> 
> I think fixing this requires a better understanding of the relationships
> between these functions, so the maintainer of keymap.c should make the
> changes.

The irony of this is that on most modern platforms, including that of 
keymap.c's maintainer, GCPRO is a no-op...

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

Pavel Janík | 7 Feb 2002 10:54
X-Face
Picon

display-time, mail-icon and POP3 mailboxes

Hi,

I'd like to add the ability to check POP3 mailbox for new messages (and
displaying mail icon). Now, we support only looking into file or directory
for new e-mail. POP3 support would be great. The implementation itself is
very easy (and already done, in fact).

But how should i get the hostname, username and password from user?

Rmail uses movemail which checks MAILHOST env. variable or the third field
of inbox (po:user:host). Gnus can set everything in mail-sources:

(setq mail-sources '((pop :server "my-server" :user "MyName" :password "MySecret")))

I do not know about VM and other mail programs. Do you have an idea?
Should I share values with those programs or should I invent new user
options display-time-pop3-{server,user,password}?
--

-- 
Pavel Janík

Pah! Benchmarks, smenchmarks! Give us your bogomips-rating, that's
the only thing that counts :-)
                  -- David Weinehall in linux-kernel

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel

(Continue reading)

Eli Zaretskii | 7 Feb 2002 11:01
Picon

Re: Show/Hide: Line and column numbers in the mode-line?


On Thu, 7 Feb 2002, Pavel =?iso-8859-2?q?Jan=EDk?= wrote:

> What about this? Yes, people keep to ask how to display column number in
> the mode-line, and we also have in the FAQ. Hmm, still Google tells me at
> http://groups.google.com/groups?q=%2Bemacs+%2Bcolumn+%2Bnumber&hl=en&sa=N&tab=wg

My vote is to include this.  Thanks.

_______________________________________________
Emacs-devel mailing list
Emacs-devel <at> gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


Gmane