Permalink
Browse files

Merge branch 'master' of github.com:auto-complete/auto-complete

  • Loading branch information...
2 parents 30fbfcf + d44b6f1 commit 31d73967fc28f4764200307dc92e2d81fcd3ff6c Tomohiro Matsuyama committed Dec 2, 2012
Showing with 339 additions and 4 deletions.
  1. +2 −0 README.md
  2. +11 −4 auto-complete.el
  3. +313 −0 dict/verilog-mode
  4. +13 −0 tests/auto-complete-test.el
View
@@ -3,6 +3,8 @@ Auto Complete Mode
[![Build Status](https://secure.travis-ci.org/auto-complete/auto-complete.png)](http://travis-ci.org/auto-complete/auto-complete)
+**FOR BEST RESULTS, USE AT LEAST EMACS REVISION 110135**. You'll need to build from source, at least until Emacs 24.3 is officially released. Earlier revisions contain a nasty bug that can cause your Emacs to segfault when using auto-complete.
+
Documentation
-------------
View
@@ -195,7 +195,8 @@
makefile-mode sh-mode fortran-mode f90-mode ada-mode
xml-mode sgml-mode
ts-mode
- sclang-mode)
+ sclang-mode
+ verilog-mode)
"Major modes `auto-complete-mode' can run on."
:type '(repeat symbol)
:group 'auto-complete)
@@ -1148,7 +1149,10 @@ You can not use it in source definition like (prefix . `NAME')."
"Expand `STRING' into the buffer and update `ac-prefix' to `STRING'.
This function records deletion and insertion sequences by `undo-boundary'.
If `remove-undo-boundary' is non-nil, this function also removes `undo-boundary'
-that have been made before in this function."
+that have been made before in this function. When `buffer-undo-list' is
+`t', `remove-undo-boundary' has no effect."
+ (when (eq buffer-undo-list t)
+ (setq remove-undo-boundary nil))
(when (not (equal string (buffer-substring ac-point (point))))
(undo-boundary)
;; We can't use primitive-undo since it undoes by
@@ -1738,8 +1742,11 @@ completion menu. This workaround stops that annoying behavior."
"Source definition macro. It defines a complete command also."
(declare (indent 1))
`(progn
- (defvar ,(intern (format "ac-source-%s" name))
- ,source)
+ (defvar ,(intern (format "ac-source-%s" name)))
+ ;; Use `setq' to reset ac-source-NAME every time
+ ;; `ac-define-source' is called. This is useful, for example
+ ;; when evaluating `ac-define-source' using C-M-x (`eval-defun').
+ (setq ,(intern (format "ac-source-%s" name)) ,source)
(defun ,(intern (format "ac-complete-%s" name)) ()
(interactive)
(auto-complete '(,(intern (format "ac-source-%s" name)))))))
View
@@ -0,0 +1,313 @@
+`define
+`else
+`endif
+`ifdef
+`ifndef
+`macromodule
+`module
+`primitive
+`timescale
+above
+abs
+absdelay
+ac_stim
+acos
+acosh
+alias
+aliasparam
+always
+always_comb
+always_ff
+always_latch
+analog
+analysis
+and
+asin
+asinh
+assert
+assign
+assume
+atan
+atan2
+atanh
+automatic
+before
+begin
+bind
+bins
+binsof
+bit
+branch
+break
+buf
+bufif0
+bufif1
+byte
+case
+casex
+casez
+cell
+chandle
+class
+clocking
+cmos
+config
+connectmodule
+connectrules
+const
+constraint
+context
+continue
+cos
+cosh
+cover
+covergroup
+coverpoint
+cross
+ddt
+ddx
+deassign
+default
+define
+defparam
+design
+disable
+discipline
+dist
+do
+driver_update
+edge
+else
+end
+endcase
+endclass
+endclocking
+endconfig
+endconnectrules
+enddiscipline
+endfunction
+endgenerate
+endgroup
+endif
+endinterface
+endmodule
+endnature
+endpackage
+endparamset
+endprimitive
+endprogram
+endproperty
+endsequence
+endspecify
+endtable
+endtask
+enum
+event
+exclude
+exp
+expect
+export
+extends
+extern
+final
+final_step
+first_match
+flicker_noise
+floor
+flow
+for
+force
+foreach
+forever
+fork
+forkjoin
+from
+function
+generate
+genvar
+ground
+highz0
+highz1
+hypot
+idt
+idtmod
+if
+ifdef
+iff
+ifndef
+ifnone
+ignore_bins
+illegal_bins
+import
+incdir
+include
+inf
+initial
+initial_step
+inout
+input
+inside
+instance
+int
+integer
+interface
+intersect
+join
+join_any
+join_none
+laplace_nd
+laplace_np
+laplace_zd
+laplace_zp
+large
+last_crossing
+liblist
+library
+limexp
+ln
+local
+localparam
+log
+logic
+longint
+macromodule
+mailbox
+matches
+max
+medium
+min
+modport
+module
+nand
+nand
+nature
+negedge
+net_resolution
+new
+nmos
+nmos
+noise_table
+nor
+noshowcancelled
+not
+notif0
+notif1
+null
+or
+output
+package
+packed
+parameter
+paramset
+pmos
+pmos
+posedge
+potential
+pow
+primitive
+priority
+program
+property
+protected
+pull0
+pull1
+pullup
+pulsestyle_ondetect
+pulsestyle_onevent
+pure
+rand
+randc
+randcase
+randcase
+randsequence
+rcmos
+real
+realtime
+ref
+reg
+release
+repeat
+return
+rnmos
+rpmos
+rtran
+rtranif0
+rtranif1
+scalared
+semaphore
+sequence
+shortint
+shortreal
+showcancelled
+signed
+sin
+sinh
+slew
+small
+solve
+specify
+specparam
+sqrt
+static
+string
+strong0
+strong1
+struct
+super
+supply
+supply0
+supply1
+table
+tagged
+tan
+tanh
+task
+then
+this
+throughout
+time
+timeprecision
+timer
+timescale
+timeunit
+tran
+tran
+tranif0
+tranif1
+transition
+tri
+tri
+tri0
+tri1
+triand
+trior
+trireg
+type
+typedef
+union
+unique
+unsigned
+use
+uwire
+var
+vectored
+virtual
+void
+wait
+wait_order
+wand
+weak0
+weak1
+while
+white_noise
+wildcard
+wire
+with
+within
+wor
+wreal
+xnor
+xor
+zi_nd
+zi_np
+zi_zd
@@ -51,3 +51,16 @@
(should (popup-live-p ac-menu))
(should (equal (popup-list ac-menu) '("FooBar")))
)))
+
+(ert-deftest ac-test-complete-common-part-when-buffer-undo-list-is-t ()
+ (ac-test-with-common-setup
+ (let ((ac-source-test
+ '((candidates list "Foo" "FooBar" "Bar" "Baz" "LongLongLine")))
+ (ac-sources '(ac-source-test)))
+ (execute-kbd-macro "Fo")
+ (let ((last-command this-command)
+ (buffer-undo-list t))
+ (auto-complete))
+ (ac-stop)
+ (should (string= (buffer-string) "Foo"))
+ )))

0 comments on commit 31d7396

Please sign in to comment.