首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法控制sr-快速杆的宽度

无法控制sr-快速杆的宽度
EN

Stack Overflow用户
提问于 2013-11-07 11:24:07
回答 2查看 1.2K关注 0票数 3

我用的是速度棒,但不能控制宽度。当我调整emacs窗口的大小时,sr快速栏总是随之扩展.我用xemacs和emacs都试过这个。

我的.emacs文件如下:

代码语言:javascript
运行
复制
(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.
 )
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-09-29 18:10:45

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

应该在加载脚本之前设置sr-快速栏宽度-*。

票数 0
EN

Stack Overflow用户

发布于 2022-10-25 19:10:05

这不起作用,因为变量sr-speedbar-width-xsr-speedbar-width-console已经不存在了。它们已于2014年8月3日从代码中删除。见此处:https://www.emacswiki.org/emacs/download/sr-speedbar.el

您可能在https://www.emacswiki.org/emacs/SrSpeedbar上找到的信息已经过时了。

只有一个变量sr-speedbar-width

当调用sr-speedbar-open时,变量将被“消耗”。用户可以在加载库之前或之后定义变量。这是由于Emacs特殊表单defvar (第364行)的行为,它不覆盖变量。有关此问题的更多信息,请参见此处:node/elisp/Defining-Variables.html

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19834668

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档