Skip to content

Conversation

tkf
Copy link
Collaborator

@tkf tkf commented May 14, 2012

MuMaMo 使用中のバッファで yascroll を有効にすると scroll bar がちぎれてしまいます。こんな感じです:

screenshot-2012-05-14-181722

また、この状態になると、自動的に隠れなくなってしまいます。

この問題を解決するために MuMaMo を使っているときにだけ yascroll を無効にしたいのですが、 major-mode 変数には MuMaMo を構成する各 chunk の major mode の値が入っているので yascroll:disabled-modes を使っても効果がありません。

MuMaMo が有効になっている場合に yascroll を無効にするために修正を加えました。

他の回避策としては、 buffer local な変数 yascroll:enable を用意して、以下のように変更し、あとはこの変数の変更はユーザーにまかせても良いかもしれません。

(defun yascroll:enabled-buffer-p (buffer)
  "Return non-nil if yascroll is enabled on BUFFER."
  (with-current-buffer buffer
    (and (not (minibufferp))
         (not (memq major-mode yascroll:disabled-modes))
         yascroll:enable)))

The `major-mode' buffer local variable cannot be used to disable
yascroll because mumamo sets `major-mode' to the major mode of each
chunk.  Assuming that no one use yascroll with mumamo as scroll bar
is broken with mumamo anyway, this change disables yascroll in the
buffer mumamo is enabled.
@tkf
Copy link
Collaborator Author

tkf commented May 14, 2012

以前の変更 45c3f47 だと解決していなかったので更新しました。

@m2ym
Copy link
Contributor

m2ym commented Mar 21, 2013

symbol-valueのほうがいいと思います。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants