Commit graph

1918 commits

Author SHA1 Message Date
Lars Magne Ingebrigtsen
1a29adc257 * net/shr.el (shr-descend): Don't bug out if the anchor is empty.
Fixes: debbugs:16285
2014-01-05 10:45:45 +01:00
Kenjiro NAKAYAMA
189340f5dc Make the eww history browsing work again
* net/eww.el (eww-list-histories,eww-history-browse): Fixup.
(eww-history-quit): Delete and use quit-window.
(eww-history-kill): Delete, because it doesn't work well and
not necessary.
(eww-history-mode-map): Delete some keys and add easy-menu.
2014-01-05 10:27:26 +01:00
Kenjiro NAKAYAMA
f4018140ec * net/eww.el (eww): Support single/double quote for search. 2014-01-05 10:25:05 +01:00
Paul Eggert
6bc383b1a4 Fix copyright years by hand.
These are dates that admin/update-copyright did not update,
or updated incorrectly.
2014-01-01 00:31:29 -08:00
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Glenn Morris
bb0980751e Add missing custom :versions, plus small fixes
* emacs-lisp/smie.el (smie-config): Add type, version, initialize.

* bookmark.el (bookmark-bmenu-use-header-line):
* doc-view.el (doc-view-scale-internally):
* pcmpl-x.el (pcmpl-x-tlmgr-program, pcmpl-x-ack-program):
* register.el (register-preview-delay):
* net/shr.el (shr-bullet):
* progmodes/cfengine.el (cfengine-cf-promises)
(cfengine-parameters-indent):
* progmodes/octave.el (inferior-octave-error-regexp-alist):
* textmodes/reftex-vars.el (reftex-label-regexps):
* vc/log-edit.el (log-edit-setup-add-author): Add version.

* cedet/ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default): Fix custom types.  Add version.

* gnus/gnus-icalendar.el (gnus-icalendar-org, gnus-icalendar):
* gnus/gnus-sum.el (gnus-subthread-sort-functions): Add version.
* gnus/gnus-sync.el (gnus-sync-file-encrypt-to): Add type and version.
2013-12-27 18:16:05 -08:00
Glenn Morris
9c61f806fb Misc small custom fixes
The value of defcustom's const should not be quoted!

* lisp/desktop.el (desktop-restore-in-current-display):
* lisp/newcomment.el (comment-empty-lines):
* lisp/progmodes/idlwave.el (idlwave-scan-all-buffers-for-routine-info)
(idlwave-pad-keyword):
* lisp/progmodes/tcl.el (tcl-tab-always-indent):
* lisp/textmodes/reftex-vars.el (reftex-index-default-tag):
* lisp/elec-pair.el (electric-pair-skip-whitespace):
* lisp/progmodes/cfengine.el (cfengine-cf-promises):
* lisp/cedet/ede/linux.el (project-linux-build-directory-default)
(project-linux-architecture-default):
* lisp/erc/erc-button.el (erc-button-alist):
* lisp/gnus/auth-source.el (auth-sources):
* lisp/gnus/nnmairix.el (nnmairix-propagate-marks-upon-close):
* lisp/url/url-history.el (url-history-track):
* lisp/url/url-vars.el (url-honor-refresh-requests):
Fix custom types.

* lisp/net/tls.el (tls-certtool-program): Fix default value.
2013-12-27 17:24:15 -08:00
Lars Ingebrigtsen
e572a7d800 * net/shr.el (shr-insert): Don't infloop if the width is zero. 2013-12-27 16:43:54 +01:00
Lars Ingebrigtsen
24a6b65e90 Fix another shr infloop in the filling code
(shr-find-fill-point): Off by one error in comparison with the
indentation.
2013-12-27 03:58:16 +01:00
Lars Ingebrigtsen
ac5758d162 shr didn't fill Japanese text correctly any more
* net/shr.el (shr-find-fill-point): Don't try to fill if the
indentation level is larger than the width, because that will
infloop.
(shr-insert): Fill repeatedly long texts, so that Japanese is
formatted correctly.

Fixes: debbugs:16263
2013-12-27 03:21:42 +01:00
Lars Ingebrigtsen
f7f071dcf4 Don't infloop when we can't find a good place to break lines in shr
(shr-insert): Don't infloop if we can't find a good place to break
the line.

Fixes: debbugs:16256
2013-12-25 23:52:15 +01:00
Lars Ingebrigtsen
3c856c1415 * net/shr.el (shr-visit-file): Removed debugging function. 2013-12-25 20:37:41 +01:00
Lars Ingebrigtsen
c6c2058404 Further shr quotation mark fill fixes
(shr-char-kinsoku-bol-p): The quotation mark isn't a kinsoky BOL char.
(shr-find-fill-point): Remove the special checks for the quotation
mark, since `shr-char-kinsoku-bol-p' should now return the right
thing.
2013-12-25 19:14:49 +01:00
Lars Ingebrigtsen
99e4926fcb Fold shr text with single quotation marks better
* net/shr.el (shr-find-fill-point): Don't break lines before a
quotation mark.
2013-12-25 18:31:39 +01:00
Kenjiro NAKAYAMA
fec0e8283f eww textarea fixups
* net/eww.el (eww-form-textarea): Use a different face for
textareas than text input since they have different keymaps.

Fixes: debbugs:16142
2013-12-25 16:33:16 +01:00
Lars Ingebrigtsen
eeef121a18 eww bookmark window restoration
* net/eww.el (eww-bookmark-browse): Use `quit-window' to restore
the window configuration.
2013-12-24 19:07:55 +01:00
Eli Zaretskii
121ea65f3f Fix eww-open-file for MS-Windows and MS-DOS.
lisp/net/eww.el (eww-open-file): Ensure 3 slashes after "file:" when
 we run on MS-Windows or MS-DOS.
2013-12-24 19:23:56 +02:00
Lars Ingebrigtsen
58f2b9a558 Fix eww bookmark window configuration
* net/eww.el (eww-bookmark-quit): Remove.
(eww-bookmark-browse): Restore the window configuration when you
choose a bookmark.

Fixes: debbugs:16144
2013-12-24 08:25:27 +01:00
Ted Zlatanov
b90aa4f440 net/gnutls.el (gnutls-verify-error): Add version tag.
* net/gnutls.el (gnutls-verify-error): Add version tag.
2013-12-23 07:51:51 -05:00
Kenjiro NAKAYAMA
56890ecdb8 eww: jump to next select field easier and better ftp error
* net/eww.el (eww-tag-select): Add text-property to jump to next
select field.
(eww) : Add non-supported ftp error.
2013-12-22 17:40:35 -05:00
Kenjiro NAKAYAMA
dde4de31e0 eww: fix wrong key binding
* net/eww.el (eww-checkbox-map): Fix wrong key bind to `eww-toggle-checkbox'.
2013-12-21 15:50:02 -05:00
Kenjiro NAKAYAMA
5edcc2dc14 eww: support disabled and readonly text
* net/eww.el (eww-form-text): Support text form with disabled and readonly attributes.
2013-12-21 15:42:23 -05:00
Ted Zlatanov
d49fbfd670 eww: machinery to list browser history
* net/eww.el (eww-list-histories, eww-list-histories)
(eww-history-browse, eww-history-quit, eww-history-kill)
(eww-history-mode-map, eww-history-mode): New command and
functions to list browser histories.
2013-12-21 15:33:44 -05:00
Rüdiger Sonderfeld
5e1901c179 eww: minor code fixes and toolbar support
* net/eww.el (eww-back-url, eww-forward-url, eww-next-url)
(eww-previous-url, eww-up-url, eww-top-url, eww-add-bookmark)
(eww-bookmark-prepare, eww-bookmark-kill, eww-bookmark-yank)
(eww-bookmark-browse, eww-next-bookmark, eww-previous-bookmark):
Use `user-error'.
(eww-bookmark-mode-map): Add menu.
(eww-render, eww-mode): Use `setq-local'.
(eww-tool-bar-map): New variable.
(eww-mode): Set `tool-bar-map'.
(eww-view-source): Check for `html-mode' with `fboundp'.
2013-12-21 15:13:09 -05:00
Lars Magne Ingebrigtsen
073d5cfd9e * net/shr.el (shr--extract-best-source): Don't bug out on audio elements
That have text inside.  Also remove debugging.
2013-12-21 18:54:16 +01:00
Lars Magne Ingebrigtsen
cf91cee781 * net/shr.el (shr-insert): Protect against infloops in degenerate tables. 2013-12-20 05:29:08 +01:00
Ted Zlatanov
8f2be364dc eww: Revert 2013-12-11T19:01:44Z!tzz@lifelogs.com UI wrappers (eww-exit, eww-close)
* net/eww.el (eww-exit, eww-close, eww-mode-map): Revert change of
2013-12-11T19:01:44Z!tzz@lifelogs.com.
2013-12-19 11:25:25 -05:00
Juri Linkov
7a409b3005 * lisp/menu-bar.el (menu-bar-tools-menu): Add `browse-web'.
* lisp/startup.el (fancy-startup-screen, fancy-about-screen):
Set browse-url-browser-function to eww-browse-url locally.
(Bug#14751)

* lisp/net/browse-url.el (browse-url-browser-function): Move `eww'
closer to similar functions.

* lisp/net/eww.el (browse-web): Add alias to `eww'.
(eww-mode-map): Bind "r" to `eww-forward-url' like in Info.
Bind "S-SPC" to `scroll-down-command'.  (Bug#16178)
2013-12-17 23:17:05 +02:00
Leo Liu
2b84d76395 * net/rcirc.el (rcirc-add-face):
* eshell/em-prompt.el (eshell-emit-prompt):
* eshell/em-ls.el (eshell-ls-decorated-name): Use font-lock-face.

Fixes: debbugs:16167
2013-12-17 23:15:00 +08:00
Stefan Monnier
e914544431 * lisp/net/shr.el (shr-insert-document): Remove unused var
`shr-preliminary-table-render'.
(shr-rescale-image): Remove unused arg `force'.
(shr-put-image): Update calls accordingly.
(shr-tag-a): Use `cont' rather than dyn-bound `dom'.
2013-12-16 21:48:06 -05:00
Lars Magne Ingebrigtsen
1c4b1e6107 * net/shr.el (shr-tag-a): Support zero-length <a name="foo"> elements. 2013-12-17 00:40:17 +01:00
Lars Magne Ingebrigtsen
11bade0ad8 eww anchor pointer movement fixup
* net/eww.el (eww-display-html): If we can't find the anchor we're
looking for, then go to point-min.
2013-12-17 00:29:47 +01:00
Stefan Monnier
2013a2f955 * lisp/emulation/cua-rect.el (cua-rectangle-mark-mode): New minor mode.
(cua--deactivate-rectangle): Don't deactivate the mark.
(cua-set-rectangle-mark): Don't set mark-active since
cua--activate-rectangle already does it for us.
(cua--rectangle-highlight-for-redisplay): Unhighlight a previous
non-rectangular region.

* lisp/emulation/cua-base.el (cua-repeat-replace-region):
Use with-current-buffer.

* lisp/net/gnutls.el: Use cl-lib.
(gnutls-negotiate): `mapcan' -> cl-mapcan.
2013-12-15 21:24:08 -05:00
Ted Zlatanov
31b4827ea9 New verify-error GnuTLS interface for certificate validation
* net/gnutls.el (gnutls-verify-error): New defcustom to control
the behavior when a certificate fails validation.  Defaults to
old behavior: never abort, just warn.
(gnutls-negotiate): Use it.

* gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
now a list of certificate validation checks that will abort a
connection with an error.
(Fgnutls_boot): Document it and use it.
2013-12-14 13:04:09 -05:00
Eli Zaretskii
01633a17e7 Support MS-Windows file names that use characters outside of ANSI codepage.
src/w32.c (get_file_security, set_file_security)
 (create_symbolic_link): Separate pointers and boolean flags for
 ANSI and Unicode APIs.  Use the latter if w32_unicode_filenames is
 non-zero, else the former.
 (codepage_for_filenames, filename_to_utf16, )
 (filename_from_utf16, filename_to_ansi, filename_from_ansi): New
 functions.
 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
 characters.
 (normalize_filename): Lose the DBCS code, now works on UTF-8.
 Accept only one argument; all callers changed.
 (dostounix_filename): Remove the second argument, now works in
 UTF-8.  All callers changed.
 (parse_root): Lose DBCS code.
 (get_long_basename, w32_get_short_filename, init_environment)
 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
 otherwise.
 (ansi_encode_filename): New function.
 (get_emacs_configuration, get_emacs_configuration_options):
 Functions deleted.
 (add_volume_info, GetCachedVolumeInformation): Run the input file
 name through unixtodos_filename, to ensure it is stored and
 referenced in canonical form.
 (get_volume_info): Lose the DBCS code, now works in UTF-8.
 (logon_network_drive, sys_link, utime): Improve error handling.
 (sys_access): New function.
 (hashval, generate_inode_val): Unused functions deleted.
 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
 (check_windows_init_file): Convert error message from UTF-8 to
 ANSI codepage, for display in the message box.
 (globals_of_w32): Set w32_unicode_filenames according to the OS
 version.
 src/w32term.c (construct_drag_n_drop): Work in Unicode mode when
 w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (syms_of_w32term): Declare w32-unicode-filenames.
 src/w32proc.c (new_child, delete_child): Remove code that handled
 unused pending_deletion and input_file members of the child struct.
 (create_child, sys_spawnve): Convert all file names to ANSI
 codepage.  Use ANSI APIs explicitly; forcibly fail if any file
 name cannot be encoded in ANSI codepage.  Don't use
 unixtodos_filename, mirror slashes by hand.
 (record_infile, record_pending_deletion): Functions deleted.
 (Fw32_short_file_name): Call w32_get_short_filename instead of
 GetShortPathName.
 src/w32notify.c (add_watch): Work in Unicode mode when
 w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
 instead, do the same with Lisp primitives.
 src/w32fns.c (file_dialog_callback, Fx_file_dialog)
 (Fsystem_move_file_to_trash, Fw32_shell_execute)
 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (Fw32_shell_execute): Improve error reporting.
 (Fdefault_printer_name): Ifdef away for Cygwin.
 src/w32.h (struct _child_process): Remove input_file and
 pending_deletion members that are no longer used.
 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
 (ansi_encode_filename): New and updated prototypes.
 src/unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
 APIs explicitly.
 (unexec): Don't use dostounix_filename, it expects a file name in
 UTF-8.  Instead, mirror backslashes by hand.  Convert NEW_NAME to
 ANSI encoding.
 src/fileio.c (Ffile_name_directory, file_name_as_directory)
 (directory_file_name, Fexpand_file_name)
 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
 arguments of dostounix_filename.
 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
 use MAX_UTF8_PATH for size of file-name strings.
 (emacs_readlinkat): Build an explicitly unibyte string for file
 names.
 (syms_of_fileio) <file-name-coding-system>
 default-file-name-coding-system>: Mention MS-Windows peculiarities.
 src/emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
 directories to UTF-8.
 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
 environment, and each element of the input PATH, to UTF-8.
 src/dired.c (file_attributes): Use build_unibyte_string explicitly
 to make Lisp strings from user and group names.
 src/coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
 decode_file.
 src/coding.c (decode_file_name, encode_file_name): New functions.
 src/termcap.c (tgetent): Adapt to the change in arguments of
 dostounix_filename.
 src/sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
 names.
 src/msdos.c (dostounix_filename, init_environment): Adapt to the
 change in arguments of dostounix_filename.
 src/image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
 [WINDOWSNT]: Encode file names passed to the image libraries in
 ANSI codepage.
 src/gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
 [WINDOWSNT]: Convert file names to the current ANSI codepage.
 src/filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
 arguments of dostounix_filename.

 nt/inc/ms-w32.h (MAX_UTF8_PATH): New macro.
 (opendir, closedir, readdir, seekdir): Redirect to replacement
 functions.
 nt/inc/dirent.h: Make d_name[] be MAXNAMELEN*4 characters long.

 lisp/term/w32-win.el (w32-handle-dropped-file):
 lisp/startup.el (normal-top-level):
 lisp/net/browse-url.el (browse-url-file-url):
 lisp/dnd.el (dnd-get-local-file-name): On MS-Windows, encode and
 decode file names using 'utf-8' rather than
 file-name-coding-system.

 doc/emacs/mule.texi (File Name Coding): Document file-name encoding
 peculiarities on MS-Windows.

 doc/lispref/nonascii.texi (Encoding and I/O): Document file-name encoding
 peculiarities on MS-Windows.

 etc/NEWS: Mention support on MS-Windows of file names outside of the
 current locale.

Fixes: debbugs:7100
2013-12-12 20:19:10 +02:00
Ted Zlatanov
f4fe8fdd37 eww: exit and close actions
* net/eww.el (eww-exit, eww-close): Add UI convenience wrappers.
(eww-mode-map): Use them.
2013-12-11 14:01:44 -05:00
Eli Zaretskii
a34a8cd1e4 Merge from trunk. 2013-12-11 19:06:29 +02:00
Kenjiro NAKAYAMA
b68cf43cfb eww easy-menu fixes
* net/eww.el (eww-mode-map): Instead of "Quit" show "Exit" and
"Close browser" menu items.  Fix wrong function of "List
bookmarks".
2013-12-10 19:27:27 -05:00
Eli Zaretskii
ce1d7b61f1 Merge from trunk. 2013-12-07 19:21:57 +02:00
Lars Magne Ingebrigtsen
e330b64699 * net/shr.el (shr-tag-img): Don't bug out on <img src=""> data. 2013-12-07 02:44:15 +01:00
Michael Albinus
4803595dfd Bug#16045
* progmodes/compile.el (compilation-start):
* progmodes/grep.el (rgrep): Revert change of 2012-12-20T11:15:38Z!michael.albinus@gmx.de.

* net/tramp-sh.el (tramp-sh-handle-start-file-process):
Handle long command lines, lasting from "sh -c ...".  (Bug#16045)
2013-12-06 16:34:06 +01:00
Ted Zlatanov
ff69c18f0c eww: add command to view page source
* net/eww.el (eww-current-source): New variable to store page
source.
(eww-display-html, eww-mode, eww-save-history)
(eww-restore-history): Use it.
(eww-view-source): New command to view page source.
Opportunistically uses `html-mode' to highlight the buffer.
(eww-mode-map): Install it.
2013-12-05 11:04:53 -05:00
Michael Albinus
b85eff45cf Minor changes, detected by test suite.
* net/dbus.el (dbus-unregister-service)
(dbus-escape-as-identifier, dbus-unescape-from-identifier):
Fix docstring.
(dbus-unregister-service): Skip :serial entries in
`dbus-registered-objects-table'.
(dbus-byte-array-to-string): New optional arg MULTIBYTE.
2013-12-05 16:29:59 +01:00
Michael Albinus
81961e4cea * net/dbus.el (dbus-byte-array-to-string): Accept also byte arrays
in D-Bus type syntax.
(dbus-unescape-from-identifier): Use `byte-to-string' in order to
preserve unibyte strings.  (Bug#16048)
2013-12-04 15:10:09 +01:00
Eli Zaretskii
d45c908859 Fixed drag-n-drop with Unicode file names. 2013-12-03 14:21:13 +02:00
Katsumi Yamaoka
39fa32d635 lisp/net/eww.el (eww-render): Don't pass arg to eww-display-image 2013-12-03 04:54:17 +00:00
Michael Albinus
a8a15d9d45 * net/tramp-sh.el (tramp-remote-process-environment): Do not set "LC_ALL".
(tramp-get-remote-locale): New defun.
(tramp-open-connection-setup-interactive-shell): Use it.
2013-12-02 14:52:23 +01:00
Paul Eggert
f224e50022 Spelling and punctuation fixes. 2013-12-01 14:33:13 -08:00
Lars Magne Ingebrigtsen
1f6e1bb000 eww: Have q' do a normal quit-window' instead of killing the buffer. 2013-12-01 18:00:04 +01:00
Rüdiger Sonderfeld
4570dd1614 Allow customizing the checkboxes in eww
* net/shr.el (shr-tag-table): Fix comment typo.

* net/eww.el (eww-text-input-types): : New const.
(eww-process-text-input): Treat input types in
`eww-text-input-types' as text.

* net/shr.el (shr-tag-video): Display content for video if no
poster is available.
(shr-tag-audio): Add support for <audio> tag.

* net/eww.el (eww-use-external-browser-for-content-type): New
variable.
(eww-render): Handle `eww-use-external-browser-for-content-type'.
Use \\` to match beginning of string instead of ^.
(eww-browse-with-external-browser): Provide optional URL parameter.
(eww-render): Set `eww-current-title' back to "".

* net/shr.el (shr-prefer-media-type-alist): : New customizable
variable.
(shr--get-media-pref): New function.
(shr--extract-best-source): New function.
(shr-tag-video, shr-tag-audio):  Use `shr--extract-best-source' when
no :src tag was specified.

* net/eww.el (eww-form-checkbox-selected-symbol): New
customizable variable.
(eww-form-checkbox-symbol): New customizable variable.
(eww-form-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
(eww-toggle-checkbox): Use `eww-form-checkbox-selected-symbol' and
`eww-form-checkbox-symbol'.
2013-12-01 16:52:04 +01:00