commit 3ebf06300b8186feac5e9b436ca263dc908ed886 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sat Feb 21 00:26:13 2015 -0800 Prefer 'Qfoo' to 'intern ("foo")' * buffer.c (syms_of_buffer): * bytecode.c (exec_byte_code): * callint.c (Fcall_interactively): * callproc.c (create_temp_file): * charset.c (define_charset_internal): * coding.c (syms_of_coding): * editfns.c (syms_of_editfns): * emacs.c (main): * fns.c (syms_of_fns): * frame.c (delete_frame, Fframe_parameters): * keyboard.c (syms_of_keyboard): * keymap.c (syms_of_keymap): * minibuf.c (read_minibuf, syms_of_minibuf): * nsfns.m (ns_cursor_type_to_lisp): * textprop.c (syms_of_textprop): * xdisp.c (Fformat_mode_line, syms_of_xdisp): * xfns.c (x_create_tip_frame, Fx_select_font): * xml.c (parse_region): Prefer constants like 'Qfoo' to calls like 'intern ("foo")'. * buffer.c (syms_of_buffer): OK to do (put 'erase-buffer 'disabled t) here now ... (keys_of_buffer): ... instead of here. * ftfont.c (syms_of_ftfont): Move DEFSYM of Qmono from here ... * xfns.c (syms_of_xfns): ... to here, since ftfont.c is more optional than xfns.c. diff --git a/src/ChangeLog b/src/ChangeLog index dc33e41..1692c3f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,32 @@ +2015-02-21 Paul Eggert + + Prefer 'Qfoo' to 'intern ("foo")' + * buffer.c (syms_of_buffer): + * bytecode.c (exec_byte_code): + * callint.c (Fcall_interactively): + * callproc.c (create_temp_file): + * charset.c (define_charset_internal): + * coding.c (syms_of_coding): + * editfns.c (syms_of_editfns): + * emacs.c (main): + * fns.c (syms_of_fns): + * frame.c (delete_frame, Fframe_parameters): + * keyboard.c (syms_of_keyboard): + * keymap.c (syms_of_keymap): + * minibuf.c (read_minibuf, syms_of_minibuf): + * nsfns.m (ns_cursor_type_to_lisp): + * textprop.c (syms_of_textprop): + * xdisp.c (Fformat_mode_line, syms_of_xdisp): + * xfns.c (x_create_tip_frame, Fx_select_font): + * xml.c (parse_region): + Prefer constants like 'Qfoo' to calls like 'intern ("foo")'. + * buffer.c (syms_of_buffer): OK to do (put 'erase-buffer 'disabled + t) here now ... + (keys_of_buffer): ... instead of here. + * ftfont.c (syms_of_ftfont): Move DEFSYM of Qmono from here ... + * xfns.c (syms_of_xfns): ... to here, since ftfont.c is more + optional than xfns.c. + 2015-02-20 Jan Djärv * emacs.c (terminate_due_to_signal): Move totally_unblock_input after diff --git a/src/buffer.c b/src/buffer.c index 67eda3e..371588b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5408,7 +5408,7 @@ syms_of_buffer (void) DEFSYM (Qoverwrite_mode, "overwrite-mode"); Fput (Qoverwrite_mode, Qchoice, list3 (Qnil, intern ("overwrite-mode-textual"), - intern ("overwrite-mode-binary"))); + Qoverwrite_mode_binary)); Fput (Qprotected_field, Qerror_conditions, listn (CONSTYPE_PURE, 2, Qprotected_field, Qerror)); @@ -6326,6 +6326,8 @@ Functions running this hook are, `get-buffer-create', defsubr (&Soverlay_get); defsubr (&Soverlay_put); defsubr (&Srestore_buffer_modified_p); + + Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); } void @@ -6333,8 +6335,4 @@ keys_of_buffer (void) { initial_define_key (control_x_map, 'b', "switch-to-buffer"); initial_define_key (control_x_map, 'k', "kill-buffer"); - - /* This must not be in syms_of_buffer, because Qdisabled is not - initialized when that function gets called. */ - Fput (intern_c_string ("erase-buffer"), Qdisabled, Qt); } diff --git a/src/bytecode.c b/src/bytecode.c index b458367..55789b4 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -1945,10 +1945,10 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth, /* Actually this is Bstack_ref with offset 0, but we use Bdup for that instead. */ /* CASE (Bstack_ref): */ - call3 (intern ("error"), - build_string ("Invalid byte opcode: op=%s, ptr=%d"), - make_number (op), - make_number ((stack.pc - 1) - stack.byte_string_start)); + call3 (Qerror, + build_string ("Invalid byte opcode: op=%s, ptr=%d"), + make_number (op), + make_number ((stack.pc - 1) - stack.byte_string_start)); /* Handy byte-codes for lexical binding. */ CASE (Bstack_ref1): diff --git a/src/callint.c b/src/callint.c index 60021fd..0c6c030 100644 --- a/src/callint.c +++ b/src/callint.c @@ -615,9 +615,9 @@ invoke it. If KEYS is omitted or nil, the return value of { Lisp_Object tem2; - teml = Fget (teml, intern ("event-symbol-elements")); + teml = Fget (teml, Qevent_symbol_elements); /* Ignore first element, which is the base key. */ - tem2 = Fmemq (intern ("down"), Fcdr (teml)); + tem2 = Fmemq (Qdown, Fcdr (teml)); if (! NILP (tem2)) up_event = Fread_event (Qnil, Qnil, Qnil); } @@ -647,9 +647,9 @@ invoke it. If KEYS is omitted or nil, the return value of { Lisp_Object tem2; - teml = Fget (teml, intern ("event-symbol-elements")); + teml = Fget (teml, Qevent_symbol_elements); /* Ignore first element, which is the base key. */ - tem2 = Fmemq (intern ("down"), Fcdr (teml)); + tem2 = Fmemq (Qdown, Fcdr (teml)); if (! NILP (tem2)) up_event = Fread_event (Qnil, Qnil, Qnil); } diff --git a/src/callproc.c b/src/callproc.c index 63ab9bf..e1fe8ed 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -1020,7 +1020,7 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args, specbind (intern ("coding-system-for-write"), val); /* POSIX lets mk[s]temp use "."; don't invoke jka-compr if we happen to get a ".Z" suffix. */ - specbind (intern ("file-name-handler-alist"), Qnil); + specbind (Qfile_name_handler_alist, Qnil); write_region (start, end, filename_string, Qnil, Qlambda, Qnil, Qnil, fd); unbind_to (count1, Qnil); diff --git a/src/charset.c b/src/charset.c index 9080840..f1aa074 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1268,7 +1268,7 @@ define_charset_internal (Lisp_Object name, args[charset_arg_plist] = listn (CONSTYPE_HEAP, 14, - intern_c_string (":name"), + QCname, args[charset_arg_name], intern_c_string (":dimension"), args[charset_arg_dimension], @@ -1278,7 +1278,7 @@ define_charset_internal (Lisp_Object name, args[charset_arg_iso_final], intern_c_string (":emacs-mule-id"), args[charset_arg_emacs_mule_id], - intern_c_string (":ascii-compatible-p"), + QCascii_compatible_p, args[charset_arg_ascii_compatible_p], intern_c_string (":code-offset"), args[charset_arg_code_offset]); diff --git a/src/coding.c b/src/coding.c index 1a0e1279..4b41355 100644 --- a/src/coding.c +++ b/src/coding.c @@ -11281,15 +11281,15 @@ internal character representation. */); Lisp_Object plist[] = { - intern_c_string (":name"), + QCname, args[coding_arg_name] = Qno_conversion, - intern_c_string (":mnemonic"), + QCmnemonic, args[coding_arg_mnemonic] = make_number ('='), intern_c_string (":coding-type"), args[coding_arg_coding_type] = Qraw_text, - intern_c_string (":ascii-compatible-p"), + QCascii_compatible_p, args[coding_arg_ascii_compatible_p] = Qt, - intern_c_string (":default-char"), + QCdefault_char, args[coding_arg_default_char] = make_number (0), intern_c_string (":for-unibyte"), args[coding_arg_for_unibyte] = Qt, diff --git a/src/editfns.c b/src/editfns.c index c205ca3..dbcb316 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -4973,8 +4973,7 @@ of the buffer being accessed. */); /* Do this here, because init_buffer_once is too early--it won't work. */ Fset_buffer (Vprin1_to_string_buffer); /* Make sure buffer-access-fontify-functions is nil in this buffer. */ - Fset (Fmake_local_variable (intern_c_string ("buffer-access-fontify-functions")), - Qnil); + Fset (Fmake_local_variable (Qbuffer_access_fontify_functions), Qnil); Fset_buffer (obuf); } diff --git a/src/emacs.c b/src/emacs.c index 5905799..4a6d6ba 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -1570,13 +1570,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem if (filename_from_ansi (file, file_utf8) == 0) file = file_utf8; #endif - Vtop_level = list2 (intern_c_string ("load"), - build_unibyte_string (file)); + Vtop_level = list2 (Qload, build_unibyte_string (file)); } /* Unless next switch is -nl, load "loadup.el" first thing. */ if (! no_loadup) - Vtop_level = list2 (intern_c_string ("load"), - build_string ("loadup.el")); + Vtop_level = list2 (Qload, build_string ("loadup.el")); } /* Set up for profiling. This is known to work on FreeBSD, diff --git a/src/fns.c b/src/fns.c index 4c70951..51f61d2 100644 --- a/src/fns.c +++ b/src/fns.c @@ -5093,7 +5093,7 @@ syms_of_fns (void) DEFVAR_LISP ("features", Vfeatures, doc: /* A list of symbols which are the features of the executing Emacs. Used by `featurep' and `require', and altered by `provide'. */); - Vfeatures = list1 (intern_c_string ("emacs")); + Vfeatures = list1 (Qemacs); DEFSYM (Qsubfeatures, "subfeatures"); DEFSYM (Qfuncall, "funcall"); diff --git a/src/frame.c b/src/frame.c index 92b6b7c..d82df09 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1544,7 +1544,7 @@ delete_frame (Lisp_Object frame, Lisp_Object force) } } - is_tooltip_frame = !NILP (Fframe_parameter (frame, intern ("tooltip"))); + is_tooltip_frame = !NILP (Fframe_parameter (frame, Qtooltip)); /* Run `delete-frame-functions' unless FORCE is `noelisp' or frame is a tooltip. FORCE is set to `noelisp' when handling @@ -2533,7 +2533,7 @@ If FRAME is omitted or nil, return information on the currently selected frame. else store_in_alist (&alist, Qbackground_color, tty_color_name (f, FRAME_BACKGROUND_PIXEL (f))); - store_in_alist (&alist, intern ("font"), + store_in_alist (&alist, Qfont, build_string (FRAME_MSDOS_P (f) ? "ms-dos" : FRAME_W32_P (f) ? "w32term" diff --git a/src/ftfont.c b/src/ftfont.c index adf1888..26740c2 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -2659,7 +2659,6 @@ syms_of_ftfont (void) DEFSYM (Qmonospace, "monospace"); DEFSYM (Qsans_serif, "sans-serif"); DEFSYM (Qserif, "serif"); - DEFSYM (Qmono, "mono"); DEFSYM (Qsans, "sans"); DEFSYM (Qsans__serif, "sans serif"); diff --git a/src/keyboard.c b/src/keyboard.c index ab57553..c217453 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -11598,7 +11598,7 @@ and the minor mode maps regardless of `overriding-local-map'. */); DEFVAR_LISP ("special-event-map", Vspecial_event_map, doc: /* Keymap defining bindings for special events to execute at low level. */); - Vspecial_event_map = list1 (intern_c_string ("keymap")); + Vspecial_event_map = list1 (Qkeymap); DEFVAR_LISP ("track-mouse", do_mouse_tracking, doc: /* Non-nil means generate motion events for mouse motion. */); diff --git a/src/keymap.c b/src/keymap.c index 34fe1cb..d10c004 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3730,8 +3730,8 @@ be preferred. */); staticpro (&Vmouse_events); Vmouse_events = listn (CONSTYPE_PURE, 9, Qmenu_bar, - intern_c_string ("tool-bar"), - intern_c_string ("header-line"), + Qtool_bar, + Qheader_line, Qmode_line, intern_c_string ("mouse-1"), intern_c_string ("mouse-2"), diff --git a/src/minibuf.c b/src/minibuf.c index 3408bb9..2dc5c54 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -395,7 +395,7 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt, Lisp_Object dummy, frame; specbind (Qminibuffer_default, defalt); - specbind (intern ("inhibit-read-only"), Qnil); + specbind (Qinhibit_read_only, Qnil); /* If Vminibuffer_completing_file_name is `lambda' on entry, it was t in previous recursive minibuffer, but was not set explicitly @@ -2070,9 +2070,7 @@ with completion; they always discard text properties. */); doc: /* Text properties that are added to minibuffer prompts. These are in addition to the basic `field' property, and stickiness properties. */); - /* We use `intern' here instead of Qread_only to avoid - initialization-order problems. */ - Vminibuffer_prompt_properties = list2 (intern_c_string ("read-only"), Qt); + Vminibuffer_prompt_properties = list2 (Qread_only, Qt); DEFVAR_LISP ("read-hide-char", Vread_hide_char, doc: /* Whether to hide input characters in noninteractive mode. diff --git a/src/nsfns.m b/src/nsfns.m index cc2e496..9e379e2 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -849,9 +849,9 @@ ns_cursor_type_to_lisp (int arg) switch (arg) { case FILLED_BOX_CURSOR: return Qbox; - case HOLLOW_BOX_CURSOR: return intern ("hollow"); - case HBAR_CURSOR: return intern ("hbar"); - case BAR_CURSOR: return intern ("bar"); + case HOLLOW_BOX_CURSOR: return Qhollow; + case HBAR_CURSOR: return Qhbar; + case BAR_CURSOR: return Qbar; case NO_CURSOR: default: return intern ("no"); } diff --git a/src/textprop.c b/src/textprop.c index 35f22bf..740b962 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -2356,8 +2356,7 @@ inherits it if NONSTICKINESS is nil. The `front-sticky' and /* Text properties `syntax-table'and `display' should be nonsticky by default. */ Vtext_property_default_nonsticky - = list2 (Fcons (intern_c_string ("syntax-table"), Qt), - Fcons (intern_c_string ("display"), Qt)); + = list2 (Fcons (Qsyntax_table, Qt), Fcons (Qdisplay, Qt)); staticpro (&interval_insert_behind_hooks); staticpro (&interval_insert_in_front_hooks); diff --git a/src/xdisp.c b/src/xdisp.c index 57a5631..3f57841 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22656,7 +22656,7 @@ are the selected window and the WINDOW's buffer). */) else { mode_line_string_list = Fnreverse (mode_line_string_list); - str = Fmapconcat (intern ("identity"), mode_line_string_list, + str = Fmapconcat (Qidentity, mode_line_string_list, empty_unibyte_string); } @@ -30491,8 +30491,7 @@ syms_of_xdisp (void) DEFSYM (Qinhibit_free_realized_faces, "inhibit-free-realized-faces"); - list_of_error = list1 (list2 (intern_c_string ("error"), - intern_c_string ("void-variable"))); + list_of_error = list1 (list2 (Qerror, Qvoid_variable)); staticpro (&list_of_error); /* Values of those variables at last redisplay are stored as diff --git a/src/xfns.c b/src/xfns.c index 629ac4b..80be6ac 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5185,7 +5185,7 @@ x_create_tip_frame (struct x_display_info *dpyinfo, Lisp_Object disptype; if (FRAME_DISPLAY_INFO (f)->n_planes == 1) - disptype = intern ("mono"); + disptype = Qmono; else if (FRAME_DISPLAY_INFO (f)->visual->class == GrayScale || FRAME_DISPLAY_INFO (f)->visual->class == StaticGray) disptype = intern ("grayscale"); @@ -6007,7 +6007,7 @@ nil, it defaults to the selected frame. */) GCPRO2 (font_param, font); XSETFONT (font, FRAME_FONT (f)); - font_param = Ffont_get (font, intern (":name")); + font_param = Ffont_get (font, QCname); if (STRINGP (font_param)) default_name = xlispstrdup (font_param); else @@ -6194,6 +6194,7 @@ syms_of_xfns (void) DEFSYM (Qcompound_text, "compound-text"); DEFSYM (Qcancel_timer, "cancel-timer"); DEFSYM (Qfont_param, "font-parameter"); + DEFSYM (Qmono, "mono"); Fput (Qundefined_color, Qerror_conditions, listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror)); diff --git a/src/xml.c b/src/xml.c index e324177..a3f9239 100644 --- a/src/xml.c +++ b/src/xml.c @@ -237,8 +237,7 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url, if (node != NULL) result = make_dom (node); } else - result = Fcons (intern ("top"), - Fcons (Qnil, Fnreverse (Fcons (r, result)))); + result = Fcons (Qtop, Fcons (Qnil, Fnreverse (Fcons (r, result)))); xmlFreeDoc (doc); } commit 066b17df681fabb40108d719086669957aebbc51 Author: Paul Eggert Date: Fri Feb 20 23:31:17 2015 -0800 Merge from gnulib * doc/misc/texinfo.tex: Update from gnulib. * lib/getdtablesize.c, lib/getopt.c, lib/signal.in.h, lib/tempname.c: * lib/tempname.h, m4/dup2.m4, m4/fcntl.m4, m4/getdtablesize.m4: Update from gnulib, incorporating: 2015-02-20 getdtablesize: port better for Android 2015-02-19 fcntl: Fix cross compiling 2015-02-18 dup2, fcntl: cross-compile better for Android 2015-02-18 getopt: don't crash on memory exhaustion 2015-02-17 tempname: allow compilation with C++ (trivial) 2015-02-17 dup2, fcntl: port to AIX 2015-02-16 getdtablesize, dup2, fcntl: port to Android 2015-02-11 getdtablesize, signal_h: Fix Android build 2015-02-11 maint: various whitespace cleanups in tempname diff --git a/ChangeLog b/ChangeLog index 4365668..41bff0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2015-02-21 Paul Eggert + + Merge from gnulib + * lib/getdtablesize.c, lib/getopt.c, lib/signal.in.h, lib/tempname.c: + * lib/tempname.h, m4/dup2.m4, m4/fcntl.m4, m4/getdtablesize.m4: + Update from gnulib, incorporating: + 2015-02-20 getdtablesize: port better for Android + 2015-02-19 fcntl: Fix cross compiling + 2015-02-18 dup2, fcntl: cross-compile better for Android + 2015-02-18 getopt: don't crash on memory exhaustion + 2015-02-17 tempname: allow compilation with C++ (trivial) + 2015-02-17 dup2, fcntl: port to AIX + 2015-02-16 getdtablesize, dup2, fcntl: port to Android + 2015-02-11 getdtablesize, signal_h: Fix Android build + 2015-02-11 maint: various whitespace cleanups in tempname + 2015-02-13 Jan Djärv * configure.ac: Set locallisppath to empty for NS self contained, diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index c796b75..d04a8bb 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,7 @@ +2015-02-21 Paul Eggert + + * texinfo.tex: Update from gnulib. + 2015-02-10 Lars Ingebrigtsen * eww.texi (Basics): Mention eww-toggle-fonts. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 96b212d..8236d7d 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2015-01-31.10} +\def\texinfoversion{2015-02-05.16} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -4489,7 +4489,6 @@ end % Called from \indexdummies and \atdummies. % \def\commondummies{% - % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for @@ -4566,6 +4565,7 @@ end \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq + \definedummyword\mathopsup \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds @@ -4579,6 +4579,8 @@ end \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result + \definedummyword\sub + \definedummyword\sup \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. @@ -4653,6 +4655,7 @@ end \definedummyword\samp \definedummyword\strong \definedummyword\tie + \definedummyword\U \definedummyword\uref \definedummyword\url \definedummyword\var @@ -8335,14 +8338,7 @@ end \catcode`\\=\other % % Make the characters 128-255 be printing characters. - {% - \count1=128 - \def\loop{% - \catcode\count1=\other - \advance\count1 by 1 - \ifnum \count1<256 \loop \fi - }% - }% + {\setnonasciicharscatcodenonglobal\other}% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 @@ -9831,15 +9827,51 @@ directory should work if nowhere else does.} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs - % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } +% Latin1 (ISO-8859-1) character definitions. +\def\nonasciistringdefs{% + \setnonasciicharscatcode\active + \def\defstringchar##1{\def##1{\string##1}}% + \defstringchar^^a0\defstringchar^^a1\defstringchar^^a2\defstringchar^^a3% + \defstringchar^^a4\defstringchar^^a5\defstringchar^^a6\defstringchar^^a7% + \defstringchar^^a8\defstringchar^^a9\defstringchar^^aa\defstringchar^^ab% + \defstringchar^^ac\defstringchar^^ad\defstringchar^^ae\defstringchar^^af% + % + \defstringchar^^b0\defstringchar^^b1\defstringchar^^b2\defstringchar^^b3% + \defstringchar^^b4\defstringchar^^b5\defstringchar^^b6\defstringchar^^b7% + \defstringchar^^b8\defstringchar^^b9\defstringchar^^ba\defstringchar^^bb% + \defstringchar^^bc\defstringchar^^bd\defstringchar^^be\defstringchar^^bf% + % + \defstringchar^^c0\defstringchar^^c1\defstringchar^^c2\defstringchar^^c3% + \defstringchar^^c4\defstringchar^^c5\defstringchar^^c6\defstringchar^^c7% + \defstringchar^^c8\defstringchar^^c9\defstringchar^^ca\defstringchar^^cb% + \defstringchar^^cc\defstringchar^^cd\defstringchar^^ce\defstringchar^^cf% + % + \defstringchar^^d0\defstringchar^^d1\defstringchar^^d2\defstringchar^^d3% + \defstringchar^^d4\defstringchar^^d5\defstringchar^^d6\defstringchar^^d7% + \defstringchar^^d8\defstringchar^^d9\defstringchar^^da\defstringchar^^db% + \defstringchar^^dc\defstringchar^^dd\defstringchar^^de\defstringchar^^df% + % + \defstringchar^^e0\defstringchar^^e1\defstringchar^^e2\defstringchar^^e3% + \defstringchar^^e4\defstringchar^^e5\defstringchar^^e6\defstringchar^^e7% + \defstringchar^^e8\defstringchar^^e9\defstringchar^^ea\defstringchar^^eb% + \defstringchar^^ec\defstringchar^^ed\defstringchar^^ee\defstringchar^^ef% + % + \defstringchar^^f0\defstringchar^^f1\defstringchar^^f2\defstringchar^^f3% + \defstringchar^^f4\defstringchar^^f5\defstringchar^^f6\defstringchar^^f7% + \defstringchar^^f8\defstringchar^^f9\defstringchar^^fa\defstringchar^^fb% + \defstringchar^^fc\defstringchar^^fd\defstringchar^^fe\defstringchar^^ff% +} + + % define all the unicode characters we know about, for the sake of @U. \utfeightchardefs + % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. @@ -10193,6 +10225,7 @@ directory should work if nowhere else does.} % {@catcode`- = @active @gdef@normalturnoffactive{% + @nonasciistringdefs @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 59b9736..bad45f7 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -84,32 +84,31 @@ getdtablesize (void) return dtablesize; } -#elif HAVE_GETDTABLESIZE +#else +# include # include -# undef getdtablesize + +# ifdef __CYGWIN__ + /* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it + hits the compile-time constant hard limit of 3200. We might as + well just report the hard limit. */ +# define rlim_cur rlim_max +# endif int -rpl_getdtablesize(void) +getdtablesize (void) { - /* To date, this replacement is only compiled for Cygwin 1.7.25, - which auto-increased the RLIMIT_NOFILE soft limit until it - hits the compile-time constant hard limit of 3200. Although - that version of cygwin supported a child process inheriting - a smaller soft limit, the smaller limit is not enforced, so - we might as well just report the hard limit. */ struct rlimit lim; - if (!getrlimit (RLIMIT_NOFILE, &lim) && lim.rlim_max != RLIM_INFINITY) - return lim.rlim_max; - return getdtablesize (); -} -#elif defined _SC_OPEN_MAX + if (getrlimit (RLIMIT_NOFILE, &lim) == 0 + && 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX + && lim.rlim_cur != RLIM_INFINITY + && lim.rlim_cur != RLIM_SAVED_CUR + && lim.rlim_cur != RLIM_SAVED_MAX) + return lim.rlim_cur; -int -getdtablesize (void) -{ - return sysconf (_SC_OPEN_MAX); + return INT_MAX; } #endif diff --git a/lib/getopt.c b/lib/getopt.c index 3b9c585..212cbf7 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -487,7 +487,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *p; struct option_list *next; } *ambig_list = NULL; +#ifdef _LIBC +/* malloc() not used for _LIBC to simplify failure messages. */ +# define free_option_list(l) +#else +# define free_option_list(l) \ + while (l != NULL) \ + { \ + struct option_list *pn = l->next; \ + free (l); \ + l = pn; \ + } +#endif int exact = 0; + int ambig = 0; int indfound = -1; int option_index; @@ -514,22 +527,37 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, pfound = p; indfound = option_index; } + else if (ambig) + ; /* Taking simpler path to handling ambiguities. */ else if (long_only || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) { /* Second or later nonexact match found. */ +#ifdef _LIBC + struct option_list *newp = alloca (sizeof (*newp)); +#else struct option_list *newp = malloc (sizeof (*newp)); - newp->p = p; - newp->next = ambig_list; - ambig_list = newp; + if (newp == NULL) + { + free_option_list (ambig_list); + ambig_list = NULL; + ambig = 1; /* Use simpler fallback message. */ + } + else +#endif + { + newp->p = p; + newp->next = ambig_list; + ambig_list = newp; + } } } - if (ambig_list != NULL && !exact) + if ((ambig || ambig_list) && !exact) { - if (print_errors) + if (print_errors && ambig_list) { struct option_list first; first.p = pfound; @@ -585,18 +613,20 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, fputc ('\n', stderr); #endif } + else if (print_errors && ambig) + { + fprintf (stderr, + _("%s: option '%s' is ambiguous\n"), + argv[0], argv[d->optind]); + } d->__nextchar += strlen (d->__nextchar); d->optind++; d->optopt = 0; + free_option_list (ambig_list); return '?'; } - while (ambig_list != NULL) - { - struct option_list *pn = ambig_list->next; - free (ambig_list); - ambig_list = pn; - } + free_option_list (ambig_list); if (pfound != NULL) { diff --git a/lib/signal.in.h b/lib/signal.in.h index 0f2ff5a..265b72a 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -55,11 +55,13 @@ #ifndef _@GUARD_PREFIX@_SIGNAL_H #define _@GUARD_PREFIX@_SIGNAL_H -/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare - pthread_sigmask in , not in . +/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android + declare pthread_sigmask in , not in . But avoid namespace pollution on glibc systems.*/ #if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \ - && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \ + && ((defined __APPLE__ && defined __MACH__) \ + || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \ + || defined __sun || defined __ANDROID__) \ && ! defined __GLIBC__ # include #endif diff --git a/lib/tempname.c b/lib/tempname.c index 088b224..8e6d26c 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -62,6 +62,7 @@ # define struct_stat64 struct stat64 #else # define struct_stat64 struct stat +# define __try_tempname try_tempname # define __gen_tempname gen_tempname # define __getpid getpid # define __gettimeofday gettimeofday @@ -176,21 +177,9 @@ __path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, static const char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; -/* Generate a temporary file name based on TMPL. TMPL must match the - rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). - The name constructed does not exist at the time of the call to - __gen_tempname. TMPL is overwritten with the result. - - KIND may be one of: - __GT_NOCREATE: simply verify that the name does not exist - at the time of the call. - __GT_FILE: create the file using open(O_CREAT|O_EXCL) - and return a read-write fd. The file is mode 0600. - __GT_DIR: create a directory, which will be mode 0700. - - We use a clever algorithm to get hard-to-predict names. */ int -__gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +__try_tempname (char *tmpl, int suffixlen, void *args, + int (*tryfunc) (char *, void *)) { int len; char *XXXXXX; @@ -199,7 +188,6 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) unsigned int count; int fd = -1; int save_errno = errno; - struct_stat64 st; /* A lower bound on the number of temporary files to attempt to generate. The maximum total number of temporary file names that @@ -256,41 +244,7 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) v /= 62; XXXXXX[5] = letters[v % 62]; - switch (kind) - { - case __GT_FILE: - fd = __open (tmpl, - (flags & ~O_ACCMODE) - | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - break; - - case __GT_DIR: - fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); - break; - - case __GT_NOCREATE: - /* This case is backward from the other three. __gen_tempname - succeeds if __xstat fails because the name does not exist. - Note the continue to bypass the common logic at the bottom - of the loop. */ - if (__lxstat64 (_STAT_VER, tmpl, &st) < 0) - { - if (errno == ENOENT) - { - __set_errno (save_errno); - return 0; - } - else - /* Give up now. */ - return -1; - } - continue; - - default: - assert (! "invalid KIND in __gen_tempname"); - abort (); - } - + fd = tryfunc (tmpl, args); if (fd >= 0) { __set_errno (save_errno); @@ -304,3 +258,67 @@ __gen_tempname (char *tmpl, int suffixlen, int flags, int kind) __set_errno (EEXIST); return -1; } + +static int +try_file (char *tmpl, void *flags) +{ + int *openflags = flags; + return __open (tmpl, + (*openflags & ~O_ACCMODE) + | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); +} + +static int +try_dir (char *tmpl, void *flags) +{ + return __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); +} + +static int +try_nocreate (char *tmpl, void *flags) +{ + struct_stat64 st; + + if (__lxstat64 (_STAT_VER, tmpl, &st) == 0) + __set_errno (EEXIST); + return errno == ENOENT ? 0 : -1; +} + +/* Generate a temporary file name based on TMPL. TMPL must match the + rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). + The name constructed does not exist at the time of the call to + __gen_tempname. TMPL is overwritten with the result. + + KIND may be one of: + __GT_NOCREATE: simply verify that the name does not exist + at the time of the call. + __GT_FILE: create the file using open(O_CREAT|O_EXCL) + and return a read-write fd. The file is mode 0600. + __GT_DIR: create a directory, which will be mode 0700. + + We use a clever algorithm to get hard-to-predict names. */ +int +__gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +{ + int (*tryfunc) (char *, void *); + + switch (kind) + { + case __GT_FILE: + tryfunc = try_file; + break; + + case __GT_DIR: + tryfunc = try_dir; + break; + + case __GT_NOCREATE: + tryfunc = try_nocreate; + break; + + default: + assert (! "invalid KIND in __gen_tempname"); + abort (); + } + return __try_tempname (tmpl, suffixlen, &flags, tryfunc); +} diff --git a/lib/tempname.h b/lib/tempname.h index b560ee5..e609360 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -32,6 +32,10 @@ # define GT_NOCREATE 2 # endif +#ifdef __cplusplus +extern "C" { +#endif + /* Generate a temporary file name based on TMPL. TMPL must match the rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). The name constructed does not exist at the time of the call to @@ -47,4 +51,15 @@ We use a clever algorithm to get hard-to-predict names. */ extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); +/* Similar to gen_tempname, but TRYFUNC is called for each temporary + name to try. If TRYFUNC returns a non-negative number, TRY_GEN_TEMPNAME + returns with this value. Otherwise, if errno is set to EEXIST, another + name is tried, or else TRY_GEN_TEMPNAME returns -1. */ +extern int try_tempname (char *tmpl, int suffixlen, void *args, + int (*tryfunc) (char *, void *)); + +#ifdef __cplusplus +} +#endif + #endif /* GL_TEMPNAME_H */ diff --git a/m4/dup2.m4 b/m4/dup2.m4 index 0354c6a..9aa2ea8 100644 --- a/m4/dup2.m4 +++ b/m4/dup2.m4 @@ -1,4 +1,4 @@ -#serial 20 +#serial 22 dnl Copyright (C) 2002, 2005, 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,7 +8,6 @@ AC_DEFUN([gl_FUNC_DUP2], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([getdtablesize]) m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ AC_CHECK_FUNCS_ONCE([dup2]) if test $ac_cv_func_dup2 = no; then @@ -20,38 +19,44 @@ AC_DEFUN([gl_FUNC_DUP2], if test $HAVE_DUP2 = 1; then AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include -#include -#include ]], - [int result = 0; -#ifdef HAVE_GETDTABLESIZE - int bad_fd = getdtablesize (); -#else - int bad_fd = 1000000; -#endif -#ifdef FD_CLOEXEC - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif - if (dup2 (1, 1) == 0) - result |= 2; -#ifdef FD_CLOEXEC - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, bad_fd) == -1 && errno != EBADF) - result |= 16; - /* Flush out some cygwin core dumps. */ - if (dup2 (2, -1) != -1 || errno != EBADF) - result |= 32; - dup2 (2, 255); - dup2 (2, 256); - return result; - ]) + AC_LANG_PROGRAM( + [[#include + #include + #include + #include + #include + ]], + [[int result = 0; + int bad_fd = INT_MAX; + struct rlimit rlim; + if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX + && rlim.rlim_cur != RLIM_INFINITY + && rlim.rlim_cur != RLIM_SAVED_MAX + && rlim.rlim_cur != RLIM_SAVED_CUR) + bad_fd = rlim.rlim_cur; + #ifdef FD_CLOEXEC + if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) + result |= 1; + #endif + if (dup2 (1, 1) == 0) + result |= 2; + #ifdef FD_CLOEXEC + if (fcntl (1, F_GETFD) != FD_CLOEXEC) + result |= 4; + #endif + close (0); + if (dup2 (0, 0) != -1) + result |= 8; + /* Many gnulib modules require POSIX conformance of EBADF. */ + if (dup2 (2, bad_fd) == -1 && errno != EBADF) + result |= 16; + /* Flush out some cygwin core dumps. */ + if (dup2 (2, -1) != -1 || errno != EBADF) + result |= 32; + dup2 (2, 255); + dup2 (2, 256); + return result;]]) ], [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], [case "$host_os" in @@ -59,9 +64,6 @@ AC_DEFUN([gl_FUNC_DUP2], gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works="guessing no" ;; aix* | freebsd*) # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, # not EBADF. diff --git a/m4/fcntl.m4 b/m4/fcntl.m4 index 733cd2d..218e786 100644 --- a/m4/fcntl.m4 +++ b/m4/fcntl.m4 @@ -1,4 +1,4 @@ -# fcntl.m4 serial 5 +# fcntl.m4 serial 7 dnl Copyright (C) 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_FCNTL], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([fcntl getdtablesize]) + AC_CHECK_FUNCS_ONCE([fcntl]) if test $ac_cv_func_fcntl = no; then gl_REPLACE_FCNTL else @@ -27,30 +27,34 @@ AC_DEFUN([gl_FUNC_FCNTL], dnl haiku alpha 2 F_DUPFD has wrong errno AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly], [gl_cv_func_fcntl_f_dupfd_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#ifdef HAVE_GETDTABLESIZE -# include -#endif -#include -#include -]], [[int result = 0; -#ifdef HAVE_GETDTABLESIZE - int bad_fd = getdtablesize (); -#else - int bad_fd = 1000000; -#endif - if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; - if (errno != EINVAL) result |= 2; - if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; - if (errno != EINVAL) result |= 8; - return result; - ]])], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + #include + ]], + [[int result = 0; + int bad_fd = INT_MAX; + struct rlimit rlim; + if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 + && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX + && rlim.rlim_cur != RLIM_INFINITY + && rlim.rlim_cur != RLIM_SAVED_MAX + && rlim.rlim_cur != RLIM_SAVED_CUR) + bad_fd = rlim.rlim_cur; + if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; + if (errno != EINVAL) result |= 2; + if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; + if (errno != EINVAL) result |= 8; + return result;]])], [gl_cv_func_fcntl_f_dupfd_works=yes], [gl_cv_func_fcntl_f_dupfd_works=no], - [# Guess that it works on glibc systems - case $host_os in #(( - *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; - *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; + [case $host_os in + aix* | cygwin* | haiku*) + gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; + *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; esac])]) case $gl_cv_func_fcntl_f_dupfd_works in *yes) ;; diff --git a/m4/getdtablesize.m4 b/m4/getdtablesize.m4 index a6b6c1b..25e9968 100644 --- a/m4/getdtablesize.m4 +++ b/m4/getdtablesize.m4 @@ -1,4 +1,4 @@ -# getdtablesize.m4 serial 5 +# getdtablesize.m4 serial 6 dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,9 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE], AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS_ONCE([getdtablesize]) - if test $ac_cv_func_getdtablesize = yes; then + AC_CHECK_DECLS_ONCE([getdtablesize]) + if test $ac_cv_func_getdtablesize = yes && + test $ac_cv_have_decl_getdtablesize = yes; then # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit # up to an unchangeable hard limit; all other platforms correctly # require setrlimit before getdtablesize() can report a larger value. commit 43fb42da8bd6851b5b22d2bbb5d2cd8ceede9c09 Author: Glenn Morris Date: Fri Feb 20 20:38:43 2015 -0500 # etc/TODO: More elpa additions diff --git a/etc/TODO b/etc/TODO index 13153c4..79996e2 100644 --- a/etc/TODO +++ b/etc/TODO @@ -108,6 +108,16 @@ make it. Need to sync up the Emacs and external versions. See +** Move Org mode to elpa.gnu.org. +See + + +** Move verilog-mode to elpa.gnu.org. +See + +** Move vhdl-mode to elpa.gnu.org. +See + * Simple tasks. These don't require much Emacs knowledge, they are suitable for anyone from beginners to experts. commit 5169b7118190145e392b21da621a536853257d32 Author: Glenn Morris Date: Fri Feb 20 19:54:02 2015 -0500 # etc/TODO: Add idlwave diff --git a/etc/TODO b/etc/TODO index 68a3792..13153c4 100644 --- a/etc/TODO +++ b/etc/TODO @@ -102,6 +102,11 @@ make it. "FOO-tab -> ?\FOO-\t", "uppercase -> lowercase", "[fringe KEY...] -> [KEY]", "H-FOO -> M-FOO", "C-x C-y FOO -> H-FOO", ... +* Things related to elpa.gnu.org. + +** Move idlwave to elpa.gnu.org. +Need to sync up the Emacs and external versions. +See * Simple tasks. These don't require much Emacs knowledge, they are suitable for anyone from beginners to experts. commit 852947baf0d71751843da82ec4593ea154fda9af Author: Wilson Snyder Date: Fri Feb 20 19:50:46 2015 -0500 Sync with upstream verilog-mode revision 0d6420b * lisp/progmodes/verilog-mode.el (verilog-mode-version): Update. (vector-skip-list): Remove. (verilog-auto-inst-port, verilog-auto-inst-port-list) (verilog-auto-inst, verilog-auto-inst-param): Use arguments rather than vector-skip. (verilog-auto-inst-port): Fix AUTOINST interfaces to not show modport if signal attachment is itself a modport. Reported by Matthew Lovell. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 925f51b..4e59654 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2015-02-21 Wilson Snyder + + Sync with upstream verilog-mode revision 0d6420b. + * progmodes/verilog-mode.el (verilog-mode-version): Update. + (vector-skip-list): Remove. + (verilog-auto-inst-port, verilog-auto-inst-port-list) + (verilog-auto-inst, verilog-auto-inst-param): + Use arguments rather than vector-skip. + (verilog-auto-inst-port): Fix AUTOINST interfaces to not show + modport if signal attachment is itself a modport. Reported by + Matthew Lovell. + 2015-02-21 Reto Zimmermann Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support. diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el index 7b6f2d3..5720654 100644 --- a/lisp/progmodes/verilog-mode.el +++ b/lisp/progmodes/verilog-mode.el @@ -123,7 +123,7 @@ ;;; Code: ;; This variable will always hold the version number of the mode -(defconst verilog-mode-version "2014-11-12-aa4b777-vpo" +(defconst verilog-mode-version "2015-02-20-0d6420b-vpo" "Version of this Verilog mode.") (defconst verilog-mode-release-emacs t "If non-nil, this version of Verilog mode was released with Emacs itself.") @@ -8419,7 +8419,6 @@ Return an array of [outputs inouts inputs wire reg assign const]." (defvar sigs-temp) ;; These are known to be from other packages and may not be defined (defvar diff-command nil) - (defvar vector-skip-list) ;; There are known to be from newer versions of Emacs (defvar create-lockfiles)) @@ -10884,7 +10883,7 @@ See the example in `verilog-auto-inout-modport'." (defvar vl-bits nil "See `verilog-auto-inst'.") ; Prevent compile warning (defvar vl-mbits nil "See `verilog-auto-inst'.") ; Prevent compile warning -(defun verilog-auto-inst-port (port-st indent-pt tpl-list tpl-num for-star par-values) +(defun verilog-auto-inst-port (port-st indent-pt moddecls tpl-list tpl-num for-star par-values) "Print out an instantiation connection for this PORT-ST. Insert to INDENT-PT, use template TPL-LIST. @ are instantiation numbers, replaced with TPL-NUM. @@ -10901,9 +10900,10 @@ If PAR-VALUES replace final strings with these parameter values." (vl-mbits (if (verilog-sig-multidim port-st) (verilog-sig-multidim-string port-st) "")) (vl-bits (if (or verilog-auto-inst-vector - (not (assoc port vector-skip-list)) + (not (assoc port (verilog-decls-get-signals moddecls))) (not (equal (verilog-sig-bits port-st) - (verilog-sig-bits (assoc port vector-skip-list))))) + (verilog-sig-bits + (assoc port (verilog-decls-get-signals moddecls)))))) (or (verilog-sig-bits port-st) "") "")) (case-fold-search nil) @@ -10932,7 +10932,12 @@ If PAR-VALUES replace final strings with these parameter values." (concat "/*" vl-mbits vl-bits "*/") (concat vl-bits)) tpl-net (concat port - (if vl-modport (concat "." vl-modport) "") + (if (and vl-modport + ;; .modport cannot be added if attachment is + ;; already declared as modport, VCS croaks + (let ((sig (assoc port (verilog-decls-get-interfaces moddecls)))) + (not (and sig (verilog-sig-modport sig))))) + (concat "." vl-modport) "") dflt-bits)) ;; Find template (cond (tpl-ass ; Template of exact port name @@ -11002,12 +11007,12 @@ If PAR-VALUES replace final strings with these parameter values." ;;(x "incom[@\"(+ (* 8 @) 7)\":@\"(* 8 @)\"]") ;;(x ".out (outgo[@\"(concat (+ (* 8 @) 7) \\\":\\\" ( * 8 @))\"]));") -(defun verilog-auto-inst-port-list (sig-list indent-pt tpl-list tpl-num for-star par-values) +(defun verilog-auto-inst-port-list (sig-list indent-pt moddecls tpl-list tpl-num for-star par-values) "For `verilog-auto-inst' print a list of ports using `verilog-auto-inst-port'." (when verilog-auto-inst-sort (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare))) (mapc (lambda (port) - (verilog-auto-inst-port port indent-pt + (verilog-auto-inst-port port indent-pt moddecls tpl-list tpl-num for-star par-values)) sig-list)) @@ -11366,8 +11371,6 @@ For more information see the \\[verilog-faq] and forums at URL (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) (modi (verilog-modi-current)) (moddecls (verilog-modi-get-decls modi)) - (vector-skip-list (unless verilog-auto-inst-vector - (verilog-decls-get-signals moddecls))) submod submodi submoddecls inst skip-pins tpl-list tpl-num did-first par-values) @@ -11409,7 +11412,7 @@ For more information see the \\[verilog-faq] and forums at URL (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Interfaced\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-interfaces submoddecls) @@ -11419,7 +11422,7 @@ For more information see the \\[verilog-faq] and forums at URL (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Interfaces\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-outputs submoddecls) @@ -11428,7 +11431,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Outputs\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-inouts submoddecls) @@ -11437,7 +11440,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Inouts\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) (let ((sig-list (verilog-signals-not-in (verilog-decls-get-inputs submoddecls) @@ -11446,7 +11449,7 @@ For more information see the \\[verilog-faq] and forums at URL (when sig-list (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) (verilog-insert-indent "// Inputs\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num for-star par-values))) ;; Kill extra semi (save-excursion @@ -11509,8 +11512,6 @@ Templates: (+ 16 (* 8 (/ (+ indent-pt 7) 8))))) (modi (verilog-modi-current)) (moddecls (verilog-modi-get-decls modi)) - (vector-skip-list (unless verilog-auto-inst-vector - (verilog-decls-get-signals moddecls))) submod submodi submoddecls inst skip-pins tpl-list tpl-num did-first) ;; Find module name that is instantiated @@ -11550,7 +11551,7 @@ Templates: (when (not did-first) (verilog-auto-inst-first) (setq did-first t)) ;; Note these are searched for in verilog-read-sub-decls. (verilog-insert-indent "// Parameters\n") - (verilog-auto-inst-port-list sig-list indent-pt + (verilog-auto-inst-port-list sig-list indent-pt moddecls tpl-list tpl-num nil nil))) ;; Kill extra semi (save-excursion commit 1ee99b6fbde4a58e7be24c46e19ff8faadbe704f Author: Glenn Morris Date: Fri Feb 20 19:36:54 2015 -0500 # ChangeLog fix diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ce1a8c2..925f51b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1384,9 +1384,6 @@ 2015-01-17 Ivan Shmakov - * url/url-cookie.el (url-cookie-write-file): Let-bind print-length - and print-level to nil to avoid writing a garbled list. (Bug#16805) - * files.el (find-file-other-window, find-file-other-frame): Use mapc instead of mapcar. (Bug#18175) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 920d692..0f46413 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -4,6 +4,11 @@ * url-dav.el (url-dav-delete-directory, url-dav-delete-file) (url-dav-directory-files): Keep diagnostics consistent with system's. +2015-01-17 Ivan Shmakov + + * url-cookie.el (url-cookie-write-file): Let-bind print-length + and print-level to nil to avoid writing a garbled list. (Bug#16805) + 2014-12-12 Lars Magne Ingebrigtsen * url-http.el (url-http-parse-headers): `gnutls-available-p' is commit 80e67e434cce67417453b0d8ac66e061b279e4e7 Author: Reto Zimmermann Date: Fri Feb 20 19:35:25 2015 -0500 Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support. * lisp/progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp) (vhdl-doc-release-notes): Update. (vhdl-standard): Add VHDL'08 option. (vhdl-sensitivity-list-all): New option. (vhdl-directive-keywords): Add psl. (vhdl-offsets-alist-default, vhdl-mode-abbrev-table-init) (vhdl-template-construct-alist-init, vhdl-create-mode-menu): (vhdl-imenu-generic-expression): Add context, directive. (vhdl-offsets-alist, vhdl-mode, vhdl-doc-keywords): Doc fixes. (vhdl-template-map-init): Add vhdl-template-context. (vhdl-mode-syntax-table): Support VHDL'08 block comments. (vhdl-create-mode-menu): Add some entries. (vhdl-08-keywords, vhdl-08-types, vhdl-08-attributes) (vhdl-08-functions, vhdl-08-packages, vhdl-08-directives): New constants. (vhdl-directives): New variable. (vhdl-words-init, vhdl-template-process) (vhdl-template-replace-header-keywords): Support VHDL'08. (vhdl-abbrev-list-init): Add vhdl-directives. (vhdl-in-comment-p, vhdl-in-literal, vhdl-win-il) (vhdl-forward-syntactic-ws, vhdl-get-syntactic-context) (vhdl-lineup-comment): Handle block comments and directives. (vhdl-beginning-of-directive, vhdl-template-context) (vhdl-template-context-hook): New functions. (vhdl-libunit-re, vhdl-defun-re, vhdl-begin-p) (vhdl-corresponding-begin, vhdl-get-library-unit, vhdl-regress-line) (vhdl-align-declarations, vhdl-beginning-of-block, vhdl-end-of-block) (vhdl-font-lock-keywords-2, vhdl-get-end-of-unit) (vhdl-scan-context-clause): Add context. * etc/NEWS: Mention this. diff --git a/etc/NEWS b/etc/NEWS index f359f91..ed25538 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -467,6 +467,8 @@ allows to customize this. *** Two new faces `compare-windows-removed' and `compare-windows-added' replace the obsolete face `compare-windows'. +** VHDL mode supports VHDL'08. + ** Calculator: decimal display mode uses "," groups, so it's more fitting for use in money calculations; factorial works with non-integer inputs. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index dc62555..ce1a8c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,36 @@ +2015-02-21 Reto Zimmermann + + Sync with upstream vhdl mode v3.37.1. Add VHDL'08 support. + * progmodes/vhdl-mode.el (vhdl-version, vhdl-time-stamp) + (vhdl-doc-release-notes): Update. + (vhdl-standard): Add VHDL'08 option. + (vhdl-sensitivity-list-all): New option. + (vhdl-directive-keywords): Add psl. + (vhdl-offsets-alist-default, vhdl-mode-abbrev-table-init) + (vhdl-template-construct-alist-init, vhdl-create-mode-menu): + (vhdl-imenu-generic-expression): Add context, directive. + (vhdl-offsets-alist, vhdl-mode, vhdl-doc-keywords): Doc fixes. + (vhdl-template-map-init): Add vhdl-template-context. + (vhdl-mode-syntax-table): Support VHDL'08 block comments. + (vhdl-create-mode-menu): Add some entries. + (vhdl-08-keywords, vhdl-08-types, vhdl-08-attributes) + (vhdl-08-functions, vhdl-08-packages, vhdl-08-directives): + New constants. + (vhdl-directives): New variable. + (vhdl-words-init, vhdl-template-process) + (vhdl-template-replace-header-keywords): Support VHDL'08. + (vhdl-abbrev-list-init): Add vhdl-directives. + (vhdl-in-comment-p, vhdl-in-literal, vhdl-win-il) + (vhdl-forward-syntactic-ws, vhdl-get-syntactic-context) + (vhdl-lineup-comment): Handle block comments and directives. + (vhdl-beginning-of-directive, vhdl-template-context) + (vhdl-template-context-hook): New functions. + (vhdl-libunit-re, vhdl-defun-re, vhdl-begin-p) + (vhdl-corresponding-begin, vhdl-get-library-unit, vhdl-regress-line) + (vhdl-align-declarations, vhdl-beginning-of-block, vhdl-end-of-block) + (vhdl-font-lock-keywords-2, vhdl-get-end-of-unit) + (vhdl-scan-context-clause): Add context. + 2015-02-20 Glenn Morris * calendar/solar.el (solar-sunrise-sunset-string): diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 875de3b..8d6d2a2 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -13,10 +13,10 @@ ;; filed in the Emacs bug reporting system against this file, a copy ;; of the bug report be sent to the maintainer's email address. -(defconst vhdl-version "3.36.1" +(defconst vhdl-version "3.37.1" "VHDL Mode version number.") -(defconst vhdl-time-stamp "2014-11-27" +(defconst vhdl-time-stamp "2015-01-15" "VHDL Mode time stamp for last update.") ;; This file is part of GNU Emacs. @@ -59,7 +59,7 @@ ;; - Block commenting ;; - Code fixing/alignment/beautification ;; - PostScript printing -;; - VHDL'87/'93 and VHDL-AMS supported +;; - VHDL'87/'93/'02/'08 and VHDL-AMS supported ;; - Comprehensive menu ;; - Fully customizable ;; - Works under GNU Emacs (recommended) and XEmacs @@ -716,6 +716,7 @@ A project setup file can be obtained by exporting a project (see menu). Basic standard: VHDL'87 : IEEE Std 1076-1987 VHDL'93/02 : IEEE Std 1076-1993/2002 + VHDL'08 : IEEE Std 1076-2008 Additional standards: VHDL-AMS : IEEE Std 1076.1 (analog-mixed-signal) Math packages: IEEE Std 1076.2 (`math_real', `math_complex') @@ -724,7 +725,8 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry \"Activate Options\"." :type '(list (choice :tag "Basic standard" (const :tag "VHDL'87" 87) - (const :tag "VHDL'93/02" 93)) + (const :tag "VHDL'93/02" 93) + (const :tag "VHDL'08" 08)) (set :tag "Additional standards" :indent 2 (const :tag "VHDL-AMS" ams) (const :tag "Math packages" math))) @@ -942,6 +944,12 @@ If nil, only a list of actual parameters is entered." :type 'boolean :group 'vhdl-template) +(defcustom vhdl-sensitivity-list-all t + "Non-nil means use 'all' keyword in sensitivity list." + :version "25.1" + :type 'boolean + :group 'vhdl-template) + (defcustom vhdl-zero-string "'0'" "String to use for a logic zero." :type 'string @@ -1728,7 +1736,7 @@ NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu 'vhdl-words-init 'vhdl-font-lock-init)) :group 'vhdl-highlight) -(defcustom vhdl-directive-keywords '("pragma" "synopsys") +(defcustom vhdl-directive-keywords '("psl" "pragma" "synopsys") "List of compiler directive keywords recognized for highlighting. NOTE: Activate the new setting in a VHDL buffer by re-fontifying it (menu @@ -2001,6 +2009,8 @@ reported and the syntactic symbol is ignored.") (package . 0) (architecture . 0) (package-body . 0) + (context . 0) + (directive . 0) ) "Default settings for offsets of syntactic elements. Do not change this constant! See the variable `vhdl-offsets-alist' for @@ -2065,7 +2075,8 @@ Here is the current list of valid syntactic element symbols: configuration -- inside a configuration declaration package -- inside a package declaration architecture -- inside an architecture body - package-body -- inside a package body") + package-body -- inside a package body + context -- inside a context declaration") (defvar vhdl-comment-only-line-offset 0 "Extra offset for line which contains only the start of a comment. @@ -2684,6 +2695,7 @@ elements > `vhdl-menu-max-size'." (define-key vhdl-template-map "Cd" 'vhdl-template-configuration-decl) (define-key vhdl-template-map "Cs" 'vhdl-template-configuration-spec) (define-key vhdl-template-map "co" 'vhdl-template-constant) + (define-key vhdl-template-map "ct" 'vhdl-template-context) (define-key vhdl-template-map "di" 'vhdl-template-disconnect) (define-key vhdl-template-map "el" 'vhdl-template-else) (define-key vhdl-template-map "ei" 'vhdl-template-elsif) @@ -2963,7 +2975,7 @@ STRING are replaced by `-' and substrings are converted to lower case." (modify-syntax-entry ?\* "." st) (modify-syntax-entry ?\+ "." st) (modify-syntax-entry ?\. "." st) - (modify-syntax-entry ?\/ "." st) +;;; (modify-syntax-entry ?\/ "." st) (modify-syntax-entry ?\: "." st) (modify-syntax-entry ?\; "." st) (modify-syntax-entry ?\< "." st) @@ -2975,11 +2987,13 @@ STRING are replaced by `-' and substrings are converted to lower case." (modify-syntax-entry ?\" "\"" st) ;; define underscore (modify-syntax-entry ?\_ (if vhdl-underscore-is-part-of-word "w" "_") st) - ;; a single hyphen is punctuation, but a double hyphen starts a comment - (modify-syntax-entry ?\- ". 12" st) - ;; and \n and \^M end a comment - (modify-syntax-entry ?\n ">" st) - (modify-syntax-entry ?\^M ">" st) + ;; single-line comments + (modify-syntax-entry ?\- ". 12b" st) + ;; multi-line comments + (modify-syntax-entry ?\/ ". 14b" st) + (modify-syntax-entry ?* ". 23" st) + (modify-syntax-entry ?\n "> b" st) + (modify-syntax-entry ?\^M "> b" st) ;; define parentheses to match (modify-syntax-entry ?\( "()" st) (modify-syntax-entry ?\) ")(" st) @@ -3044,6 +3058,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ("configuration" . vhdl-template-configuration-hook) ("cons" . vhdl-template-constant-hook) ("constant" . vhdl-template-constant-hook) + ("context" . vhdl-template-context-hook) ("disconnect" . vhdl-template-disconnect-hook) ("downto" . vhdl-template-default-hook) ("else" . vhdl-template-else-hook) @@ -3191,6 +3206,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ("configuration declaration" vhdl-template-configuration-decl) ("configuration specification" vhdl-template-configuration-spec) ("constant declaration" vhdl-template-constant) + ("context declaration" vhdl-template-context) ("disconnection specification" vhdl-template-disconnect) ("entity declaration" vhdl-template-entity) ("exit statement" vhdl-template-exit) @@ -3367,6 +3383,7 @@ STRING are replaced by `-' and substrings are converted to lower case." ["Configuration (Decl)" vhdl-template-configuration-decl t] ["Configuration (Spec)" vhdl-template-configuration-spec t] ["Constant" vhdl-template-constant t] + ["Context" vhdl-template-context t] ["Disconnect" vhdl-template-disconnect t] ["Else" vhdl-template-else t] ["Elsif" vhdl-template-elsif t] @@ -3708,6 +3725,11 @@ STRING are replaced by `-' and substrings are converted to lower case." (list '93 (cadr vhdl-standard))) (vhdl-activate-customizations)) :style radio :selected (eq '93 (car vhdl-standard))] + ["VHDL'08" + (progn (customize-set-variable 'vhdl-standard + (list '08 (cadr vhdl-standard))) + (vhdl-activate-customizations)) + :style radio :selected (eq '08 (car vhdl-standard))] "--" ["VHDL-AMS" (progn (customize-set-variable @@ -3830,6 +3852,10 @@ STRING are replaced by `-' and substrings are converted to lower case." (customize-set-variable 'vhdl-conditions-in-parenthesis (not vhdl-conditions-in-parenthesis)) :style toggle :selected vhdl-conditions-in-parenthesis] + ["Sensitivity List uses 'all'" + (customize-set-variable 'vhdl-sensitivity-list-all + (not vhdl-sensitivity-list-all)) + :style toggle :selected vhdl-sensitivity-list-all] ["Zero String..." (customize-option 'vhdl-zero-string) t] ["One String..." (customize-option 'vhdl-one-string) t] ("File Header" @@ -4224,6 +4250,9 @@ STRING are replaced by `-' and substrings are converted to lower case." ("Entity" "^\\s-*\\(entity\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" 2) + ("Context" + "^\\s-*\\(context\\)\\s-+\\(\\(\\w\\|\\s_\\)+\\)" + 2) ) "Imenu generic expression for VHDL Mode. See `imenu-generic-expression'.") @@ -4677,7 +4706,7 @@ Usage: VHDL STANDARDS: The VHDL standards to be used are specified in option `vhdl-standard'. - Available standards are: VHDL'87/'93(02), VHDL-AMS, and Math Packages. + Available standards are: VHDL'87/'93(02)/'08, VHDL-AMS, and Math Packages. KEYWORD CASE: @@ -4987,6 +5016,12 @@ Key bindings: ) "List of VHDL'02 keywords.") +(defconst vhdl-08-keywords + '( + "context" "force" "property" "release" "sequence" + ) + "List of VHDL'08 keywords.") + (defconst vhdl-ams-keywords '( "across" "break" "limit" "nature" "noise" "procedural" "quantity" @@ -5028,6 +5063,12 @@ Key bindings: ) "List of VHDL'02 standardized types.") +(defconst vhdl-08-types + '( + "boolean_vector" "integer_vector" "real_vector" "time_vector" + ) + "List of VHDL'08 standardized types.") + (defconst vhdl-ams-types ;; standards: IEEE Std 1076.1-2007, IEEE Std 1076.1.1-2004 '( @@ -5103,6 +5144,12 @@ Key bindings: ) "List of VHDL'02 standardized attributes.") +(defconst vhdl-08-attributes + '( + "instance_name" "path_name" + ) + "List of VHDL'08 standardized attributes.") + (defconst vhdl-ams-attributes '( "across" "through" @@ -5174,6 +5221,15 @@ Key bindings: ) "List of VHDL'02 standardized functions.") +(defconst vhdl-08-functions + '( + "finish" "flush" "justify" "maximum" "minimum" + "resolution_limit" "rising_edge" "stop" "swrite" + "tee" "to_binarystring" "to_bstring" "to_hexstring" "to_hstring" + "to_octalstring" "to_ostring" "to_string" + ) + "List of VHDL'08 standardized functions.") + (defconst vhdl-ams-functions '( ;; package `standard' @@ -5202,6 +5258,13 @@ Key bindings: ) "List of VHDL'02 standardized packages and libraries.") +(defconst vhdl-08-packages + '( + "env" "numeric_std_signed" "numeric_std_unsigned" + "ieee_bit_context" "ieee_std_context" ;; contexts + ) + "List of VHDL'08 standardized packages and libraries.") + (defconst vhdl-ams-packages '( "fundamental_constants" "material_constants" "energy_systems" @@ -5216,6 +5279,18 @@ Key bindings: ) "List of Math Packages standardized packages and libraries.") +(defconst vhdl-08-directives + '( + "author" "author_info" "begin" "begin_protected" "comment" + "data_block" "data_keyname" "data_keyowner" "data_method" + "decrypt_license" "digest_block" "digest_key_method" "digest_keyname" + "digest_keyowner" "digest_method" + "encoding" "encrypt_agent" "encrypt_agent_info" "end" "end_protected" + "key_block" "key_keyname" "key_keyowner" "key_method" + "runtime_license" "viewport" + ) + "List of VHDL'08 standardized tool directives.") + (defvar vhdl-keywords nil "List of VHDL keywords.") @@ -5237,6 +5312,9 @@ Key bindings: (defvar vhdl-packages nil "List of VHDL standardized packages and libraries.") +(defvar vhdl-directives nil + "List of VHDL standardized packages and libraries.") + (defvar vhdl-reserved-words nil "List of additional reserved words.") @@ -5282,17 +5360,20 @@ Key bindings: (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-keywords) (append vhdl-02-keywords + (when (vhdl-standard-p '08) vhdl-08-keywords) (when (vhdl-standard-p 'ams) vhdl-ams-keywords)))) (setq vhdl-types (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-types) (append vhdl-02-types + (when (vhdl-standard-p '08) vhdl-08-types) (when (vhdl-standard-p 'ams) vhdl-ams-types) (when (vhdl-standard-p 'math) vhdl-math-types)))) (setq vhdl-attributes (vhdl-upcase-list (and vhdl-highlight-case-sensitive vhdl-upper-case-attributes) (append vhdl-02-attributes + (when (vhdl-standard-p '08) vhdl-08-attributes) (when (vhdl-standard-p 'ams) vhdl-ams-attributes)))) (setq vhdl-enum-values (vhdl-upcase-list @@ -5307,12 +5388,16 @@ Key bindings: '("")))) (setq vhdl-functions (append vhdl-02-functions + (when (vhdl-standard-p '08) vhdl-08-functions) (when (vhdl-standard-p 'ams) vhdl-ams-functions) (when (vhdl-standard-p 'math) vhdl-math-functions))) (setq vhdl-packages (append vhdl-02-packages + (when (vhdl-standard-p '08) vhdl-08-packages) (when (vhdl-standard-p 'ams) vhdl-ams-packages) (when (vhdl-standard-p 'math) vhdl-math-packages))) + (setq vhdl-directives + (append (when (vhdl-standard-p '08) vhdl-08-directives))) (setq vhdl-reserved-words (append (when vhdl-highlight-forbidden-words vhdl-forbidden-words) (when vhdl-highlight-verilog-keywords vhdl-verilog-keywords) @@ -5357,7 +5442,8 @@ Key bindings: (list vhdl-upper-case-enum-values) vhdl-enum-values (list vhdl-upper-case-constants) vhdl-constants (list nil) vhdl-functions - (list nil) vhdl-packages))) + (list nil) vhdl-packages + (list nil) vhdl-directives))) ;; initialize reserved words for VHDL Mode (vhdl-words-init) @@ -5598,9 +5684,24 @@ the offset is simply returned." ;; Syntactic support functions: -(defun vhdl-in-comment-p () - "Check if point is in a comment." - (eq (vhdl-in-literal) 'comment)) +(defun vhdl-in-comment-p (&optional pos) + "Check if point is in a comment (include multi-line comments)." + (let ((parse (lambda (p) + (let ((c (char-after p))) + (or (and c (eq (char-syntax c) ?<)) + (nth 4 (parse-partial-sexp + (save-excursion + (beginning-of-defun) + (point)) p))))))) + (save-excursion + (goto-char (or pos (point))) + (or (funcall parse (point)) + ;; `parse-partial-sexp's notion of comments doesn't span lines + (progn + (back-to-indentation) + (unless (eolp) + (forward-char) + (funcall parse (point)))))))) (defun vhdl-in-string-p () "Check if point is in a string." @@ -5625,6 +5726,9 @@ the offset is simply returned." ((nth 3 state) 'string) ((nth 4 state) 'comment) ((vhdl-beginning-of-macro) 'pound) + ((vhdl-beginning-of-directive) 'directive) + ;; for multi-line comments + ((and (vhdl-standard-p '08) (vhdl-in-comment-p)) 'comment) (t nil))))) (defun vhdl-in-extended-identifier-p () @@ -5675,7 +5779,7 @@ negative, skip forward otherwise." (goto-char lim ) (while (< (point) here) (setq match - (and (re-search-forward "--\\|[\"']" + (and (re-search-forward "--\\|[\"']\\|`" here 'move) (buffer-substring (match-beginning 0) (match-end 0)))) (setq state @@ -5685,6 +5789,9 @@ negative, skip forward otherwise." ;; looking at the opening of a VHDL style comment ((string= "--" match) (if (<= here (progn (end-of-line) (point))) 'comment)) + ;; looking at a directive + ((string= "`" match) + (if (<= here (progn (end-of-line) (point))) 'directive)) ;; looking at the opening of a double quote string ((string= "\"" match) (if (not (save-restriction @@ -5729,7 +5836,7 @@ negative, skip forward otherwise." (setq here (point)) (vhdl-forward-comment hugenum) ;; skip preprocessor directives - (when (and (eq (char-after) ?#) + (when (and (or (eq (char-after) ?#) (eq (char-after) ?`)) (= (vhdl-point 'boi) (point))) (while (and (eq (char-before (vhdl-point 'eol)) ?\\) (= (forward-line 1) 0))) @@ -5766,6 +5873,19 @@ negative, skip forward otherwise." (goto-char here) nil))) +(defun vhdl-beginning-of-directive (&optional lim) + "Go to the beginning of a directive (nicked from `cc-engine')." + (let ((here (point))) + (beginning-of-line) + (while (eq (char-before (1- (point))) ?\\) + (forward-line -1)) + (back-to-indentation) + (if (and (<= (point) here) + (eq (char-after) ?`)) + t + (goto-char here) + nil))) + (defun vhdl-backward-syntactic-ws (&optional lim) "Backward skip over syntactic whitespace." (let* ((here (point-min)) @@ -5822,7 +5942,7 @@ that point, else nil." ;; Core syntactic evaluation functions: (defconst vhdl-libunit-re - "\\b\\(architecture\\|configuration\\|entity\\|package\\)\\b[^_]") + "\\b\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\b[^_]") (defun vhdl-libunit-p () (and @@ -5840,7 +5960,7 @@ that point, else nil." )) (defconst vhdl-defun-re - "\\b\\(architecture\\|block\\|configuration\\|entity\\|package\\|process\\|procedural\\|procedure\\|function\\)\\b[^_]") + "\\b\\(architecture\\|block\\|configuration\\|context\\|entity\\|package\\|process\\|procedural\\|procedure\\|function\\)\\b[^_]") (defun vhdl-defun-p () (save-excursion @@ -5849,7 +5969,7 @@ that point, else nil." (save-excursion (backward-sexp) (not (looking-at "end\\s-+\\w"))) - ;; "architecture", "configuration", "entity", + ;; "architecture", "configuration", "context", "entity", ;; "package", "procedure", "function": t))) @@ -5863,7 +5983,7 @@ corresponding \"begin\" keyword, else return nil." (if (looking-at "block\\|process\\|procedural") ;; "block", "process". "procedural: (buffer-substring (match-beginning 0) (match-end 0)) - ;; "architecture", "configuration", "entity", "package", + ;; "architecture", "configuration", "context", "entity", "package", ;; "procedure", "function": "is")))) @@ -5884,7 +6004,7 @@ vhdl-begin-fwd-re, and are not inside a literal, and that we are not in the middle of an identifier that just happens to contain a \"begin\" keyword." (cond - ;; "[architecture|case|configuration|entity|package| + ;; "[architecture|case|configuration|context|entity|package| ;; procedure|function] ... is": ((and (looking-at "i") (save-excursion @@ -5897,7 +6017,7 @@ keyword." (let (foundp) (while (and (not foundp) (re-search-backward - ";\\|\\b\\(architecture\\|case\\|configuration\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|procedural\\|block\\)\\b[^_]" + ";\\|\\b\\(architecture\\|case\\|configuration\\|context\\|entity\\|package\\|procedure\\|return\\|is\\|begin\\|process\\|procedural\\|block\\)\\b[^_]" lim 'move)) (if (or (= (preceding-char) ?_) (vhdl-in-literal)) @@ -6092,7 +6212,7 @@ of an identifier that just happens to contain an \"end\" keyword." (vector "for" (vhdl-first-word pos) nil nil)) ;; "end [id]": (t - (vector "begin\\|architecture\\|configuration\\|entity\\|package\\|procedure\\|function" + (vector "begin\\|architecture\\|configuration\\|context\\|entity\\|package\\|procedure\\|function" (vhdl-first-word pos) ;; return an alist of (statement . keyword) mappings '( @@ -6102,6 +6222,8 @@ of an identifier that just happens to contain an \"end\" keyword." ("architecture" . "is") ;; "configuration ... is ... end [id]": ("configuration" . "is") + ;; "context ... is ... end [id]": + ("context" . "is") ;; "entity ... is ... end [id]": ("entity" . "is") ;; "package ... is ... end [id]": @@ -6716,7 +6838,8 @@ keyword at PLACEHOLDER, then return the library unit type." (cond ((looking-at "e") 'entity) ((looking-at "a") 'architecture) - ((looking-at "c") 'configuration) + ((looking-at "conf") 'configuration) + ((looking-at "cont") 'context) ((looking-at "p") (save-excursion (goto-char bod) @@ -6992,7 +7115,7 @@ is not moved." (goto-char (1+ containing-sexp)) (skip-chars-forward " \t") (not (eolp)) - (not (looking-at "--"))) + (not (looking-at "--\\|`"))) (save-excursion (vhdl-beginning-of-statement-1 containing-sexp) (skip-chars-backward " \t(") @@ -7141,8 +7264,10 @@ is not moved." ;; now we need to look at any modifiers (goto-char indent-point) (skip-chars-forward " \t") - (if (looking-at "--") + (if (or (looking-at "--") (looking-at "/\\*")) (vhdl-add-syntax 'comment)) + (if (looking-at "`") + (vhdl-add-syntax 'directive)) (if (eq literal 'pound) (vhdl-add-syntax 'cpp-macro)) ;; return the syntax @@ -7216,8 +7341,12 @@ only-lines." (vhdl-comment-indent) ;; otherwise, indent as specified by vhdl-comment-only-line-offset (if (not (bolp)) + ;; inside multi-line comment + (if (looking-at "\\*") + 1 + ;; otherwise (or (car-safe vhdl-comment-only-line-offset) - vhdl-comment-only-line-offset) + vhdl-comment-only-line-offset)) (or (cdr-safe vhdl-comment-only-line-offset) (car-safe vhdl-comment-only-line-offset) -1000 ;jam it against the left side @@ -7457,7 +7586,7 @@ ENDPOS is encountered." (mapc (function (lambda (elt) - (if (memq (car elt) '(entity configuration package + (if (memq (car elt) '(entity configuration context package package-body architecture)) nil (setq expurgated (append expurgated (list elt)))))) @@ -7787,7 +7916,7 @@ the token in MATCH." (vhdl-prepare-search-2 (save-excursion ;; search for declarative part - (when (and (re-search-backward "^\\(architecture\\|begin\\|configuration\\|end\\|entity\\|package\\)\\>" nil t) + (when (and (re-search-backward "^\\(architecture\\|begin\\|configuration\\|context\\|end\\|entity\\|package\\)\\>" nil t) (not (member (upcase (match-string 1)) '("BEGIN" "END")))) (setq beg (point)) (re-search-forward "^\\(begin\\|end\\)\\>" nil t) @@ -9137,6 +9266,27 @@ a configuration declaration if not within a design unit." (insert ";") (vhdl-comment-insert-inline)))))) +(defun vhdl-template-context () + "Insert a context declaration." + (interactive) + (let ((margin (current-indentation)) + (start (point)) + entity-exists string name position) + (vhdl-insert-keyword "CONTEXT ") + (when (setq name (vhdl-template-field "name" nil t start (point))) + (vhdl-insert-keyword " IS\n") + (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")) + (indent-to (+ margin vhdl-basic-offset)) + (setq position (point)) + (insert "\n") + (when (memq vhdl-insert-empty-lines '(unit all)) (insert "\n")) + (indent-to margin) + (vhdl-insert-keyword "END ") + (unless (vhdl-standard-p '87) + (vhdl-insert-keyword "CONTEXT ")) + (insert name ";") + (goto-char position)))) + (defun vhdl-template-default () "Insert nothing." (interactive) @@ -9798,8 +9948,10 @@ otherwise." (forward-char 1)) (insert "(") (if (not seq) - (unless (setq input-signals - (vhdl-template-field "[sensitivity list]" ")" t)) + (unless (or (and (vhdl-standard-p '08) vhdl-sensitivity-list-all + (progn (insert "all)") (setq input-signals "all"))) + (setq input-signals + (vhdl-template-field "[sensitivity list]" ")" t))) (setq input-signals "") (delete-char -2)) (setq clock (or (and (not (equal "" vhdl-clock-name)) @@ -10533,7 +10685,8 @@ specification, if not already there." (while (search-forward "" end t) (replace-match (concat "VHDL" (cond ((vhdl-standard-p '87) "'87") - ((vhdl-standard-p '93) "'93/02")) + ((vhdl-standard-p '93) "'93/02") + ((vhdl-standard-p '08) "'08")) (when (vhdl-standard-p 'ams) ", VHDL-AMS") (when (vhdl-standard-p 'math) ", Math Packages")) t t)) (goto-char beg) @@ -11071,7 +11224,7 @@ else insert tab (used for word completion in VHDL minibuffer)." (save-excursion (beginning-of-line) ;; search backward for block beginning or end - (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + (while (or (while (and (setq pos (re-search-backward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|context\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) ;; not consider subprogram declarations (or (and (match-string 5) (save-match-data @@ -11102,7 +11255,7 @@ else insert tab (used for word completion in VHDL minibuffer)." (save-excursion (end-of-line) ;; search forward for block beginning or end - (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) + (while (or (while (and (setq pos (re-search-forward "^\\s-*\\(\\(end\\)\\|\\(\\(impure\\|pure\\)[ \t\n\r\f]+\\)?\\(function\\|procedure\\)\\|\\(for\\)\\|\\(architecture\\|component\\|configuration\\|context\\|entity\\|package\\(\\s-+body\\)?\\|type[ \t\n\r\f]+\\w+[ \t\n\r\f]+is[ \t\n\r\f]+\\(record\\|protected\\(\\s-+body\\)?\\)\\|units\\)\\|\\(\\w+[ \t\n\r\f]*:[ \t\n\r\f]*\\)?\\(postponed[ \t\n\r\f]+\\)?\\(block\\|case\\|for\\|if\\|procedural\\|process\\|while\\|loop\\)\\)\\>" nil t)) ;; not consider subprogram declarations (or (and (match-string 5) (save-match-data @@ -11203,6 +11356,8 @@ but not if inside a comment or quote." (vhdl-hooked-abbrev 'vhdl-template-configuration)) (defun vhdl-template-constant-hook () (vhdl-hooked-abbrev 'vhdl-template-constant)) +(defun vhdl-template-context-hook () + (vhdl-hooked-abbrev 'vhdl-template-context)) (defun vhdl-template-disconnect-hook () (vhdl-hooked-abbrev 'vhdl-template-disconnect)) (defun vhdl-template-display-comment-hook () @@ -13190,7 +13345,8 @@ This does highlighting of keywords and standard identifiers.") (list (concat "^\\s-*\\(" - "architecture\\|configuration\\|entity\\|package\\(\\s-+body\\)?\\|" + "architecture\\|configuration\\|context\\|entity\\|package" + "\\(\\s-+body\\)?\\|" "\\(\\(impure\\|pure\\)\\s-+\\)?function\\|procedure\\|component" "\\)\\s-+\\(\\w+\\)") 5 'font-lock-function-name-face) @@ -13232,9 +13388,9 @@ This does highlighting of keywords and standard identifiers.") (list (concat "^\\s-*end\\s-+\\(\\(" - "architecture\\|block\\|case\\|component\\|configuration\\|entity\\|" - "for\\|function\\|generate\\|if\\|loop\\|package\\(\\s-+body\\)?\\|" - "procedure\\|\\(postponed\\s-+\\)?process\\|" + "architecture\\|block\\|case\\|component\\|configuration\\|context\\|" + "entity\\|for\\|function\\|generate\\|if\\|loop\\|package" + "\\(\\s-+body\\)?\\|procedure\\|\\(postponed\\s-+\\)?process\\|" (when (vhdl-standard-p 'ams) "procedural\\|") "units" "\\)\\s-+\\)?\\(\\w*\\)") @@ -13266,10 +13422,10 @@ This does highlighting of keywords and standard identifiers.") ;; highlight names in use clauses (list (concat - "\\" nil 1) + (while (and (re-search-forward "^[ \t]*\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\>" nil 1) (save-excursion (goto-char (match-beginning 0)) (vhdl-backward-syntactic-ws) @@ -13682,7 +13844,7 @@ hierarchy otherwise.") "Scan the context clause that precedes a design unit." (let (lib-alist) (save-excursion - (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|entity\\|package\\)\\>" nil t) + (when (re-search-backward "^[ \t]*\\(architecture\\|configuration\\|context\\|entity\\|package\\)\\>" nil t) (while (and (re-search-backward "^[ \t]*\\(end\\|use\\)\\>" nil t) (equal "USE" (upcase (match-string 1)))) (when (looking-at "^[ \t]*use[ \t\n\r\f]*\\(\\w+\\)\\.\\(\\w+\\)\\.\\w+") @@ -17502,6 +17664,7 @@ specified by a target." 'vhdl-argument-list-indent 'vhdl-association-list-with-formals 'vhdl-conditions-in-parenthesis + 'vhdl-sensitivity-list-all 'vhdl-zero-string 'vhdl-one-string 'vhdl-file-header @@ -17606,6 +17769,17 @@ specified by a target." (defconst vhdl-doc-release-notes nil "\ +Release Notes for VHDL Mode 3.37 +================================ + +- Added support for VHDL'08: + - New keywords, types, functions, attributes, operators, packages + - Context declaration + - Block comments + - Directives + - 'all' keyword in sensitivity list + + Release Notes for VHDL Mode 3.34 ================================ @@ -17667,6 +17841,13 @@ User Options Reserved words in VHDL ---------------------- +VHDL'08 (IEEE Std 1076-2008): + `vhdl-08-keywords' : keywords + `vhdl-08-types' : standardized types + `vhdl-08-attributes' : standardized attributes + `vhdl-08-functions' : standardized functions + `vhdl-08-packages' : standardized packages and libraries + VHDL'93/02 (IEEE Std 1076-1993/2002): `vhdl-02-keywords' : keywords `vhdl-02-types' : standardized types commit 226c1224b5805e5dfc8dd0939b93de2a2bf1e103 Author: Glenn Morris Date: Fri Feb 20 06:18:36 2015 -0500 # Auto-commit of loaddefs files. diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 4f6b6d7..cdf1992 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -930,7 +930,7 @@ Optional argument GROUP is the sub-group of slots to display. ;;;*** -;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "ff1097f185bc2c253276a7d19fe2f54a") +;;;### (autoloads nil "eieio-opt" "eieio-opt.el" "d1910eb455f102989fc33bb3f5a9b614") ;;; Generated autoloads from eieio-opt.el (autoload 'eieio-browse "eieio-opt" "\