Stefan Monnier [Thu, 5 Feb 2015 19:28:16 +0000 (14:28 -0500)]
Add (:documentation <form>) for dynamically-generated docstrings
* lisp/emacs-lisp/bytecomp.el:
(byte-compile-initial-macro-environment): Use macroexp-progn.
(byte-compile-cl-warn): Don't silence use of cl-macroexpand-all.
(byte-compile-file-form-defvar-function): Rename from
byte-compile-file-form-define-abbrev-table.
(defvaralias, byte-compile-file-form-custom-declare-variable): Use it.
(byte-compile): Use byte-compile-top-level rather than
byte-compile-lambda so we can compile non-values.
(byte-compile-form): Add warnings for failed uses of lexical vars via
quoted symbols.
(byte-compile-unfold-bcf): Improve message for failed inlining.
(byte-compile-make-closure): Handle new format of internal-make-closure
for dynamically-generated docstrings.
* lisp/emacs-lisp/cconv.el (cconv--convert-function):
Add `docstring' argument.
(cconv-convert): Use it to handle the new (:documentation ...) form.
(cconv-analyze-form): Handle the new (:documentation ...) form.
* src/eval.c (Ffunction): Handle the new (:documentation ...) form.
(syms_of_eval): Declare `:documentation'.
Michael Albinus [Tue, 3 Feb 2015 08:24:57 +0000 (09:24 +0100)]
Further work on suppressing shell history in Tramp
Fixes: debbugs:19731
* net/tramp-sh.el (tramp-histfile-override): Fix docstring.
(tramp-open-shell, tramp-maybe-open-connection): Set also
HISTFILESIZE and HISTSIZE when needed.
Michael Albinus [Mon, 2 Feb 2015 11:38:36 +0000 (12:38 +0100)]
Tramp: Support unsetting HISTFILE.
Fixes: debbugs:19731
* lisp/net/tramp-sh.el (tramp-histfile-override): Add another choice 'unset.
(tramp-open-shell, tramp-maybe-open-connection): Support it.
Eli Zaretskii [Sat, 31 Jan 2015 18:48:53 +0000 (20:48 +0200)]
Avoid aborts when keyboard-coding-system is raw-text (Bug#19532)
src/coding.c (raw_text_coding_system_p): New function.
src/keyboard.c (read_decoded_event_from_main_queue): Use it when the
keyboard coding-system is 'raw-text'.
src/coding.h (raw_text_coding_system_p): Add prototype.
Paul Eggert [Sat, 31 Jan 2015 07:11:55 +0000 (23:11 -0800)]
Simplify read_dirent's MSDOS hacks
* dired.c (read_dirent): Simplify by removing the need for the
DIR_ENTRY argument. All callers changed. This separates the
MS-DOS idiosyncrasies better from the rest of the code.
* lisp/emacs-lisp/eieio-core.el (eieio--check-type): Remove.
Use cl-check-type everywhere instead.
(eieio-class-object): Remove, use find-class instead when needed.
(class-p): Don't inline.
(eieio-object-p): Check more thoroughly, so we don't treat cl-structs,
such as eieio classes, as objects. Don't inline.
(object-p): Mark as obsolete.
(eieio-defclass-autoload, eieio-defclass-internal, eieio-oref)
(eieio--generic-tagcode): Avoid `class-p'.
(eieio-make-class-predicate, eieio-make-child-predicate): New functions.
(eieio-defclass-internal): Use current-load-list rather than
`class-location'.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-class, eieio-help-constructor):
Use find-lisp-object-file-name, help-fns-short-filename and new calling
convention for eieio-class-def.
(eieio-build-class-list): Remove function, unused.
(eieio-method-def): Remove button type, unused.
(eieio-class-def): Inherit from help-function-def.
(eieio--defclass-regexp): New constant.
(find-function-regexp-alist): Use it.
(eieio--specializers-apply-to-class-p): Handle eieio--static as well.
(eieio-help-find-method-definition, eieio-help-find-class-definition):
Remove functions.
* lisp/emacs-lisp/eieio.el (defclass): Use new eieio-make-class-predicate
and eieio-make-child-predicate.
(eieio-class-parents): Use eieio--class-object.
(slot-boundp, find-class, eieio-override-prin1): Avoid class-p.
(slot-exists-p): Use find-class.
Stefan Monnier [Fri, 30 Jan 2015 21:00:29 +0000 (16:00 -0500)]
* lisp/emacs-lisp/backquote.el: Fix bug with unoptimized exp.
Fixes: debbugs:19734
* lisp/emacs-lisp/backquote.el (backquote-delay-process): Don't reuse `s'
since it may be "equivalent" in some sense, yet different.
* test/automated/core-elisp-tests.el (core-elisp-tests-3-backquote): New test.
Oleh Krehel [Wed, 28 Jan 2015 09:32:12 +0000 (10:32 +0100)]
lisp/outline.el: Add namespace prefixes.
* outline.el (outline-hide-entry): Rename from `hide-entry'.
(outline-show-entry): rename from `show-entry'
(outline-hide-body): Rename from `hide-body'.
(outline-hide-region-body): Rename from `hide-region-body'.
(outline-show-all): Rename from `show-all'.
(outline-hide-subtree): Rename from `hide-subtree'.
(outline-hide-leaves): Rename from `hide-leaves'.
(outline-show-subtree): Rename from `show-subtree'.
(outline-hide-sublevels): Rename from `hide-sublevels'.
(outline-hide-other): Rename from `hide-other'.
(outline-show-children): Rename from `show-children'.
(outline-show-branches): Rename from `show-branches'.
files.el: avoid asking whether to kill Emacs multiple times
* lisp/files.el (save-buffers-kill-emacs): If `confirm-kill-emacs' is
set, but user has just been asked whether they really want to kill Emacs
(for example with a ‘Modified buffers exist; exit anyway?’ prompt) , do
not ask them for another confirmation.
Eli Zaretskii [Fri, 30 Jan 2015 06:48:32 +0000 (08:48 +0200)]
Fix error messages when readdir cannot open a directory on MS-Windows
src/dired.c (read_dirent): Accept an additional argument
FIRST_ENTRY. If readdir fails with ENOENT or EACCES the first
time it is called, report the error as if it happened in
open_directory.
(directory_files_internal, file_name_completion): Adjust callers
or read_dirent.
Paul Eggert [Thu, 29 Jan 2015 23:32:15 +0000 (15:32 -0800)]
Report readdir failures
Previously, on non-MS-Windows platforms the code treated most
readdir failures as EOF. This was incorrect, e.g., when readdir
fails with errno == EOVERFLOW. Signal an error instead.
* dired.c (read_dirent):
New function, which signals an error when readdir fails.
(directory_files_internal, file_name_completion): Use it.
Eli Zaretskii [Thu, 29 Jan 2015 17:16:56 +0000 (19:16 +0200)]
Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c.
src/w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where
appropriate.
src/w32font.c (struct font_callback_data, w32font_list_internal)
(w32font_driver, w32font_match_internal): Use bool where appropriate.
src/w32menu.c (x_activate_menubar, set_frame_menubar)
(w32_dialog_show, initialize_frame_menubar, w32_menu_show)
(is_simple_dialog): Use bool where appropriate.
Paul Eggert [Wed, 28 Jan 2015 19:11:14 +0000 (11:11 -0800)]
Use bool, not int, to track face changes
* xfaces.c (face_change): Rename from face_change_count, and
change from int to bool. The var is now true (instead of nonzero)
if attributes have changed; this is simpler. All uses changed. Fixes: bug#19698
Eli Zaretskii [Wed, 28 Jan 2015 17:42:28 +0000 (19:42 +0200)]
Improve the fix for bug #19701
src/dired.c (directory_files_internal, file_name_completion)
[WINDOWSNT]: Signal an error when errno is set non-zero by
'readdir', regardless of its value.
src/w32.c (sys_readdir): Set errno to ENOENT when the directory
doesn't exist and to EACCES when it's not accessible to the
current user. Set errno to zero when FindNextFile exhausts the
directory, so that callers don't interpret that as an error and
don't signal a file-error.
(open_unc_volume): Set errno to ENOENT if WNetOpenEnum fails.
Tassilo Horn [Wed, 28 Jan 2015 09:32:50 +0000 (10:32 +0100)]
Fix issues with BibTeX entries containing ")".
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
punctuation syntax since to allow bibtex fields with values such
as {Test 1) and 2)} (bug#19205, bug#19707).
(reftex--prepare-syntax-tables): New function.
(reftex-mode): Use it.