emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bell


From: Juri Linkov
Subject: Re: Bell
Date: Tue, 30 Mar 2010 19:16:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> Currently in most cases a flashing screen is accompanied
> with an error message.  I think it's a bug when there is
> no error message displayed.  For instance, typing C-b or M-v
> at the beginning of the buffer displays "Beginning of buffer",
> but typing C-p doesn't display this error message.  I think
> it is a bug that should be fixed with this patch:

Actually, `ding' with the error message deactivates the active region.
Better to use `signal' that doesn't deactivate the region:

=== modified file 'lisp/simple.el'
--- lisp/simple.el      2010-03-05 12:01:10 +0000
+++ lisp/simple.el      2010-03-20 23:57:09 +0000
@@ -4105,9 +4115,10 @@ (defun next-line (&optional arg try-vscr
            (insert (if use-hard-newlines hard-newline "\n")))
        (line-move arg nil nil try-vscroll))
     (if (called-interactively-p 'interactive)
-       (condition-case nil
+       (condition-case err
            (line-move arg nil nil try-vscroll)
-         ((beginning-of-buffer end-of-buffer) (ding)))
+         ((beginning-of-buffer end-of-buffer)
+          (signal (car err) nil)))
       (line-move arg nil nil try-vscroll)))
   nil)
 
@@ -4135,9 +4146,10 @@ (defun previous-line (&optional arg try-
   (interactive "^p\np")
   (or arg (setq arg 1))
   (if (called-interactively-p 'interactive)
-      (condition-case nil
+      (condition-case err
          (line-move (- arg) nil nil try-vscroll)
-       ((beginning-of-buffer end-of-buffer) (ding)))
+       ((beginning-of-buffer end-of-buffer)
+        (signal (car err) nil)))
     (line-move (- arg) nil nil try-vscroll))
   nil)

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]