设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 综合讨论区 —— LinuxSir.cn
›
开源软件专题讨论
›
Emacs中C-@后C-w区域剪切的问题[已解决]
返回列表
查看:
899
|
回复:
1
Emacs中C-@后C-w区域剪切的问题[已解决]
[复制链接]
junalbert
junalbert
当前离线
积分
40
IP卡
狗仔卡
发表于 2006-9-29 21:35:58
|
显示全部楼层
|
阅读模式
我发现我的Emacs中,通过先C-@ Mark Set,再C-w 和M-w剪切复制的时候,最前面的一个word总是保留的,无论.c和.el文件都是如此。
比如:
-------在此处C-@
|
(show-paren-mode t)
...
...
...
若干行后C-w
前面的那个"(show"还是在的
请问这个是什么原因?有谁遇到过这样的情况。
另外问一个问题,elisp中如何区域注释,如同C语言中的/**/
我的.emacs.el内容如下:
;; set font for linux
(setq facemedium-str "-simsun-simsun bitmap *-medium-r-normal--12-*-*-*-*-*-*-*")
(setq fontset-facemedium
(create-fontset-from-fontset-spec
(concat
"-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-facemedium")))
(defun setallfontsets ()
(set-default-font fontset-facemedium))
(add-to-list 'after-init-hook 'setallfontsets)
(add-to-list 'after-make-frame-functions
(lambda (new-frame) (select-frame new-frame) (setallfontsets)))
(setq default-frame-alist (append '(
(cursor-type . bar)
;(cursor-color . "wheat")
;(foreground-color . "gray90")
(background-color . "gray10")
)))
;Display column and row number
(column-number-mode t)
(line-number-mode t)
;Display matching brackets
(show-paren-mode t)
;Hide toolbar
(tool-bar-mode -1)
;this will make sure spaces are used instead of tabs
(setq default-tab-width 4)
(setq tab-width 4
indent-tabs-mode nil)
(setq c-basic-offset tab-width)
;(setq c-tab-always-indent nil)
(setq
backup-by-copying t ; don't clobber symlinks
backup-directory-alist
'(("." . "~/.emacs_backup")) ; don't litter my fs tree
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
;;; disable welcome screen
(setq inhibit-startup-message t)
(require 'cc-mode)
;(c-set-offset 'inline-open 0)
;(c-set-offset 'friend '-)
;(c-set-offset 'substatement-open 0)
(setq semanticdb-project-roots
(list
(expand-file-name "/")))
(defun my-indent-or-complete ()
(interactive)
(if (looking-at "\\>")
(hippie-expand nil)
(indent-for-tab-command))
)
(autoload 'senator-try-expand-semantic "senator")
(setq hippie-expand-try-functions-list
'(
senator-try-expand-semantic
try-expand-dabbrev
try-expand-dabbrev-visible
try-expand-dabbrev-all-buffers
try-expand-dabbrev-from-kill
try-expand-list
try-expand-list-all-buffers
try-expand-line
try-expand-line-all-buffers
try-complete-file-name-partially
try-complete-file-name
try-expand-whole-kill
)
)
(defconst yxn-c-style
'((c-tab-always-indent . 4)
;(c-comment-only-line-offset . 4)
(c-hanging-braces-alist . ((substatement-open after)
(brace-list-open)))
(c-hanging-colons-alist . ((member-init-intro before)
(inher-intro)
(case-label after)
(label after)
(access-label after)))
(c-cleanup-list . (scope-operator
empty-defun-braces
defun-close-semi))
(c-offsets-alist . ((arglist-close . c-lineup-arglist)
(substatement-open . 0)
(case-label . 4)
(block-open . 0)
(block-open . 0)
(knr-argdecl-intro . -)))
(c-echo-syntactic-information-p . t)
)
"My C Programming Style")
(defun my-c-mode-common-hook()
(setq tab-width 4 indent-tabs-mode nil)
;;; hungry-delete and auto-newline
(c-toggle-auto-hungry-state 1)
;;key map
;(define-key c-mode-base-map [(control \`)] 'hs-toggle-hiding)
(define-key c-mode-base-map [(return)] 'newline-and-indent)
;(define-key c-mode-base-map [(f7)] 'compile)
;(define-key c-mode-base-map [(meta \`)] 'c-indent-command)
;; (define-key c-mode-base-map [(tab)] 'hippie-expand)
(define-key c-mode-base-map [(tab)] 'my-indent-or-complete)
(define-key c-mode-base-map [(meta ?/)] 'semantic-ia-complete-symbol-menu)
;
;(setq c-macro-shrink-window-flag t)
;(setq c-macro-preprocessor "cpp")
;(setq c-macro-cppflags " ")
;(setq c-macro-prompt-flag t)
;(setq hs-minor-mode t)
;(setq abbrev-mode t)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
;;;;C++ Mode
(defun my-c++-mode-hook()
(setq tab-width 4 indent-tabs-mode nil)
(c-set-style "stroustrup")
;; (define-key c++-mode-map [f3] 'replace-regexp)
)
;(global-set-key [(f5)] 'speedbar)
;;set title as "filename@LC's Emacs"
(setq frame-title-format
'(" GNU Emacs - [ " (buffer-file-name "%f \]"
(dired-directory dired-directory "%b \]"))))
(load-file "/usr/share/emacs/site-lisp/xcscope.el")
(require 'xcscope)
(add-to-list 'load-path "/usr/share/emacs/site-lisp/semantic")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/eieio")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/speedbar")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/ecb")
(require 'ecb-autoloads)
复制代码
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
pluskid
pluskid
当前离线
积分
1322
IP卡
狗仔卡
发表于 2006-9-30 08:27:05
|
显示全部楼层
你是按了 M-@ ,而不是 C-@ ,是不是?
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
浏览过的版块
Gentoo Linux
LFS(LinuxfromScratch)
Linux 基础讨论区(新手速成)
BSD 讨论专题
Ubuntu Linux 专题讨论
Redhat/Fedora/CentOS Linux
服务器架设、应用、维护
Mandriva Linux
硬件设备 Linux 驱动
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表