Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
043989e3
Commit
043989e3
authored
Jan 08, 2008
by
Michael Olson
Browse files
Remember: If region is visible, use it as initial text.
parent
429e6fb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
lisp/ChangeLog
lisp/ChangeLog
+12
-0
lisp/textmodes/remember.el
lisp/textmodes/remember.el
+6
-4
No files found.
lisp/ChangeLog
View file @
043989e3
2008-01-08 Michael Olson <mwolson@gnu.org>
* textmodes/remember.el (remember-region): Fix typo in docstring.
2008-01-08 Lennart Borgman <lennart.borgman.073@student.lu.se>
* textmodes/remember.el (remember): If there is a visible region
[that is, the mark is active and transient mark mode is enabled]
then use this region for the initial contents of the *Remember*
buffer. Use `region-beginning' and `region-end' instead of
`point' and `mark'.
2008-01-07 Dan Nicolaescu <dann@ics.uci.edu>
* vc-hg.el (vc-hg-dir-state, vc-hg-dir-status): Pass the dir
...
...
lisp/textmodes/remember.el
View file @
043989e3
...
...
@@ -273,10 +273,12 @@ called."
INITIAL is the text to initially place in the *Remember* buffer,
or nil to bring up a blank *Remember* buffer.
With a prefix, use the region as INITIAL."
With a prefix
or a visible region
, use the region as INITIAL."
(
interactive
(
list
(
when
current-prefix-arg
(
buffer-substring
(
point
)
(
mark
)))))
(
list
(
when
(
or
current-prefix-arg
(
and
mark-active
transient-mark-mode
))
(
buffer-substring
(
region-beginning
)
(
region-end
)))))
(
funcall
(
if
remember-in-new-frame
#'
frame-configuration-to-register
#'
window-configuration-to-register
)
remember-register
)
...
...
@@ -422,7 +424,7 @@ Subject: %s\n\n"
(
defun
remember-region
(
&optional
beg
end
)
"Remember the data from BEG to END.
It is called from within the *Remember* buffer to save the text
that was entered
,
that was entered
.
If BEG and END are nil, the entire buffer will be remembered.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment