[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.lisp

auto-complete

Haris Bogdanovi?

10/15/2015 8:30:00 PM

Hi

This is my .emacs file:

; ----------------------------------------------------------

(setq package-archives '(("gnu" . "http://elpa.gnu.org/packa...)
("marmalade" . "https://marmalade-repo.org/packa...)
("melpa" . "http://melpa.org/packa...)))


(add-to-list 'load-path "C:/Users/h/AppData/Roaming/.emacs.d/elpa/slime-20150830.1446")
(require 'slime)
(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))

(setq inferior-lisp-program "C:/Users/h/ccl/wx86cl")

(add-to-list 'load-path "~/.emacs.d/elpa/ac-slime-20150729.2035")
;; enable autocomplete

(add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20150618.1949")
(add-to-list 'load-path "~/.emacs.d/elpa/popup-20150626.711")

(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/dictionary-20140717.2029")
(ac-config-default)
(global-auto-complete-mode t)
(auto-complete-mode t)

(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(eval-after-load "auto-complete"
'(add-to-list 'ac-modes 'slime-repl-mode))




(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)



(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.
'(blink-cursor-mode nil)
'(show-paren-mode t)
'(initial-frame-alist (quote ((fullscreen . maximized)))))


(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.
)

(slime)

; -----------------------------------------------------------

Why doesn't my auto-completion work ?

Thanks
3 Answers

Paul Duca

6/18/2012 2:48:00 AM

0

On Jun 16, 8:37 am, duke <duckgumb...@cox.net> wrote:
> On Sat, 16 Jun 2012 01:51:28 -0700 (PDT), Tracey12 <tracey12em...@gmail.com>
> wrote:
>
> >We are approaching our Independence Day celebration.  But, what's it
> >worth?  We've got a dictatorial president in the White House who is
> >usurping the authority of Congress.  He is working against the will of
> >the people.  He is an authoritarian, and he is scary.
>
> With Emperor buckwheat taking over the country and removing the Congress ref the
> illegal alien children, I think we can just eliminate July 4 as a holiday.
>
Without undocumented workers, who's going to wipe Duke's butt when he
winds up in a nursing home?

Paul

Barry Margolin

10/16/2015 12:33:00 AM

0

You'll do better posting Emacs-specific questions to an Emacs newsgroup.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Matthew Carter

10/16/2015 1:29:00 AM

0

haris.bogdanovic@gmail.com writes:

> Hi
>
> This is my .emacs file:
>
> ; ----------------------------------------------------------
>
> (setq package-archives '(("gnu" . "http://elpa.gnu.org/packa...)
> ("marmalade" . "https://marmalade-repo.org/packa...)
> ("melpa" . "http://melpa.org/packa...)))
>
>
> (add-to-list 'load-path "C:/Users/h/AppData/Roaming/.emacs.d/elpa/slime-20150830.1446")
> (require 'slime)
> (add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
> (add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
>
> (setq inferior-lisp-program "C:/Users/h/ccl/wx86cl")
>
> (add-to-list 'load-path "~/.emacs.d/elpa/ac-slime-20150729.2035")
> ;; enable autocomplete
>
> (add-to-list 'load-path "~/.emacs.d/elpa/auto-complete-20150618.1949")
> (add-to-list 'load-path "~/.emacs.d/elpa/popup-20150626.711")
>
> (require 'auto-complete-config)
> (add-to-list 'ac-dictionary-directories "~/.emacs.d/elpa/dictionary-20140717.2029")
> (ac-config-default)
> (global-auto-complete-mode t)
> (auto-complete-mode t)
>
> (add-hook 'slime-mode-hook 'set-up-slime-ac)
> (add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
> (eval-after-load "auto-complete"
> '(add-to-list 'ac-modes 'slime-repl-mode))
>
>
>
>
> (require 'ac-slime)
> (add-hook 'slime-mode-hook 'set-up-slime-ac)
>
>
>
> (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.
> '(blink-cursor-mode nil)
> '(show-paren-mode t)
> '(initial-frame-alist (quote ((fullscreen . maximized)))))
>
>
> (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.
> )
>
> (slime)
>
> ; -----------------------------------------------------------
>
> Why doesn't my auto-completion work ?
>
> Thanks

If installing via ELPA (M-x package-install) you do not need the
#'add-to-list 'load-path calls strewn about.

A minimal example for auto complete + slime is:

(package-initialize)
(require 'popup)
(require 'auto-complete)
(require 'auto-complete-config)
(ac-config-default)
(setq global-auto-complete-mode t)
(require 'ac-slime)
(add-hook 'slime-mode-hook 'set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(eval-after-load "auto-complete"
'(progn
(setq ac-delay 0.5)
(define-key ac-menu-map (kbd "<tab>") nil)
(define-key ac-menu-map (kbd "<S-tab>") nil)
(add-to-list 'ac-modes 'slime-repl-mode)))

Obviously make sure you have anything you are #'require ing installed.

--
Matthew Carter (m@ahungry.com)
http://a...