bug-gnu-emacs
[Top][All Lists]
Advanced

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

missing docu and functionality regarding registers


From: Philip Lijnzaad
Subject: missing docu and functionality regarding registers
Date: Wed, 24 Oct 2001 13:39:58 +0100 (BST)

This bug report will be sent to the Free Software Foundation,
 not to your local site managers!!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

In GNU Emacs 20.5.1 (sparc-sun-solaris2.7, X toolkit)
 of Fri Jan 21 2000 on sol3.ebi.ac.uk
configured using `configure  --prefix=/sw/common --with-x-toolkit=yes 
--with-pop=yes'

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

0) Congrats on getting emacs 21 out the door ! 

1) Node 'RegRect' in the emacs info manual does not say anything about
   append-to-register. This might be useful (seen and responded to traffic in
   gnu.emacs.help about this more than once). An obvious key binding would be
   C-x r a.

2) I think append-rectangle-to-register and prepend-rectangle-to-register
   might be useful functions; feel free to include (or ignore) the code for
   them, given below. 

Cheers,

                                                                      Philip
------------------------------------------------------------------------

(defun append-rectangle-to-register (register start end &optional delete-flag)
  "Append rectangular region to a rectangle in register REGISTER.
With prefix arg, delete as well.
Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
START and END are buffer positions giving two corners of rectangle."
  (interactive "cAppend rectangle to register: \nr\nP")
  (let ((r (get-register register)))
    (unless (and (listp r) (or (null r) (stringp (car r))))
      (error "Register does not contain a rectangle")))
  (let ((r (if delete-flag
               (delete-extract-rectangle start end)
             (extract-rectangle start end))))
    (set-register register (nconc (get-register register) r))
  (if delete-flag (delete-region start end))))

(defun prepend-rectangle-to-register (register start end &optional delete-flag)
  "Prepend rectangular region to a rectangle in register REGISTER.
With prefix arg, delete as well.
Called from program, takes four args: REGISTER, START, END and DELETE-FLAG.
START and END are buffer positions giving two corners of rectangle."
  (interactive "cAppend rectangle to register: \nr\nP")
  (let ((r (get-register register)))
    (unless (and (listp r) (or (null r) (stringp (car r))))
      (error "Register does not contain a rectangle")))
  (let ((r (if delete-flag
               (delete-extract-rectangle start end)
             (extract-rectangle start end))))
    (set-register register (nconc r (get-register register)))
  (if delete-flag (delete-region start end))))

------------------------------------------------------------------------





Recent input:
C-a C-s @ C-a M-x s u b tab M-backspace g n u tab M-backspace 
e m tab a tab - tab backspace b tab tab M-x a r p tab 
backspace backspace backspace p backspace a p r o tab 
return b u g r e p backspace backspace backspace backspace 
backspace backspace b u g * r e p o r t M-b C-b . return 
M-o C-n C-n C-n C-n C-n C-p return C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n M-x r e p o tab tab 
r tab tab tab return

Recent messages:
Wrote /homes/lijnzaad/.newsrc.eld
Saving /homes/lijnzaad/.newsrc.eld...done
Quit [2 times]
Mark set
Making completion list...
Quit
There is nothing to follow in `Send a bug report' [2 times]
Making completion list...
Loading emacsbug...
Loading emacsbug...done


-- 
The mail transport agent is not liable for any coffee stains in this message
-----------------------------------------------------------------------------
Philip Lijnzaad, address@hidden European Bioinformatics Institute,rm A2-08
+44 (0)1223 49 4639                 Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax)           Cambridgeshire CB10 1SD,  GREAT BRITAIN




reply via email to

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