Skip to content
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

Fix: Attempted fix for fireplace not resizing easily #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Jul 20, 2021

  1. Fix: Attempted fix for fireplace not resizing easily

    I noticed that my fireplace wasn't resizing dynamically very easily,
    and whislt this wasn't really a big deal, I got curious and had a look.
    
    The actual offending line is rather
    Line 244:
     '(add-hook 'window-size-change-functions 'fireplace--update-locals-vars nil t)'
    As per the documentation the
    'Functions called during redisplay when window sizes have changed.
    The value should be a list of functions that take one argument.'
    
    So that's all the prboelm is, the function is being called with an argument it
    isn't expecting, the documentation states it passes the window as an argument.
    But here we don't care about that, so I just added a 'stub-window' to 'eat' the
    argument.
    
    Although, it occurs to me this might be a bit lazy, and I could quite easily use the passed
    argument to update the fileplace vars, instead of searching for the (hardcoded) buffer every time.
    But hey, it works.
    
    Also here I used &optional because of that one other time when the
    update-vars function is called, but again, this could easily be adaopted
    to supply the window context properly.
    Mallchad committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    7296ced View commit details
    Browse the repository at this point in the history
  2. Fix: Opening up a new fireplace no longer enables transient-mark-mode

    There was a problem that was driving me up the wall after I tinkered with
    my fireplace config, and I didn't realize it for ages,
    but when you call 'fireplace' it also calls 'fireplace--disable-minor-modes',
    which, I think it rather innocently tries to disable some functions to help
    improve the visual experience, including 'transient-mark-mode'.
    Actually it *enables* it.
    
    The mode system in emacs is quirky and when using a variable, nil is off and
    non-nil is on.
    But for mode functions, generally negative arguments is off, and non-nil
    or omitted arguments is on.
    So, paradoxically, the omitted 'nil', enables it, which also happens to be a
    global mode.
    
    The replacement tries to fix it by using setq-local instead to prevent global
    settings from being overridden.
    I have no idea if it will cause issues with not affecting the modes on the
    fireplace start, as that often happens with settings variables and modes with
    variables, especially locally.
    But its much better than modifying the global environment and hoping it does not
    affect the user.
    Mallchad committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    05f8f09 View commit details
    Browse the repository at this point in the history
  3. Addition: Disable some more modes to further prettify the fireplace

    I saw an opportunity to disable some more modes to clean up the fireplace,
    so I did.
    One mode of which is a little more niche and not a standard emacs package, but
    it SHOULD NOT break anything.
    Mallchad committed Jul 20, 2021
    Configuration menu
    Copy the full SHA
    507bb06 View commit details
    Browse the repository at this point in the history