about summary refs log tree commit diff
path: root/exwm-layout.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2015-09-04T01·09+0800
committerChris Feng <chris.w.feng@gmail.com>2015-09-04T01·15+0800
commit6d63c712808bcb12ce7190999d17c4a0d6959cdb (patch)
tree3bc22adbf1bb497fd57d95f765b33dac8b021144 /exwm-layout.el
parentf1d37b9a8c8d5dbe223b9099c09b2b25f0236c64 (diff)
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
Diffstat (limited to 'exwm-layout.el')
-rw-r--r--exwm-layout.el21
1 files changed, 13 insertions, 8 deletions
diff --git a/exwm-layout.el b/exwm-layout.el
index fe1645f0fb..a14651a46d 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 <chris.w.feng@gmail.com>
-;; 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 <http://www.gnu.org/licenses/>.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; 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))