gpt4 book ai didi

emacs - 无法控制 sr-speedbar 的宽度

转载 作者:行者123 更新时间:2023-12-02 04:57:44 25 4
gpt4 key购买 nike

我正在使用带 sr-speedbar 的 emacs,但无法控制它的宽度。当我调整 emacs 窗口大小时,sr-speedbar 总是随之扩展。我已经用 xemacs 和 emacs 试过了。

下面是我的 .emacs 文件:

(require 'package)
(package-initialize)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.milkbox.net/packages/")))
(setq c-default-style "linux"
c-basic-offset 4)
(iswitchb-mode 1)
(setq inhibit-splash-screen t)
(load-theme 'zenburn t)
(require 'ecb)
(setq stack-trace-on-error t)
(desktop-save-mode 1)
;(defun toggle-fullscreen ()
; (interactive)
; (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
; '(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
; (x-send-client-message nil 0 nil "_NET_WM_STATE" 32
; '(2 "_NET_WM_STATE_MAXIMIZED_HORZ" 0))
;)
;(toggle-fullscreen)
(require 'sr-speedbar)
(setq
sr-speedbar-right-side nil
sr-speedbar-width-x 10
sr-speedbar-width-console 10
sr-speedbar-max-width 10
sr-speedbar-delete-windows t)
(sr-speedbar-open)
(put 'dired-find-alternate-file 'disabled nil)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
;; Single char cursor movement. (assuming you are on qwerty)
(global-set-key (kbd "M-j") 'backward-char)
(global-set-key (kbd "M-l") 'forward-char)
(global-set-key (kbd "M-i") 'previous-line)
(global-set-key (kbd "M-k") 'next-line)
(global-set-key (kbd "M-SPC") 'set-mark-command)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes (quote ("d63e19a84fef5fa0341fa68814200749408ad4a321b6d9f30efc117aeaf68a2e" default)))
'(ecb-options-version "2.40"))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

最佳答案

它在加载时消耗变量,而不是在打开时。

sr-speedbar-width-* 应该在脚本加载之前设置。

关于emacs - 无法控制 sr-speedbar 的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19834668/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com