Permalink
Switch branches/tags
Nothing to show
Commits on Oct 8, 2018
  1. Close #10: deactivate text-scale-mode when leaving darkroom

    levitanong authored and joaotavora committed Oct 8, 2018
    Copyright-paperwork-exempt: yes
    
    * darkroom.el (darkroom--leave): Deactivate text-scale-mode.
Commits on Nov 3, 2015
Commits on Apr 23, 2015
Commits on Jan 5, 2015
  1. Add autoload cookies

    joaotavora committed Jan 5, 2015
    * darkroom.el (darkroom-mode, darkroom-tentative-mode): Add autoload cookie.
    (darkroom-tentative-mode): Use `declare-function` to try and
    shoosh byte-compiler.
Commits on Dec 18, 2014
  1. Prepare for inclusion in GNU ELPA

    joaotavora committed Dec 18, 2014
    Assign copyright to the Free Software Foundation and add Maintainer:
    header.
  2. Fix darkroom-tentative-mode when switching window's buffer

    joaotavora committed Dec 18, 2014
    * darkroom.el (darkroom--enter-or-leave): Call `darkroom-enter'
    with non-nil JUST-MARGINS.
    (darkroom--enter): Add JUST-MARGINS.
Commits on Dec 16, 2014
  1. Fix margin calculation yet again.

    joaotavora committed Dec 16, 2014
    For scaled char widths the margin width, in columns, also has to be
    scaled accordingly.
    
    * darkroom.el (darkroom-verbose): New variable.
    (darkroom--window-width): New function.
    (darkroom-guess-margins): Use it.
    (darkroom--reset-margins): Cleanup.
  2. Merge pull request #1 from syohex/require-cl-lib

    joaotavora committed Dec 16, 2014
    * darkroom.el: load cl-lib
Commits on Dec 15, 2014
  1. load cl-lib

    syohex committed Dec 15, 2014
  2. Fix automatic margin calculation

    joaotavora committed Dec 15, 2014
    * darkroom.el (darkroom--real-window-width): Removed horrible hack.
    (darkroom-guess-margins): Calculate with pixel widths.
  3. Fix `darkroom-tentative-mode'

    joaotavora committed Dec 15, 2014
    * darkroom.el (darkroom--margin-factor): New variable.
    (darkroom--set-margins): Consider `darkroom-margin-factor'.
    (darkroom--reset-margins): Always reset margins to 0.
    (darkroom-increase-margins): Implement with `darkroom--margin-factor'.
    (darkroom--enter): Renamed from `darkroom--turn-on'. Don't afect hooks here.
    (darkroom--leave): Renamed from `darkroom--turn-off'.
    (darkroom--enter-or-leave): New function.
    (darkroom-mode): Use `darkroom--enter' and `darkroom--leave'. Set
    window change hook here.
    (darkroom--maybe-enable): Removed.
    (darkroom-tentative-mode): Redesign.
    
    * darkroom.el (darkroom--margin-factor): New variable.
    (darkroom--set-margins):
Commits on Dec 12, 2014
  1. Redesign setting of margins, which now works per-window

    joaotavora committed Dec 12, 2014
    `darkroom-tentative-mode' is now broken, but the rest now works
    better.
    
    * darkroom.el (darkroom-margins): New semantics for function value.
    (darkroom--real-window-width): Compensate for margins that might
    already be there.
    (darkroom--guess-margins-statistics-cache): New variable.
    (darkroom-guess-margins): Use a cache.
    (darkroom--compute-margins): Take WINDOW aprameter.
    (darkroom--buffer-margins): Removed.
    (darkroom--set-margins): Redesigned.
    (darkroom--reset-margins): New function.
    (darkroom-increase-margins): Unimplement.
    (darkroom--saved-variables, darkroom--saved-state): New variables.
    (darkroom--turn-on): Redesign.
    (darkroom--turn-off): Redesign.
    (darkroom--maybe-enable): Check for `darkroom--saved-state'.
Commits on Dec 11, 2014
  1. Attempt a clearer design of modes

    joaotavora committed Dec 11, 2014
    * darkroom.el (darkroom--turn-on): New function.
    (darkroom--tentative-mode-driving): Removed this.
    (darkroom-mode): Use new `darkroom--turn-on' and
    `darkroom--turn-off'.
    (darkroom-tentative-mode): Assert that no `darkroom-mode' and
    `darkroom-tentative-mode' are mixed.
    (darkroom--turn-off): New function.
  2. Corrections after another review iteration with Rasmus

    joaotavora committed Dec 11, 2014
    * darkroom.el (darkroom-margins): New default.
    (darkroom-margins): Tweak docstring.
    (darkroom-margins): Better type spec.
    (darkroom-margins-if-failed-guess): New defcustom.
    (darkroom--real-window-width): New function.
    (darkroom-guess-margins): Simplified.
    (darkroom--compute-margins)
    (darkroom--saved-mode-line-format)
    (darkroom--saved-header-line-format, darkroom--saved-margins): Add
    docstring.
    (darkroom-mode): Added an assertion.
    (darkroom--tentative-mode-driving): New variable.
    (darkroom--maybe-enable): Use `darkroom--tentative-mode-driving'
    (darkroom-mode): Attempt to ensure `darkroom--set-margins' always
    happens after `darkroom--maybe-enable' in
    `window-configuration-change-hook'.
  3. Minor tweaks

    joaotavora committed Dec 11, 2014
    * darkroom.el: Rewrite "Commentary" section
    (darkroom-margins): Don't mention `darkroom--set-margins'.
    (darkroom-guess-margins): Use `truncate', not `round'
Commits on Dec 9, 2014
  1. Prefix internal symbols with "darkroom--"

    joaotavora committed Dec 9, 2014
    * darkroom.el (darkroom--compute-margins)
    (darkroom--float-to-columns, darkroom-buffer-margins)
    (darkroom--set-margins, darkroom--saved-mode-line-format)
    (darkroom--saved-header-line-format, darkroom--saved-margins)
    (darkroom-tentative-mode): Internal variables and functions now
    prefixed "darkroom--".
  2. Add some docstrings

    joaotavora committed Dec 9, 2014
    * darkroom.el:
    (darkroom-increase-margins, darkroom-decrease-margins): Add docstring.
  3. Add (still non-functioning) `darkroom-compute-margins'

    joaotavora committed Dec 9, 2014
    * darkroom.el: Require 'cl-lib
    (darkroom-guess-margins): New function for putting in
    `darkroom-margins'. But broken due to `window-width' not being
    suitable probably.
    (darkroom-compute-margins): Redesigned.
    (darkroom-set-margins): Don't `darkroom-compute-margins'
    (darkroom-mode): Reordered statements.
Commits on Dec 8, 2014
  1. Tidy up margin calculation

    joaotavora committed Dec 8, 2014
    * darkroom.el (darkroom-compute-margins): Renamed from `darkroom-margins'.
    (darkroom-buffer-margins): New variable.
    (darkroom-set-margins): Redesign. Set `darkroom-buffer-margins'.
    (darkroom-increase-margins): Redesign.
    (darkroom-mode-map): Fix whitespace.
    (darkroom-mode): Use `set-mark-local-variable'
    (darkroom-mode): Save and restore current margins.
    (darkroom-tentative-mode): Fix whitespace.
  2. Integrate another comment from Rasmus

    joaotavora committed Dec 8, 2014
    * darkroom.el (darkroom-margin-increment): New defcustom.
    (darkroom-increase-margins): Take a parameter.
    (darkroom-decrease-margins): Use `darkroom-increase-margins'
  3. Integrate some comments from Rasmus

    joaotavora committed Dec 8, 2014
    See http://permalink.gmane.org/gmane.emacs.devel/179381 for the
    discussion.
    
    * darkroom.el: Add file header.
    (darkroom): Add customization group.
    (darkroom-margins): Make it a `defcustom'.
    (darkroom-turns-on-visual-line-mode): ditto.
    (darkroom-mode): Improve docstring.
    (darkroom-fill-paragraph-maybe): Removed.
    (darkroom-visual-mode-maybe-enable): Removed.
    (darkroom-mode): Improve docstring.
    (darkroom-mode): Use `darkroom-text-scale-increase'
    (darkroom-maybe-enable): Comment out debug code.
    (darkroom-mode): Don't `darkroom-visual-mode-maybe-enable'
    (darkroom-mode-map): Don't bind `darkroom-fill-paragraph-maybe'.
    (darkroom-saved-visual-line-mode): Removed.
    (darkroom-text-scale-increase): New defcustom.
Commits on Feb 27, 2014
  1. Add .gitignore

    joaotavora committed Feb 27, 2014
  2. Leave darkroom-mode when leaving tentative-mode

    joaotavora committed Feb 27, 2014
    * darkroom.el (darkroom-tentative-mode): Leave minor mode as well when leaving
    tentative-mode.
  3. Now works with multiple windows for same darkroom buffer

    joaotavora committed Feb 27, 2014
    * darkroom.el (darkroom-set-margins): set for every window separately.
    (darkroom-fill-paragraph-maybe): Be smarter we filling
    paragraph. TODO: use remap.
    (darkroom-saved-mode-line-format)
    (darkroom-saved-header-line-format)
    (darkroom-saved-visual-line-mode): new buffer-local vars.
    (darkroom-visual-mode-maybe-enable): new function.
    (darkroom-mode): Remove hack here.
    (darkroom-maybe-enable): new function.
    (darkroom-tentative-mode): New minor mode.
  4. darkroom-mode added

    joaotavora committed Jul 9, 2012
  5. first commit

    joaotavora committed Jul 9, 2012
Commits on Dec 25, 2012
Commits on Aug 30, 2012
  1. Initial commit

    joaotavora committed Aug 30, 2012