]> code.delx.au - gnu-emacs-elpa/log
gnu-emacs-elpa
9 years agoAdd autoload cookies
João Távora [Mon, 5 Jan 2015 11:09:29 +0000 (11:09 +0000)]
Add autoload cookies

* darkroom.el (darkroom-mode, darkroom-tentative-mode): Add autoload cookie.
(darkroom-tentative-mode): Use `declare-function` to try and
shoosh byte-compiler.

9 years agoPrepare for inclusion in GNU ELPA
Joao Tavora [Thu, 18 Dec 2014 09:59:14 +0000 (09:59 +0000)]
Prepare for inclusion in GNU ELPA

Assign copyright to the Free Software Foundation and add Maintainer:
header.

9 years agoFix darkroom-tentative-mode when switching window's buffer
Joao Tavora [Thu, 18 Dec 2014 09:57:48 +0000 (09:57 +0000)]
Fix darkroom-tentative-mode when switching window's buffer

* darkroom.el (darkroom--enter-or-leave): Call `darkroom-enter'
with non-nil JUST-MARGINS.
(darkroom--enter): Add JUST-MARGINS.

9 years agoFix margin calculation yet again.
João Távora [Tue, 16 Dec 2014 10:10:31 +0000 (10:10 +0000)]
Fix margin calculation yet again.

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.

9 years agoMerge pull request #1 from syohex/require-cl-lib
João Távora [Tue, 16 Dec 2014 11:08:23 +0000 (11:08 +0000)]
Merge pull request #1 from syohex/require-cl-lib

* darkroom.el: load cl-lib

9 years agoload cl-lib
Syohei YOSHIDA [Mon, 15 Dec 2014 16:55:09 +0000 (01:55 +0900)]
load cl-lib

9 years agoFix automatic margin calculation
João Távora [Mon, 15 Dec 2014 14:56:14 +0000 (14:56 +0000)]
Fix automatic margin calculation

* darkroom.el (darkroom--real-window-width): Removed horrible hack.
(darkroom-guess-margins): Calculate with pixel widths.

9 years agoFix `darkroom-tentative-mode'
João Távora [Mon, 15 Dec 2014 11:19:46 +0000 (11:19 +0000)]
Fix `darkroom-tentative-mode'

* 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):

9 years agoRedesign setting of margins, which now works per-window
João Távora [Fri, 12 Dec 2014 12:18:00 +0000 (12:18 +0000)]
Redesign setting of margins, which now works per-window

`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'.

9 years agoAttempt a clearer design of modes
João Távora [Thu, 11 Dec 2014 11:37:10 +0000 (11:37 +0000)]
Attempt a clearer design of modes

* 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.

9 years agoCorrections after another review iteration with Rasmus
João Távora [Thu, 11 Dec 2014 11:20:30 +0000 (11:20 +0000)]
Corrections after another review iteration with Rasmus

* 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'.

9 years agoMinor tweaks
João Távora [Thu, 11 Dec 2014 09:23:17 +0000 (09:23 +0000)]
Minor tweaks

* darkroom.el: Rewrite "Commentary" section
(darkroom-margins): Don't mention `darkroom--set-margins'.
(darkroom-guess-margins): Use `truncate', not `round'

9 years agoPrefix internal symbols with "darkroom--"
João Távora [Tue, 9 Dec 2014 10:58:43 +0000 (10:58 +0000)]
Prefix internal symbols with "darkroom--"

* 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--".

9 years agoAdd some docstrings
João Távora [Tue, 9 Dec 2014 10:52:25 +0000 (10:52 +0000)]
Add some docstrings

* darkroom.el:
(darkroom-increase-margins, darkroom-decrease-margins): Add docstring.

9 years agoAdd (still non-functioning) `darkroom-compute-margins'
João Távora [Tue, 9 Dec 2014 10:37:59 +0000 (10:37 +0000)]
Add (still non-functioning) `darkroom-compute-margins'

* 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.

9 years agoTidy up margin calculation
João Távora [Mon, 8 Dec 2014 20:35:27 +0000 (20:35 +0000)]
Tidy up margin calculation

* 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.

9 years agoIntegrate another comment from Rasmus
João Távora [Mon, 8 Dec 2014 19:48:25 +0000 (19:48 +0000)]
Integrate another comment from Rasmus

* darkroom.el (darkroom-margin-increment): New defcustom.
(darkroom-increase-margins): Take a parameter.
(darkroom-decrease-margins): Use `darkroom-increase-margins'

9 years agoIntegrate some comments from Rasmus
João Távora [Mon, 8 Dec 2014 19:41:37 +0000 (19:41 +0000)]
Integrate some comments from Rasmus

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.

10 years agoAdd .gitignore
Joao Tavora [Thu, 27 Feb 2014 16:19:15 +0000 (16:19 +0000)]
Add .gitignore

10 years agoLeave darkroom-mode when leaving tentative-mode
Joao Tavora [Thu, 27 Feb 2014 15:00:45 +0000 (15:00 +0000)]
Leave darkroom-mode when leaving tentative-mode

* darkroom.el (darkroom-tentative-mode): Leave minor mode as well when leaving
tentative-mode.

10 years agoNow works with multiple windows for same darkroom buffer
Joao Tavora [Thu, 27 Feb 2014 14:56:21 +0000 (14:56 +0000)]
Now works with multiple windows for same darkroom buffer

* 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.

10 years agodarkroom-mode added
Joao Tavora [Mon, 9 Jul 2012 09:51:12 +0000 (10:51 +0100)]
darkroom-mode added

10 years agofirst commit
Joao Tavora [Mon, 9 Jul 2012 09:48:03 +0000 (10:48 +0100)]
first commit

11 years agofix: save HEADER-LINE-FORMAT as well
João Távora [Tue, 25 Dec 2012 02:18:44 +0000 (02:18 +0000)]
fix: save HEADER-LINE-FORMAT as well

11 years agofix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DARKROOM-FILL-PARAGRAPH-MAYBE
João Távora [Tue, 25 Dec 2012 02:18:11 +0000 (02:18 +0000)]
fix: DARKROOM-CONFIRM-FILL-PARAGRAPH -> DARKROOM-FILL-PARAGRAPH-MAYBE

11 years agoInitial commit
João Távora [Thu, 30 Aug 2012 19:51:37 +0000 (20:51 +0100)]
Initial commit