mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Make binaries distributed with Emacs work on Android
* doc/lispref/processes.texi (Subprocess Creation): Document variables containing program names. * etc/NEWS: Document new variables. * java/Makefile.in (CROSS_BINS): Add missing etags binary. * lisp/cedet/semantic/db-ebrowse.el (semanticdb-create-ebrowse-database): * lisp/gnus/mail-source.el (mail-source-movemail-program): * lisp/hexl.el (hexl-program): * lisp/htmlfontify.el (hfy-etags-bin): * lisp/ielm.el (inferior-emacs-lisp-mode): * lisp/mail/rmail.el (rmail-autodetect): (rmail-insert-inbox-text): * lisp/org/org-ctags.el (org-ctags-path-to-ctags): * lisp/progmodes/cperl-mode.el (cperl-etags): * lisp/speedbar.el (speedbar-fetch-etags-command): * lisp/textmodes/reftex-global.el (reftex-create-tags-file): Use new variables. * src/callproc.c (syms_of_callproc): New variables naming binaries redistributed with Emacs.
This commit is contained in:
parent
54836c47c7
commit
9082b4e6ee
14 changed files with 113 additions and 14 deletions
|
|
@ -185,6 +185,24 @@ respective remote host. In case of a local @code{default-directory},
|
|||
the function returns just the value of the variable @code{exec-path}.
|
||||
@end defun
|
||||
|
||||
@cindex programs distributed with Emacs, starting
|
||||
@vindex ctags-program-name
|
||||
@vindex etags-program-name
|
||||
@vindex hexl-program-name
|
||||
@vindex emacsclient-program-name
|
||||
@vindex movemail-program-name
|
||||
@vindex ebrowse-program-manem
|
||||
When starting a program that is part of the Emacs distribution,
|
||||
you must take into account that the program may have been renamed in
|
||||
order to comply with executable naming restrictions present on the
|
||||
system.
|
||||
|
||||
Instead of starting @command{ctags}, for example, you should specify
|
||||
the value of @code{ctags-program-name} instead. Likewise, instead of
|
||||
starting @command{movemail}, you must start
|
||||
@code{movemail-program-name}, and the same goes for @command{etags},
|
||||
@command{hexl}, @command{emacsclient}, and @command{ebrowse}.
|
||||
|
||||
@node Shell Arguments
|
||||
@section Shell Arguments
|
||||
@cindex arguments for shell commands
|
||||
|
|
|
|||
8
etc/NEWS
8
etc/NEWS
|
|
@ -238,6 +238,14 @@ This user option has been obsoleted in Emacs 27, use
|
|||
|
||||
* Lisp Changes in Emacs 30.1
|
||||
|
||||
+++
|
||||
** New variables describing the names of built in programs.
|
||||
The new variables 'ctags-program-name', 'ebrowse-program-name',
|
||||
'etags-program-name', 'hexl-program-name', 'emacsclient-program-name'
|
||||
and 'movemail-program-name' should be used instead of "ctags",
|
||||
"ebrowse", "etags", "hexl", and "emacsclient", when starting one of
|
||||
these built in programs in a subprocess.
|
||||
|
||||
+++
|
||||
** 'x-popup-menu' now understands touch screen events.
|
||||
When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ APK_NAME = emacs-$(version)-$(ANDROID_MIN_SDK)-$(ANDROID_ABI).apk
|
|||
# lib/$(ANDROID_ABI)/libemacs.so
|
||||
# lib/$(ANDROID_ABI)/libandroid-emacs.so
|
||||
# lib/$(ANDROID_ABI)/libctags.so
|
||||
# lib/$(ANDROID_ABI)/libetags.so
|
||||
# lib/$(ANDROID_ABI)/libhexl.so
|
||||
# lib/$(ANDROID_ABI)/libmovemail.so
|
||||
# lib/$(ANDROID_ABI)/librcs2log.so
|
||||
|
|
@ -83,7 +84,8 @@ all: $(APK_NAME)
|
|||
# Binaries to cross-compile.
|
||||
CROSS_BINS = ../cross/src/android-emacs ../cross/lib-src/ctags \
|
||||
../cross/lib-src/hexl ../cross/lib-src/movemail \
|
||||
../cross/lib-src/ebrowse ../cross/lib-src/emacsclient
|
||||
../cross/lib-src/ebrowse ../cross/lib-src/emacsclient \
|
||||
../cross/lib-src/etags
|
||||
|
||||
# Libraries to cross-compile.
|
||||
CROSS_LIBS = ../cross/src/libemacs.so
|
||||
|
|
|
|||
|
|
@ -158,7 +158,8 @@ is specified by `semanticdb-default-save-directory'."
|
|||
;; Call the EBROWSE command.
|
||||
(message "Creating ebrowse file: %s ..." savein)
|
||||
(call-process-region (point-min) (point-max)
|
||||
"ebrowse" nil "*EBROWSE OUTPUT*" nil
|
||||
ebrowse-program-name
|
||||
nil "*EBROWSE OUTPUT*" nil
|
||||
(concat "--output-file=" savein)
|
||||
"--very-verbose")
|
||||
)
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ number."
|
|||
"Number of idle seconds to wait before checking for new mail."
|
||||
:type 'number)
|
||||
|
||||
(defcustom mail-source-movemail-program "movemail"
|
||||
(defcustom mail-source-movemail-program movemail-program-name
|
||||
"If non-nil, name of program for fetching new mail."
|
||||
:version "26.2"
|
||||
:type '(choice (const nil) string))
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
(const 64))
|
||||
:version "24.3")
|
||||
|
||||
(defcustom hexl-program "hexl"
|
||||
(defcustom hexl-program hexl-program-name
|
||||
"The program that will hexlify and dehexlify its stdin.
|
||||
`hexl-program' will always be concatenated with `hexl-options'
|
||||
and \"-de\" when dehexlifying a buffer."
|
||||
|
|
|
|||
|
|
@ -308,13 +308,14 @@ done;")
|
|||
:tag "etags-cmd-alist"
|
||||
:type '(alist :key-type (string) :value-type (string)))
|
||||
|
||||
(defcustom hfy-etags-bin "etags"
|
||||
(defcustom hfy-etags-bin etags-program-name
|
||||
"Location of etags binary (we begin by assuming it's in your path).
|
||||
|
||||
Note that if etags is not in your path, you will need to alter the shell
|
||||
commands in `hfy-etags-cmd-alist'."
|
||||
:tag "etags-bin"
|
||||
:type '(file))
|
||||
:type '(file)
|
||||
:version "30.1")
|
||||
|
||||
(defcustom hfy-shell-file-name "/bin/sh"
|
||||
"Shell (Bourne or compatible) to invoke for complex shell operations."
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ Customized bindings may be defined in `ielm-map', which currently contains:
|
|||
;; Was cat, but on non-Unix platforms that might not exist, so
|
||||
;; use hexl instead, which is part of the Emacs distribution.
|
||||
(condition-case nil
|
||||
(start-process "ielm" (current-buffer) "hexl")
|
||||
(start-process "ielm" (current-buffer) hexl-program-name)
|
||||
(file-error (start-process "ielm" (current-buffer) "cat")))
|
||||
(set-process-query-on-exit-flag (ielm-process) nil)
|
||||
(goto-char (point-max))
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ Otherwise, look for `movemail' in the directories in
|
|||
;; assuming it would work.
|
||||
;; https://lists.gnu.org/r/bug-gnu-emacs/2008-02/msg00087.html
|
||||
(let ((progname (expand-file-name
|
||||
(concat "movemail"
|
||||
(concat movemail-program-name
|
||||
(if (memq system-type '(ms-dos windows-nt))
|
||||
".exe")) dir)))
|
||||
(when (and (not (file-directory-p progname))
|
||||
|
|
@ -1989,7 +1989,9 @@ Value is the size of the newly read mail after conversion."
|
|||
(buffer-disable-undo errors)
|
||||
(let ((args
|
||||
(append
|
||||
(list (or rmail-movemail-program "movemail") nil errors nil)
|
||||
(list (or rmail-movemail-program
|
||||
movemail-program-name)
|
||||
nil errors nil)
|
||||
(if rmail-preserve-inbox
|
||||
(list "-p")
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -156,7 +156,9 @@ Format is: /REGEXP/TAGNAME/FLAGS,TAGTYPE/
|
|||
See the ctags documentation for more information.")
|
||||
|
||||
(defcustom org-ctags-path-to-ctags
|
||||
(if (executable-find "ctags-exuberant") "ctags-exuberant" "ctags")
|
||||
(if (executable-find "ctags-exuberant")
|
||||
"ctags-exuberant"
|
||||
ctags-program-name)
|
||||
"Name of the ctags executable file."
|
||||
:version "24.1"
|
||||
:type 'file)
|
||||
|
|
|
|||
|
|
@ -6533,7 +6533,7 @@ in subdirectories too."
|
|||
;; of etags has been commented out in the menu since ... well,
|
||||
;; forever. So, let's just stick to ASCII here. -- haj, 2021-09-14
|
||||
(interactive)
|
||||
(let ((cmd "etags")
|
||||
(let ((cmd etags-program-name)
|
||||
(args `("-l" "none" "-r"
|
||||
;; 1=fullname 2=package? 3=name 4=proto? 5=attrs? (VERY APPROX!)
|
||||
,(concat
|
||||
|
|
|
|||
|
|
@ -3532,7 +3532,7 @@ to be at the beginning of a line in the etags buffer.
|
|||
|
||||
This variable is ignored if `speedbar-use-imenu-flag' is non-nil.")
|
||||
|
||||
(defcustom speedbar-fetch-etags-command "etags"
|
||||
(defcustom speedbar-fetch-etags-command etags-program-name
|
||||
"Command used to create an etags file.
|
||||
This variable is ignored if `speedbar-use-imenu-flag' is t."
|
||||
:group 'speedbar
|
||||
|
|
|
|||
|
|
@ -39,8 +39,10 @@ The TAGS file is also immediately visited with `visit-tags-table'."
|
|||
(reftex-access-scan-info current-prefix-arg)
|
||||
(let* ((master (reftex-TeX-master-file))
|
||||
(files (reftex-all-document-files))
|
||||
(cmd (format "etags %s" (mapconcat #'shell-quote-argument
|
||||
files " "))))
|
||||
(cmd (format "%s %s"
|
||||
etags-program-name
|
||||
(mapconcat #'shell-quote-argument
|
||||
files " "))))
|
||||
(with-current-buffer (reftex-get-file-buffer-force master)
|
||||
(message "Running etags to create TAGS file...")
|
||||
(shell-command cmd)
|
||||
|
|
|
|||
|
|
@ -2110,6 +2110,69 @@ use.
|
|||
See `setenv' and `getenv'. */);
|
||||
Vprocess_environment = Qnil;
|
||||
|
||||
DEFVAR_LISP ("ctags-program-name", Vctags_program_name,
|
||||
doc: /* Name of the `ctags' program distributed with Emacs.
|
||||
Use this instead of calling `ctags' directly, as `ctags' may have been
|
||||
renamed to comply with executable naming restrictions on the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vctags_program_name = build_pure_c_string ("ctags");
|
||||
#else
|
||||
Vctags_program_name = build_pure_c_string ("libctags.so");
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("etags-program-name", Vetags_program_name,
|
||||
doc: /* Name of the `etags' program distributed with Emacs.
|
||||
Use this instead of calling `etags' directly, as `etags' may have been
|
||||
renamed to comply with executable naming restrictions on the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vetags_program_name = build_pure_c_string ("etags");
|
||||
#else
|
||||
Vetags_program_name = build_pure_c_string ("libetags.so");
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("hexl-program-name", Vhexl_program_name,
|
||||
doc: /* Name of the `hexl' program distributed with Emacs.
|
||||
Use this instead of calling `hexl' directly, as `hexl' may have been
|
||||
renamed to comply with executable naming restrictions on the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vhexl_program_name = build_pure_c_string ("hexl");
|
||||
#else
|
||||
Vhexl_program_name = build_pure_c_string ("libhexl.so");
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("emacsclient-program-name", Vemacsclient_program_name,
|
||||
doc: /* Name of the `emacsclient' program distributed with Emacs.
|
||||
Use this instead of calling `emacsclient' directly, as `emacsclient'
|
||||
may have been renamed to comply with executable naming restrictions on
|
||||
the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vemacsclient_program_name = build_pure_c_string ("emacsclient");
|
||||
#else
|
||||
Vemacsclient_program_name = build_pure_c_string ("libemacsclient.so");
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("movemail-program-name", Vmovemail_program_name,
|
||||
doc: /* Name of the `movemail' program distributed with Emacs.
|
||||
Use this instead of calling `movemail' directly, as `movemail'
|
||||
may have been renamed to comply with executable naming restrictions on
|
||||
the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vmovemail_program_name = build_pure_c_string ("movemail");
|
||||
#else
|
||||
Vmovemail_program_name = build_pure_c_string ("libmovemail.so");
|
||||
#endif
|
||||
|
||||
DEFVAR_LISP ("ebrowse-program-name", Vebrowse_program_name,
|
||||
doc: /* Name of the `ebrowse' program distributed with Emacs.
|
||||
Use this instead of calling `ebrowse' directly, as `ebrowse'
|
||||
may have been renamed to comply with executable naming restrictions on
|
||||
the system. */);
|
||||
#if !defined HAVE_ANDROID || defined ANDROID_STUBIFY
|
||||
Vebrowse_program_name = build_pure_c_string ("ebrowse");
|
||||
#else
|
||||
Vebrowse_program_name = build_pure_c_string ("libebrowse.so");
|
||||
#endif
|
||||
|
||||
defsubr (&Scall_process);
|
||||
defsubr (&Sgetenv_internal);
|
||||
defsubr (&Scall_process_region);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue