Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port bobp to rust #291

Merged
merged 1 commit into from Aug 16, 2017
Merged
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -41,3 +41,11 @@ pub fn eobp() -> LispObject {
let buffer_ref = ThreadState::current_buffer();
LispObject::from_bool(buffer_ref.zv() == buffer_ref.pt)
}

/// Return t if point is at the beginning of the buffer. If the
/// buffer is narrowed, this means the beginning of the narrowed part.
#[lisp_fn]
pub fn bobp() -> LispObject {
let buffer_ref = ThreadState::current_buffer();
LispObject::from_bool(buffer_ref.pt == buffer_ref.begv)
}
@@ -85,6 +85,7 @@ pub use math::Flss;
pub use math::Fleq;
pub use math::arithcompare;
pub use editfns::Feobp;
pub use editfns::Fbobp;

// Widely used in the C codebase.
pub use lists::Fsetcar;
@@ -317,5 +318,6 @@ pub extern "C" fn rust_init_syms() {
defsubr(&*editfns::Spoint);
defsubr(&*editfns::Sbuffer_size);
defsubr(&*editfns::Seobp);
defsubr(&*editfns::Sbobp);
}
}
@@ -1167,16 +1167,6 @@ At the beginning of the buffer or accessible region, return 0. */)
return temp;
}

DEFUN ("bobp", Fbobp, Sbobp, 0, 0, 0,
doc: /* Return t if point is at the beginning of the buffer.
If the buffer is narrowed, this means the beginning of the narrowed part. */)
(void)
{
if (PT == BEGV)
return Qt;
return Qnil;
}

DEFUN ("bolp", Fbolp, Sbolp, 0, 0, 0,
doc: /* Return t if point is at the beginning of a line. */)
(void)
@@ -5419,7 +5409,6 @@ functions if all the text being accessed has this property. */);
defsubr (&Sposition_bytes);
defsubr (&Sbyte_to_position);

defsubr (&Sbobp);
defsubr (&Sbolp);
defsubr (&Seolp);
defsubr (&Sfollowing_char);
ProTip! Use n and p to navigate between commits in a pull request.