emacs24

“value returned is unused” warning when byte-compiling a macro

本小妞迷上赌 提交于 2019-12-06 13:54:36
Why does byte-compiling the the following produce a warning? (defmacro foomacro (shiftcode) `(defun foo (&optional arg) (interactive ,(concat shiftcode "p")) (message "arg is %i" arg)) `(defun bar (&optional arg) (interactive ,(concat shiftcode "Nenter a number: ")) (message "arg is %i" arg))) ;; provide backward compatibility for Emacs 22 (if (fboundp 'handle-shift-selection) (foomacro "^") (foomacro "")) This is the warning I get: $ emacs -Q --batch --eval '(byte-compile-file "foo.el")' In foomacro: foo.el:1:21:Warning: value returned from (concat shiftcode "p") is unused If I get rid of bar

Clojure - connection issue re-running cider-jack-in

瘦欲@ 提交于 2019-12-06 12:58:44
问题 I recently started using CIDER under Emacs 24. My workflow involves going to a remote server via Tramp and then executing cider-jack-in to run the nREPL server connected to Clojure on that server. It all works fine if I run it in a fresh instance of Emacs. But if for some reason the connection is broken or I hibernate the system, I am unable to relaunch the REPL. I get the following message: Connecting to nREPL on localhost:58062... error in process filter: open-network-stream: make client

How can I tell if CEDET is using GNU Global?

和自甴很熟 提交于 2019-12-06 07:49:26
问题 I have CEDET working for the most part on emacs 24.2 with the latest from bzr repository. When I am searching for symbols or definitions, I see that the cedet mini-buffer shows parses through a lot of files, some that are not there as header-files, the files do not have any reference to the symbols I am searching. I will leave CEDET to its job, let it search for symbols as it sees fit. Is there any debug mechanism or verbose mode that I can turn on to see 1) What are all the files it is

How to disable case-sensitivity for filename auto-completion in Emacs 24 shell-mode?

陌路散爱 提交于 2019-12-06 01:55:17
On upgrading from Emacs 23 to Emacs 24, filename completion suddenly became case sensitive in shell-mode . I had customized Emacs 23 to be case insensitive in this case but I forget the exact customizations now. Going over my .emacs file, I see that read-file-name-completion-ignore-case is set to non-nil. However, that seems to have no effect in Emacs 24's shell-mode . So it turns out that shell-mode in Emacs 24 uses pcomplete by default . pcomplete was always the default for eshell but Emacs 24 has made it so for shell too. pcomplete-ignore-case controls case sensitivity for pcomplete . I got

macro expansion: to quote the body forms or not?

我的未来我决定 提交于 2019-12-05 20:50:07
I'm having a hard time understanding exactly how macro expansion works. What is the difference in how the elisp interpreter handles these two snippets of code? (defmacro foo (arg) (message "arg is: %s" arg)) (foo "bar") and: (defmacro foo (arg) `(message "arg is: %s" ,arg)) (foo "bar") You example may be confusing because message both displays a message and returns it. strings (like "bar") are self-evaluating. Instructive Example (defconst zzz 123) (defmacro zzz1 (arg) `(insert (format "arg is: %s" ,arg))) (defmacro zzz2 (arg) (insert (format "arg is: %s" arg))) Evaluate the code above using C

Can't set Emacs Speedbar buffer display mode

喜欢而已 提交于 2019-12-05 19:21:04
I often work with differents active buffer on emacs like : source files SQL buffer shell buffer I try to get speedbar always display buffer mode but I can't find any option that can load this display when emacs is started (default is file mode), and keep it during all session. I also tried ecb history window that can display opened/recently closed edit buffers but there's no way to make it display specials buffers like SQL or shell. How can I customize emacs to get this behavior? I know this question is really old, but I'm going to answer it for anyone searching out there. I did this with a

Emacs, how to auto turn on flyspell for LaTeX file

醉酒当歌 提交于 2019-12-05 18:30:54
I use Emacs only for \LaTeX and python programming. Is there a way to automatically turn on flyspell-mode when I work on a .tex file, and turn on flyspell-prog-mode when I work on a .py file? How can I do this in my .emacs file? Add those functions to hooks of python-mode and latex-mode (require 'python) ;; If you use tex-mode (require 'tex-mode)` (add-hook 'latex-mode-hook 'flyspell-mode) ;; If you use AUCTeX (load "auctex.el" nil t t)` (add-hook 'LaTeX-mode-hook 'flyspell-mode) (add-hook 'python-mode-hook 'flyspell-prog-mode) Something like this should work. (setq auto-mode-alist (cons '("\\

Emacs indentation for html (web-mode) doesn't work properly

≯℡__Kan透↙ 提交于 2019-12-05 06:12:04
I'm using web-mode in Emacs to get syntax highlighting and indentation for PHP and HTML. If I have this code in a .php file <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p> And then put the cursor on the middle line and press tab then nothing happens. I want it to look like this: <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. </p> If I put the text in a tag on a single line and try to indent, it works. This: <p> <a>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a> </p> turns into this, which it should <p> <a>Lorem ipsum dolor sit amet, consectetur

emacs font for western and Other like rtl

梦想与她 提交于 2019-12-05 01:45:14
问题 In office like libreOffice we have two type font in style, western font and CTL font. all English font use western font and other things like persian and arabic font use CTL font. in emacs 24 i want western text use this settings '(default ((t (:stipple nil :background "black" :foreground "chartreuse" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 96 :width normal :family monaco )))) and all rtl and persian text use some thing

Emacs .dir-locals.el - setting key bindings

≡放荡痞女 提交于 2019-12-05 00:48:39
问题 I'm not sure this is possible, but I'd like to setup some project specific key bindings by using .dir-locals.el Of course .dir-locals.el has to contain a special list of settings, so I can't do: (global-set-key [24 down] 'move-text-down) Is there any way I can inject a lambda to run arbitrary code or some other way to set key bindings in .dir-locals.el ? 回答1: The eval pseudo-variable enables you to specify arbitrary elisp for evaluation with your local variables. e.g. https://stackoverflow