user2497640
user2497640

Reputation: 21

define a rectangle in elisp code

I want to put a rectangle of text into an elisp variable.

At the moment, I'm using extract-rectangle in the elisp file which is loaded with --load at the command line, and the text to extract (the rectangle) is in the target file (the file doing the loading).

But to change the rectangle I must edit the rectangle in the target files and the rectangle's bounds in the elisp file.

It would be nicer to edit only the code (the loaded file), not both, and not have to change the rectangle's beginning and end points.

Anyone know how to do this?

Upvotes: 1

Views: 96

Answers (1)

user2497640
user2497640

Reputation: 21

OK, figured it out myself - the key I was missing that a rectangle's a list of strings.

my test code's below -

(setq killed-rectangle'(" a b 1" "cd   " "   ef"))

(yank-rectangle) 

Upvotes: 1

Related Questions