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 windowp #240

Merged
merged 1 commit into from Jul 17, 2017
Jump to file or symbol
Failed to load files and symbols.
+13 −8
Diff settings

Always

Just for now

Copy path View file
@@ -36,6 +36,7 @@ mod crypto;
mod str2sig;
mod multibyte;
mod buffers;
mod windows;
#[cfg(all(not(test), target_os = "macos"))]
use alloc_unexecmacosx::OsxUnexecAlloc;
@@ -135,6 +136,7 @@ pub extern "C" fn rust_init_syms() {
unsafe {
defsubr(&*buffers::Soverlayp);
defsubr(&*buffers::Sbuffer_live_p);
defsubr(&*windows::Swindowp);
defsubr(&*lists::Satom);
defsubr(&*lists::Slistp);
defsubr(&*lists::Snlistp);
Copy path View file
@@ -0,0 +1,11 @@
//! Functions operating on windows.
use lisp::LispObject;
use remacs_macros::lisp_fn;
/// Return t if OBJECT is a window and nil otherwise.
#[lisp_fn]
fn windowp(object: LispObject) -> LispObject {
LispObject::from_bool(object.is_window())
}
Copy path View file
@@ -301,13 +301,6 @@ wset_buffer (struct window *w, Lisp_Object val)
adjust_window_count (w, 1);
}
DEFUN ("windowp", Fwindowp, Swindowp, 1, 1, 0,
doc: /* Return t if OBJECT is a window and nil otherwise. */)
(Lisp_Object object)
{
return WINDOWP (object) ? Qt : Qnil;
}
DEFUN ("window-valid-p", Fwindow_valid_p, Swindow_valid_p, 1, 1, 0,
doc: /* Return t if OBJECT is a valid window and nil otherwise.
A valid window is either a window that displays a buffer or an internal
@@ -7737,7 +7730,6 @@ displayed after a scrolling operation to be somewhat inaccurate. */);
defsubr (&Sselected_window);
defsubr (&Sminibuffer_window);
defsubr (&Swindow_minibuffer_p);
defsubr (&Swindowp);
defsubr (&Swindow_valid_p);
defsubr (&Swindow_live_p);
defsubr (&Swindow_frame);
ProTip! Use n and p to navigate between commits in a pull request.