From 6d63c712808bcb12ce7190999d17c4a0d6959cdb Mon Sep 17 00:00:00 2001 From: Chris Feng Date: Fri, 4 Sep 2015 09:09:59 +0800 Subject: Prepare for GNU ELPA release * Transfer copyright to Free Software Foundation * Add packaging components (e.g. headers) * Coding style fixes: + Quote functions with "#'" + Wrap long lines + Fix doc strings / comments * Replace `string-to-int' with `string-to-number' * Fix compiling errors / eliminate compiling warnings + Add exwm-core.el to hold common variables, functions and macros * Remove the redundant COPYING file * Add .gitignore * Rename README to README.md --- exwm-layout.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'exwm-layout.el') diff --git a/exwm-layout.el b/exwm-layout.el index fe1645f0fb58..a14651a46df9 100644 --- a/exwm-layout.el +++ b/exwm-layout.el @@ -1,24 +1,23 @@ ;;; exwm-layout.el --- Layout Module for EXWM -*- lexical-binding: t -*- -;; Copyright (C) 2015 Chris Feng +;; Copyright (C) 2015 Free Software Foundation, Inc. ;; Author: Chris Feng -;; Keywords: unix -;; This file is not part of GNU Emacs. +;; This file is part of GNU Emacs. -;; This file is free software: you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. -;; This file is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with this file. If not, see . +;; along with GNU Emacs. If not, see . ;;; Commentary: @@ -26,6 +25,10 @@ ;;; Code: +(require 'exwm-core) +(eval-when-compile (require 'exwm-workspace)) + +;;;###autoload (defun exwm-layout--show (id &optional window) "Show window ID exactly fit in the Emacs window WINDOW." (exwm--log "Show #x%x in %s" id window) @@ -68,6 +71,7 @@ exwm--connection)))) (xcb:flush exwm--connection)) +;;;###autoload (defun exwm-layout--hide (id) "Hide window ID." (unless (eq xcb:icccm:WM_STATE:IconicState ;already hidden @@ -89,6 +93,7 @@ :icon xcb:Window:None)) (xcb:flush exwm--connection))) +;;;###autoload (defun exwm-layout-set-fullscreen (&optional id) "Make window ID fullscreen." (interactive) @@ -248,9 +253,9 @@ (defun exwm-layout--init () "Initialize layout module." ;; Auto refresh layout - (add-hook 'window-configuration-change-hook 'exwm-layout--refresh) + (add-hook 'window-configuration-change-hook #'exwm-layout--refresh) ;; Refresh when minibuffer grows - (add-hook 'minibuffer-setup-hook 'exwm-layout--on-minibuffer-setup t)) + (add-hook 'minibuffer-setup-hook #'exwm-layout--on-minibuffer-setup t)) -- cgit 1.4.1