1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
Commit graph

128359 commits

Author SHA1 Message Date
Vibhav Pant
cb410433e0 Merge branch 'master' into feature/byte-switch 2017-02-13 17:07:36 +05:30
Vibhav Pant
e742450427 ; Add more documentation for byte-switch related code. 2017-02-13 16:44:06 +05:30
Katsumi Yamaoka
4b18ef7ba3 Fix non-ASCII text encoding (bug#25658)
* lisp/gnus/mm-bodies.el (mm-encode-body):
Fix non-ASCII text encoding (bug#25658).
2017-02-13 08:30:28 +00:00
Vibhav Pant
c24e8290fa test/lisp/emacs-lisp/bytecomp-tests.el: Add more tests for switch. 2017-02-13 13:18:54 +05:30
Glenn Morris
ef6132c55f Fix recent bootstrap issue by moving string-to-list
* lisp/international/mule-util.el (string-to-list, string-to-vector):
Move from here...
* lisp/subr.el (string-to-list, string-to-vector): ...to here.
The implementation is trivial and at least string-to-list
has ended up being needed early during bootstrap.
2017-02-12 19:02:56 -08:00
Glenn Morris
04ea55fa47 Doc fixes related to mail-host-address
* lisp/startup.el (mail-host-address): Doc fix.
* doc/lispref/os.texi (System Environment):
Remove extraneous details of mail-host-address.
2017-02-12 17:53:13 -08:00
Glenn Morris
e9ec1c5b26 Simplify time-stamp mail host usage
* lisp/time-stamp.el (time-stamp-mail-host-name): Remove function.
(time-stamp-string-preprocess): Handle "h" (mail host) directly.
2017-02-12 17:44:46 -08:00
Glenn Morris
ee9970734f Doc fix for vhdl-mode re mail-host-address
* lisp/progmodes/vhdl-mode.el (vhdl-file-header): Doc fix.
(mail-host-address): Do not add to vhdl-related custom group,
since vhdl-template-replace-header-keywords doesn't use it.
2017-02-12 17:36:33 -08:00
Mark Oteiza
4c1d7acf81 Substitute leading $HOME/ in xdg-user-dirs
* lisp/xdg.el (xdg--substitute-home-env): New function.
(xdg--user-dirs-parse-line): Use it.
(xdg-user-dir): Expand ~/ in xdg-user-dirs values.
2017-02-12 20:31:38 -05:00
Mark Oteiza
01ebe5dc0b * lisp/buff-menu.el: Turn on lexical-binding. 2017-02-12 20:02:26 -05:00
Juri Linkov
d8cca4d8c5 * lisp/replace.el (query-replace-from-to-separator): Move propertize
and char-displayable-p test to query-replace-read-from.
Add choice nil to disable this feature.
(query-replace-read-from): Don't reevaluate custom setting.
Use char-displayable-p to test the first non-whitespace character
in query-replace-from-to-separator, use " -> " when fails.
Add prompt for the case when separator is nil but
query-replace-defaults is non-nil.
Remove unused test for regexp-flag.
Thanks to Thierry Volpiatto <thierry.volpiatto@gmail.com>
2017-02-13 02:37:52 +02:00
Karl Fogel
a84da83c1a Convert more uses of looking-at' to following-char'
This follows up to Mark Oteiza's commit of 12 Feb 2017, 14:46:03 UTC
(commit 91478f4623) with more of the same.

* lisp/bookmark.el (bookmark-send-edited-annotation):
  (bookmark-bmenu-execute-deletions): Replace instances of looking-at
  with char comparisons using following-char.
2017-02-12 17:21:06 -06:00
Paul Eggert
d4429dfd49 Fix typos in tests for lax-plist-get etc.
Problem reported by Eli Zaretskii (Bug#25606#62).
* test/src/fns-tests.el (test-cycle-lax-plist-get)
(test-cycle-plist-put, test-cycle-lax-plist-put):
Fix tests to match behavior.
2017-02-12 12:55:29 -08:00
Michael Albinus
0769c99578 Fix bug#25607
* lisp/net/tramp.el (tramp-completion-file-name-handler):
Improve autoloaded version.
(tramp-autoload-file-name-handler): Avoid recursive load.
(tramp-completion-handle-expand-file-name): Handle empty NAME.
(Bug#25607)
2017-02-12 18:19:32 +01:00
Mark Oteiza
7459cbec95 Remove server-buffer-clients string from minor-mode-alist
* lisp/server.el: Don't put an element for server-buffer-clients into
minor-mode-alist. (Bug#20201)
2017-02-12 11:51:19 -05:00
Mark Oteiza
91478f4623 Nix some useless uses of looking-at, looking-back
* lisp/allout.el (allout-kill-topic):
(allout-next-topic-pending-encryption):
* lisp/bookmark.el (bookmark-kill-line):
* lisp/cus-edit.el (custom-save-variables, custom-save-faces):
* lisp/cus-theme.el (custom-theme-write-variables):
(custom-theme-write-faces):
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer):
* lisp/emacs-lisp/checkdoc.el (checkdoc-interactive-loop):
(checkdoc-interactive-ispell-loop):
(checkdoc-message-interactive-ispell-loop, checkdoc-this-string-valid):
(checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/elint.el (elint-get-top-forms):
* lisp/emulation/viper-cmd.el (viper-backward-indent):
* lisp/image-dired.el (image-dired-delete-char):
* lisp/simple.el (kill-visual-line): Replace instances of looking-at,
looking-back with char comparisons using following-char, preceding-char.
2017-02-12 10:59:33 -05:00
Vibhav Pant
219339e2eb ; lisp/emacs-lisp/bytecomp.el: Fix indentation. 2017-02-12 13:24:55 +05:30
Tom Tromey
862d6438cf Recognize JS regexp literals more correctly
Bug#25529
* lisp/progmodes/js.el (js--syntax-propertize-regexp-regexp): New
constant.
(js-syntax-propertize-regexp): Use it.  Remove "end" argument.
(js--syntax-propertize-regexp-syntax-table): Remove.
(js-syntax-propertize): Update.
* test/lisp/progmodes/js-tests.el (js-mode-regexp-syntax-bug-25529):
New test.
2017-02-11 12:30:32 -07:00
Vibhav Pant
e27351e5dd src/bytecode.c (exec_byte_code): Make hash_code a Lisp_Object.
This avoids using XUINT every time while comparing it with
HASH_HASH (h, i), replacing it with EQ.
2017-02-11 23:41:56 +05:30
Vibhav Pant
a35335c767 src/bytecode.c (exec_byte_code): Remove unnecessary (e)assert. 2017-02-11 23:09:47 +05:30
Tom Tromey
c2e19a7340 Fix bug in css--mdn-find-symbol
* lisp/textmodes/css-mode.el (css--mdn-find-symbol): Skip whitespace
before skipping word characters.
test/lisp/textmodes/css-mode-tests.el (css-mdn-symbol-guessing): Add
regression test.
2017-02-11 08:43:47 -07:00
Vibhav Pant
245fb2529b ; src/bytecode.c (exec_byte_code): Refactor byte-switch code.
Remove unnecessary asserts, remove duplicate code.
2017-02-11 20:36:30 +05:30
Vibhav Pant
7c2d493540 src/bytecode.c: Add optional sanity check for jump tables.
* src/bytecode.c (exec_byte_code): When sanity checks are enabled,
  check that the jump table's size is equal to it's count.
2017-02-11 20:13:54 +05:30
Vibhav Pant
c1a9b5db0e Merge branch 'master' into feature/byte-switch 2017-02-11 19:54:37 +05:30
Vibhav Pant
a75d080b17 * src/bytecode.c: Refactor to follow GNU coding standards 2017-02-11 18:17:57 +05:30
Eli Zaretskii
ac83b2dfe4 Fix handling of XBM images on MS-Windows
* src/image.c (xbm_load) [HAVE_NTGUI]: Fix calculation of
'nbytes' when inverting XBM data bits.  (Bug#25661)
2017-02-11 11:55:11 +02:00
Michael Albinus
09d5083420 ; Fix typo in etc/NEWS 2017-02-11 10:29:29 +01:00
Eli Zaretskii
44578d9acc Fix handling of PBM data
* src/image.c (pbm_load): Handle PBM data with no blanks between
individual pixel values correctly.  (Bug#25660)
2017-02-11 11:09:33 +02:00
Noam Postavsky
26187a38a1 Fix warnings in debug tracing code
* src/xdisp.c (dump_glyph, dump_glyph_string):
* src/xfaces.c (dump_realized_face): Cast arguments or adjust format
specifiers to match signedness.
2017-02-10 15:33:05 -05:00
Sam Steingold
59e7efe7bd Extract grep-find-ignored-directories processing from rgrep-default-command
(rgrep-find-ignored-directories): Extract from `rgrep-default-command'.
Some Emacs packages use `grep-find-ignored-directories' to ignore some
directories, so will use this function instead of custom code.
(rgrep-default-command): Use `rgrep-find-ignored-directories'.
2017-02-10 14:53:02 -05:00
Vibhav Pant
dcd0e6fe3a src/bytecode.c: Avoid comparing values unnecessarily in Bswitch
* src/bytecode.c: (exec_byte_code) While linear searching the jump
  table, compare the value's hash table first to avoid calling
  h->test.cmpfn every time.
2017-02-10 23:25:42 +05:30
Paul Eggert
abcba32c26 Fix a few integer-overflow glitches
* src/composite.c (composition_compute_stop_pos, composition_reseat_it):
* src/dispextern.h (struct composition_it.rule_idx):
* src/keyboard.c (Fset__this_command_keys):
* src/xwidget.c (webkit_js_to_lisp):
Don’t assume object sizes fit in ‘int’.
* src/xwidget.c (Fxwidget_resize):
Don’t assume Emacs integers fit in ‘int’.
2017-02-10 08:36:42 -08:00
Eli Zaretskii
cef233eeb8 Fix a bug with displaying an image after a TAB
* src/xdisp.c (display_line): Handle TAB at end of screen line
specially only when we are displaying characters.  (Bug#25662)
2017-02-10 18:19:11 +02:00
Paul Eggert
65298ff4d5 Move cyclic tests to fns-tests.el
* test/src/fns-tests.el (cyc1, cyc2, dot1, dot2): New functions.
(test-cycle-length, test-cycle-safe-length, test-cycle-member)
(test-cycle-memq, test-cycle-memql, test-cycle-assq)
(test-cycle-assoc, test-cycle-rassq, test-cycle-rassoc)
(test-cycle-delq, test-cycle-delete, test-cycle-reverse)
(test-cycle-plist-get, test-cycle-lax-plist-get)
(test-cycle-plist-member, test-cycle-plist-put)
(test-cycle-lax-plist-put, test-cycle-equal, test-cycle-nconc):
New tests.
* test/manual/cyclic-tests.el: File deleted.
2017-02-10 11:52:41 +02:00
Gemini Lasswell
c48f8fa51b Fix instrumenting code with propertized strings in Edebug
* lisp/emacs-lisp/edebug.el (edebug-read-function): Allow
'read' to decide what is and isn't a syntax error.  (Bug#25068)
2017-02-10 11:35:20 +02:00
Vladimir Panteleev
2d284db5c9 Improve fontification in bat-mode
* lisp/progmodes/bat-mode.el (bat-font-lock-keywords): Match
word and symbol constituents when looking for variable names
to fontify; also, correct the syntax table and mark the equal
sign (=) character as punctuation.  Improve fontification
accuracy of iteration/positional variables.
(bat-mode): Set comment-start-skip.  (Bug#25541)

* test/lisp/progmodes/bat-mode-tests.el: New file, tests for
bat-mode.el.
2017-02-10 11:23:24 +02:00
Eli Zaretskii
937bf04804 Restore special setting of this-command-keys by M-x
It was lost when execute-extended-command was reimplemented in Lisp.

* src/keyboard.c (Fset__this_command_keys): New function.
(syms_of_keyboard): Defsubr it.

* lisp/simple.el (execute-extended-command): Set this-command-keys
as novice.el expects.  (Bug#25612)
2017-02-10 10:57:41 +02:00
Juri Linkov
d825d1f28d * lisp/isearch.el (isearch-search-fun-default): Set isearch-adjusted
to t to display "Pending" in the search prompt for lax
word/symbol search (bug#25562).  Don't use lax for lazy-highlighting
when 'bound' is non-nil.
(word-search-regexp, isearch-symbol-regexp): Don't depend on lax
at the beginning of regexp (bug#22589).

* lisp/info.el (Info-isearch-search):
Use isearch--lax-regexp-function-p.

* doc/emacs/search.texi (Word Search, Symbol Search):
Mention "Pending" prompt for lax word/symbol search.
2017-02-10 00:35:22 +02:00
Vibhav Pant
2d10d4ad1a src/bytecode.c (exec_byte_code): Remove unneeded assert. 2017-02-09 21:56:57 +05:30
Vibhav Pant
13eabbd80b bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE 2017-02-09 19:12:59 +05:30
Vibhav Pant
3189f954eb bytecode.c (exec_byte_code): don't check hash code in linear search.
* src/bytecode.c (exec_byte_code): Don't check that the hash code is
  not nil when linear scanning the jump table. Hash tables for are
  declared with :size as the exact number of cases, so each entry i
  should have a hash code. When BYTE_CODE_SAFE, do it as a sanity
  check.
2017-02-09 18:43:31 +05:30
Tino Calancha
35b9b7e751 Ibuffer: Update mode documentation
* lisp/ibuffer.el (ibuffer-mode): List newest commands in mode documentation.
2017-02-09 21:36:32 +09:00
Steven Allen
3817a44a18 Fix environment variable for xdg-data-dirs
* lisp/xdg.el (xdg-data-dirs): Use XDG_DATA_DIRS, not XDG_CONFIG_DIRS

Copyright-paperwork-exempt: yes
2017-02-09 07:18:41 -05:00
Tassilo Horn
bbbfa31ed5 ; Theme updates
; * etc/themes/tsdh-light-theme.el (tsdh-light): Theme updates.
2017-02-09 12:02:43 +01:00
Tino Calancha
d9fd1d3263 Ibuffer: Erase output buffer before shell commands
* lisp/ibuf-macs.el (define-ibuffer-op): Add keyword arguments
BEFORE and AFTER; they are forms to run before/after the operation.
* lisp/ibuf-ext.el (ibuffer--maybe-erase-shell-cmd-output):
New defun; if shell-command-dont-erase-buffer is nil, then
erase shell command output buffer.
(ibuffer-do-shell-command-pipe, ibuffer-do-shell-command-file): Use it.
2017-02-09 18:14:10 +09:00
Tino Calancha
1e23bf5c51 Ibuffer: Don't truncate shell command output
* lisp/ibuf-ext.el (ibuffer-do-shell-command-pipe)
(ibuffer-do-shell-command-pipe-replace)
Use 'call-shell-region' (Bug#22679).
(ibuffer-do-shell-command-file): Use call-process-shell-command.
If FILE, the file that the buffer object is visiting,
exists and the buffer is up-to-date, then use
FILE instead of creating a temporary file (Bug#22679).
2017-02-09 18:13:59 +09:00
Vibhav Pant
dde800c8c9 Improve byte-switch execution.
* lisp/emacs-lisp/byte-opt.el,
  lisp/emacs-lisp/bytecomp.el (byte-decompile-bytecode-1),
  (byte-compile-lapcode): Calculate the actual jump address while
  compiling, store it in the jump table.

* src/bytecode.c: Jump to the looked up value directly, do a linear
  search when the number of elements is <= 5.
2017-02-09 12:18:54 +05:30
Noam Postavsky
2bfe83fcd3 Make sure eshell pipelines don't drop data
* lisp/eshell/esh-proc.el (eshell-sentinel): If called while still
handling output of the process, make sure to close the pipes only later,
so that the next process in the pipeline recieves EOF only after getting
all its input (Bug#25549).
2017-02-08 23:37:57 -05:00
Katsumi Yamaoka
41de25c113 Make mm-shr use mail-parse-charset by default
* lisp/gnus/mm-decode.el (mm-shr): Use mail-parse-charset by default.
This helps an html message with no charset spec to be decoded.
2017-02-09 00:41:19 +00:00
Stephen Berman
90f76eb358 describe-char: unambiguous name for inserting ASCII 7
* lisp/descr-text.el (describe-char): Make the input
suggestion for inserting ASCII character 7 by name use the
unambiguous name "BELL (BEL)" (bug#25641).
2017-02-08 22:38:39 +01:00