diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 2eb34046c47..8db9388b6ed 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -31,7 +31,6 @@ Eli Zaretskii src/msdos.[ch] src/dosfns.[ch] src/w16select.c - src/unexcoff.c lisp/term/internal.el lisp/term/pc-win.el lisp/dos-fns.el @@ -262,7 +261,6 @@ Eli Zaretskii src/frame.c src/dired.c src/fileio.c - src/unexw32.c src/w32*.[ch] src/window.c src/indent.c diff --git a/admin/authors.el b/admin/authors.el index d38e8ff9a66..e02ce550ac3 100644 --- a/admin/authors.el +++ b/admin/authors.el @@ -377,7 +377,6 @@ If REALNAME is nil, ignore that author.") "nnmaildir\\.el" "nnil\\.el" "b2m\\.c" - "unexhp9k800\\.c" "emacsclient\\.1" "check-doc-strings") "List of regexps matching files for which the FSF doesn't need papers.") diff --git a/admin/find-gc.el b/admin/find-gc.el index 0084d7d1c54..d68a1e6c0bf 100644 --- a/admin/find-gc.el +++ b/admin/find-gc.el @@ -60,7 +60,7 @@ Each entry has the form (FUNCTION . FUNCTIONS-IT-CALLS).") "indent.c" "search.c" "regex-emacs.c" "undo.c" "alloc.c" "data.c" "doc.c" "editfns.c" "callint.c" "eval.c" "fns.c" "print.c" "lread.c" - "syntax.c" "unexcoff.c" + "syntax.c" "bytecode.c" "process.c" "callproc.c" "doprnt.c" "xterm.c" "xfns.c")) diff --git a/configure.ac b/configure.ac index ba39074c83a..9db1f07d7fc 100644 --- a/configure.ac +++ b/configure.ac @@ -444,28 +444,13 @@ this option's value should be 'yes' or 'no'.]) ;; ], [with_pdumper=auto]) -AC_ARG_WITH([unexec], - AS_HELP_STRING( - [--with-unexec=VALUE], - [enable unexec support unconditionally - ('yes', 'no', or 'auto': default 'auto')]), - [ case "${withval}" in - yes|no|auto) val=$withval ;; - *) AC_MSG_ERROR( - ['--with-unexec=$withval' is invalid; -this option's value should be 'yes' or 'no'.]) ;; - esac - with_unexec=$val - ], - [with_unexec=auto]) - AC_ARG_WITH([dumping],[AS_HELP_STRING([--with-dumping=VALUE], [kind of dumping to use for initial Emacs build -(VALUE one of: pdumper, unexec, none; default pdumper)])], +(VALUE one of: pdumper, none; default pdumper)])], [ case "${withval}" in - pdumper|unexec|none) val=$withval ;; + pdumper|none) val=$withval ;; *) AC_MSG_ERROR(['--with-dumping=$withval is invalid; -this option's value should be 'pdumper', 'unexec', or 'none'.]) +this option's value should be 'pdumper' or 'none'.]) ;; esac with_dumping=$val @@ -480,22 +465,10 @@ if test "$with_pdumper" = "auto"; then fi fi -if test "$with_unexec" = "auto"; then - if test "$with_dumping" = "unexec"; then - with_unexec=yes - else - with_unexec=no - fi -fi - if test "$with_dumping" = "pdumper" && test "$with_pdumper" = "no"; then AC_MSG_ERROR(['--with-dumping=pdumper' requires pdumper support]) fi -if test "$with_dumping" = "unexec" && test "$with_unexec" = "no"; then - AC_MSG_ERROR(['--with-dumping=unexec' requires unexec support]) -fi - if test "$with_pdumper" = "yes"; then AC_DEFINE([HAVE_PDUMPER], [1], [Define to build with portable dumper support]) @@ -2070,10 +2043,6 @@ AC_PATH_PROG([GZIP_PROG], [gzip]) test $with_compress_install != yes && test -n "$GZIP_PROG" && \ GZIP_PROG=" # $GZIP_PROG # (disabled by configure --without-compress-install)" -if test "$with_dumping" = "unexec" && test "$opsys" = "nacl"; then - AC_MSG_ERROR([nacl is not compatible with --with-dumping=unexec]) -fi - AC_CACHE_CHECK([for 'find' args to delete a file], [emacs_cv_find_delete], [if touch conftest.tmp && find conftest.tmp -delete 2>/dev/null && @@ -2088,48 +2057,6 @@ AC_SUBST([FIND_DELETE]) PAXCTL_dumped= PAXCTL_notdumped= -if test $with_unexec = yes && test $opsys = gnu-linux; then - if test "${SETFATTR+set}" != set; then - AC_CACHE_CHECK([for setfattr], - [emacs_cv_prog_setfattr], - [touch conftest.tmp - if (setfattr -n user.pax.flags conftest.tmp) >/dev/null 2>&1; then - emacs_cv_prog_setfattr=yes - else - emacs_cv_prog_setfattr=no - fi]) - if test "$emacs_cv_prog_setfattr" = yes; then - PAXCTL_notdumped='$(SETFATTR) -n user.pax.flags -v er' - SETFATTR=setfattr - else - SETFATTR= - fi - fi - case $opsys,$PAXCTL_notdumped,$emacs_uname_r in - gnu-linux,,* | netbsd,,[0-7].*) - AC_PATH_PROG([PAXCTL], [paxctl], [], - [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin]) - if test -n "$PAXCTL"; then - if test "$opsys" = netbsd; then - PAXCTL_dumped='$(PAXCTL) +a' - PAXCTL_notdumped=$PAXCTL_dumped - else - AC_MSG_CHECKING([whether binaries have a PT_PAX_FLAGS header]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [if $PAXCTL -v conftest$EXEEXT >/dev/null 2>&1; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PAXCTL= - fi]) - if test -n "$PAXCTL"; then - PAXCTL_dumped='$(PAXCTL) -zex' - PAXCTL_notdumped='$(PAXCTL) -r' - fi - fi - fi;; - esac -fi AC_SUBST([PAXCTL_dumped]) AC_SUBST([PAXCTL_notdumped]) AC_SUBST([SETFATTR]) @@ -2196,37 +2123,6 @@ else ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi -dnl On some platforms using GNU ld, linking temacs needs -znocombreloc. -dnl Although this has something to do with dumping, the details are unknown. -dnl If the flag is used but not needed, -dnl Emacs should still work (albeit a bit more slowly), -dnl so use the flag everywhere that it is supported. -dnl When testing whether the flag works, treat GCC specially -dnl since it just gives a non-fatal 'unrecognized option' -dnl if not built to support GNU ld. -if test "$GCC" = yes; then - LDFLAGS_NOCOMBRELOC="-Wl,-znocombreloc" -else - LDFLAGS_NOCOMBRELOC="-znocombreloc" -fi - -AC_CACHE_CHECK([for -znocombreloc], [emacs_cv_znocombreloc], - [if test $with_unexec = no; then - emacs_cv_znocombreloc='not needed' - else - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS $LDFLAGS_NOCOMBRELOC" - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], - [emacs_cv_znocombreloc=yes], [emacs_cv_znocombreloc=no]) - LDFLAGS=$save_LDFLAGS - fi]) - -case $emacs_cv_znocombreloc in - no*) - LDFLAGS_NOCOMBRELOC= ;; -esac - - AC_CACHE_CHECK([whether addresses are sanitized], [emacs_cv_sanitize_address], [AC_COMPILE_IFELSE( @@ -2242,48 +2138,8 @@ AC_CACHE_CHECK([whether addresses are sanitized], [emacs_cv_sanitize_address=yes], [emacs_cv_sanitize_address=no])]) -if test $with_unexec = yes; then - AC_DEFINE([HAVE_UNEXEC], [1], [Define if Emacs supports unexec.]) - if test "$emacs_cv_sanitize_address" = yes; then - AC_MSG_WARN([[Addresses are sanitized; suggest --without-unexec]]) - fi -fi - - -UNEXEC_OBJ= -test $with_unexec = yes && -case "$opsys" in - # MSDOS uses unexcoff.o - aix4-2) - UNEXEC_OBJ=unexaix.o - ;; - cygwin) - UNEXEC_OBJ=unexcw.o - ;; - darwin) - UNEXEC_OBJ=unexmacosx.o - ;; - hpux10-20 | hpux11) - UNEXEC_OBJ=unexhp9k800.o - ;; - mingw32) - UNEXEC_OBJ=unexw32.o - ;; - solaris) - # Use the Solaris dldump() function, called from unexsol.c, to dump - # emacs, instead of the generic ELF dump code found in unexelf.c. - # The resulting binary has a complete symbol table, and is better - # for debugging and other observability tools (debuggers, pstack, etc). - UNEXEC_OBJ=unexsol.o - ;; - *) - UNEXEC_OBJ=unexelf.o - ;; -esac -AC_SUBST([UNEXEC_OBJ]) - LD_SWITCH_SYSTEM= -test "$with_unexec" = no || case "$opsys" in +case "$opsys" in freebsd|dragonfly) ## Let 'ld' find image libs and similar things in /usr/local/lib. ## The system compiler, GCC, has apparently been modified to not @@ -2331,22 +2187,6 @@ esac C_SWITCH_MACHINE= -test $with_unexec = yes && -case $canonical in - alpha*) - ## With ELF, make sure that all common symbols get allocated to in the - ## data section. Otherwise, the dump of temacs may miss variables in - ## the shared library that have been initialized. For example, with - ## GNU libc, __malloc_initialized would normally be resolved to the - ## shared library's .bss section, which is fatal. - if test "x$GCC" = "xyes"; then - C_SWITCH_MACHINE="-fno-common" - else - AC_MSG_ERROR([Non-GCC compilers are not supported.]) - fi - ;; -esac - AC_CACHE_CHECK([for flags to work around GCC bug 58416], [emacs_cv_gcc_bug_58416_CFLAGS], [emacs_cv_gcc_bug_58416_CFLAGS='none needed' @@ -3158,7 +2998,6 @@ if test "${opsys}" = "mingw32"; then HAVE_W32=${emacs_cv_w32api} fi -FIRSTFILE_OBJ= NTDIR= LIBS_ECLIENT= LIB_WSOCK32= @@ -3206,7 +3045,6 @@ if test "${HAVE_W32}" = "yes"; then W32_RES_LINK="\$(EMACSRES)" CLIENTRES="emacsclient.res" CLIENTW="emacsclientw\$(EXEEXT)" - FIRSTFILE_OBJ=firstfile.o NTDIR=nt CM_OBJ= LIBS_ECLIENT="-lcomctl32" @@ -3228,7 +3066,6 @@ AC_SUBST([EMACS_MANIFEST]) AC_SUBST([CLIENTRES]) AC_SUBST([CLIENTW]) AC_SUBST([W32_RES_LINK]) -AC_SUBST([FIRSTFILE_OBJ]) AC_SUBST([NTDIR]) AC_SUBST([CM_OBJ]) AC_SUBST([LIBS_ECLIENT]) @@ -3366,36 +3203,18 @@ AC_CACHE_CHECK( [AC_LANG_PROGRAM( [[#include static void hook (void) {}]], - [[malloc_set_state (malloc_get_state ()); - __after_morecore_hook = hook; + [[__after_morecore_hook = hook; __malloc_initialize_hook = hook;]])], [emacs_cv_var_doug_lea_malloc=yes]) fi]) doug_lea_malloc=$emacs_cv_var_doug_lea_malloc -hybrid_malloc= system_malloc=yes dnl This must be before the test of $ac_cv_func_sbrk below. AC_CHECK_FUNCS_ONCE([sbrk]) -test $with_unexec = yes && -case "$opsys" in - ## darwin ld insists on the use of malloc routines in the System framework. - darwin | mingw32 | nacl | solaris) ;; - cygwin | qnxnto | freebsd) - hybrid_malloc=yes - system_malloc= ;; - *) test "$ac_cv_func_sbrk" = yes && system_malloc=$emacs_cv_sanitize_address;; -esac - -if test "${system_malloc}" != yes && test "${doug_lea_malloc}" != yes \ - && test "${UNEXEC_OBJ}" = unexelf.o; then - hybrid_malloc=yes -fi - GMALLOC_OBJ= -HYBRID_MALLOC= if test "${system_malloc}" = "yes"; then AC_DEFINE([SYSTEM_MALLOC], [1], [Define to 1 to use the system memory allocator, even if it is not @@ -3404,14 +3223,6 @@ if test "${system_malloc}" = "yes"; then GNU_MALLOC_reason=" (The GNU allocators don't work with this system configuration.)" VMLIMIT_OBJ= -elif test "$hybrid_malloc" = yes; then - AC_DEFINE([HYBRID_MALLOC], [1], - [Define to use gmalloc before dumping and the system malloc after.]) - HYBRID_MALLOC=1 - GNU_MALLOC=no - GNU_MALLOC_reason=" (only before dumping)" - GMALLOC_OBJ=gmalloc.o - VMLIMIT_OBJ= else test "$doug_lea_malloc" != "yes" && GMALLOC_OBJ=gmalloc.o VMLIMIT_OBJ=vm-limit.o @@ -3430,18 +3241,17 @@ else of the main data segment.]) fi fi -AC_SUBST([HYBRID_MALLOC]) AC_SUBST([GMALLOC_OBJ]) AC_SUBST([VMLIMIT_OBJ]) -if test "$doug_lea_malloc" = "yes" && test "$hybrid_malloc" != yes; then +if test "$doug_lea_malloc" = "yes"; then if test "$GNU_MALLOC" = yes ; then GNU_MALLOC_reason=" (Using Doug Lea's new malloc from the GNU C Library.)" fi AC_DEFINE([DOUG_LEA_MALLOC], [1], [Define to 1 if the system memory allocator is Doug Lea style, - with malloc hooks and malloc_set_state.]) + with malloc hooks.]) ## Use mmap directly for allocating larger buffers. ## FIXME this comes from src/s/{gnu,gnu-linux}.h: @@ -3496,8 +3306,7 @@ if test "$ac_cv_header_pthread_h" && test "$opsys" != "mingw32"; then status += pthread_create (&th, 0, 0, 0); status += pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask); status += pthread_kill (th, 0); - #if ! (defined SYSTEM_MALLOC || defined HYBRID_MALLOC \ - || defined DOUG_LEA_MALLOC) + #if ! (defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC) /* Test for pthread_atfork only if gmalloc uses it, as older-style hosts like MirBSD 10 lack it. */ status += pthread_atfork (noop, noop, noop); @@ -5284,15 +5093,9 @@ if test "${with_native_compilation}" = "default"; then # Check if libgccjit really works. AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken]) fi - if test "$with_unexec" = yes; then - with_native_compilation=no - fi fi if test "${with_native_compilation}" != "no"; then - if test "$with_unexec" = yes; then - AC_MSG_ERROR(['--with-native-compilation' is not compatible with unexec]) - fi if test "${HAVE_ZLIB}" = no; then AC_MSG_ERROR(['--with-native-compilation' requires zlib]) fi @@ -6106,19 +5909,6 @@ dnl No need to check for posix_memalign if aligned_alloc works. AC_CHECK_FUNCS([aligned_alloc posix_memalign], [break]) AC_CHECK_DECLS([aligned_alloc], [], [], [[#include ]]) -case $with_unexec,$canonical in - yes,alpha*) - AC_CHECK_DECL([__ELF__], [], - [AC_MSG_ERROR([Non-ELF systems are not supported on this platform.])]);; -esac - -if test "$with_unexec" = yes && test "$opsys" = "haiku"; then - dnl A serious attempt was actually made to port unexec to Haiku. - dnl Something in libstdc++ seems to prevent it from working. - AC_MSG_ERROR([Haiku is not supported by the legacy unexec dumper. -Please use the portable dumper instead.]) -fi - # Dump loading. Android lacks posix_madvise. AC_CHECK_FUNCS([posix_madvise madvise]) @@ -7434,21 +7224,10 @@ AC_SUBST([RALLOC_OBJ]) if test "$opsys" = "cygwin"; then CYGWIN_OBJ="cygw32.o" - ## Cygwin differs because of its unexec(). - PRE_ALLOC_OBJ= - POST_ALLOC_OBJ=lastfile.o -elif test "$opsys" = "mingw32"; then - CYGWIN_OBJ= - PRE_ALLOC_OBJ= - POST_ALLOC_OBJ=lastfile.o else CYGWIN_OBJ= - PRE_ALLOC_OBJ=lastfile.o - POST_ALLOC_OBJ= fi AC_SUBST([CYGWIN_OBJ]) -AC_SUBST([PRE_ALLOC_OBJ]) -AC_SUBST([POST_ALLOC_OBJ]) dnl Call this 'FORTIFY_SOUR' so that it sorts before the 'FORTIFY_SOURCE' dnl verbatim defined above. The tricky name is apropos, as this hack @@ -7564,9 +7343,6 @@ case "$opsys" in ## about 14 to about 34. Setting it high gets us plenty of slop and ## only costs about 1.5K of wasted binary space. headerpad_extra=1000 - if test "$with_unexec" = yes; then - LD_SWITCH_SYSTEM_TEMACS="-fno-pie $LD_SWITCH_SYSTEM_TEMACS -Xlinker -headerpad -Xlinker $headerpad_extra" - fi ## This is here because src/Makefile.in did some extra fiddling around ## with LD_SWITCH_SYSTEM. It seems cleaner to put this in @@ -7592,49 +7368,11 @@ case "$opsys" in x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x400000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; esac - ## If they want unexec, disable Windows ASLR for the Emacs binary - if test "$with_dumping" = "unexec"; then - case "$canonical" in - x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase -Wl,-disable-high-entropy-va -Wl,-default-image-base-low" ;; - *) LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS -Wl,-disable-dynamicbase" ;; - esac - fi ;; *) LD_SWITCH_SYSTEM_TEMACS= ;; esac -# -no-pie or -nopie fixes a temacs segfault on Gentoo, OpenBSD, -# Ubuntu, and other systems with "hardened" GCC configurations for -# some reason (Bug#18784). We don't know why this works, but not -# segfaulting is better than segfaulting. Use ac_c_werror_flag=yes -# when trying the option, otherwise clang keeps warning that it does -# not understand it, and pre-4.6 GCC has a similar problem -# (Bug#20338). Prefer -no-pie to -nopie, as -no-pie is the -# spelling used by GCC 6.1.0 and later (Bug#24682). -AC_CACHE_CHECK( - [for $CC option to disable position independent executables], - [emacs_cv_prog_cc_no_pie], - [if test $with_unexec = no; then - emacs_cv_prog_cc_no_pie='not needed' - else - emacs_save_c_werror_flag=$ac_c_werror_flag - emacs_save_LDFLAGS=$LDFLAGS - ac_c_werror_flag=yes - for emacs_cv_prog_cc_no_pie in -no-pie -nopie no; do - test $emacs_cv_prog_cc_no_pie = no && break - LDFLAGS="$emacs_save_LDFLAGS $emacs_cv_prog_cc_no_pie" - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [break]) - done - ac_c_werror_flag=$emacs_save_c_werror_flag - LDFLAGS=$emacs_save_LDFLAGS - fi]) -case $emacs_cv_prog_cc_no_pie in - -*) - LD_SWITCH_SYSTEM_TEMACS="$LD_SWITCH_SYSTEM_TEMACS $emacs_cv_prog_cc_no_pie" - ;; -esac - if test x$ac_enable_profiling != x ; then case $opsys in *freebsd | gnu-linux) ;; @@ -7748,7 +7486,7 @@ for opt in ACL BE_APP CAIRO DBUS FREETYPE GCONF GIF GLIB GMP GNUTLS GPM GSETTING case $opt in PDUMPER) val=${with_pdumper} ;; - UNEXEC) val=${with_unexec} ;; + UNEXEC) val=no ;; GLIB) val=${emacs_cv_links_glib} ;; NOTIFY|ACL) eval val=\${${opt}_SUMMARY} ;; TOOLKIT_SCROLL_BARS|X_TOOLKIT) eval val=\${USE_$opt} ;; @@ -7824,7 +7562,6 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D Does Emacs support Xwidgets? ${HAVE_XWIDGETS} Does Emacs have threading support in lisp? ${threads_enabled} Does Emacs support the portable dumper? ${with_pdumper} - Does Emacs support legacy unexec dumping? ${with_unexec} Which dumping strategy does Emacs use? ${with_dumping} Does Emacs have native lisp compiler? ${HAVE_NATIVE_COMP} Does Emacs use version 2 of the X Input Extension? ${HAVE_XINPUT2} diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi index 27be7ae7710..d92d82c896f 100644 --- a/doc/lispref/elisp.texi +++ b/doc/lispref/elisp.texi @@ -1657,7 +1657,6 @@ Tips and Conventions GNU Emacs Internals * Building Emacs:: How the dumped Emacs is made. -* Pure Storage:: Kludge to make preloaded Lisp functions shareable. * Garbage Collection:: Reclaiming space for Lisp objects no longer used. * Stack-allocated Objects:: Temporary conses and strings on C stack. * Memory Usage:: Info about total size of Lisp objects made so far. diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index 652439f12d8..dc55b63c5da 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -12,7 +12,6 @@ internal aspects of GNU Emacs that may be of interest to C programmers. @menu * Building Emacs:: How the dumped Emacs is made. -* Pure Storage:: Kludge to make preloaded Lisp functions shareable. * Garbage Collection:: Reclaiming space for Lisp objects no longer used. * Stack-allocated Objects:: Temporary conses and strings on C stack. * Memory Usage:: Info about total size of Lisp objects made so far. @@ -77,23 +76,6 @@ Like @samp{pdump}, but used while @dfn{bootstrapping} Emacs, when no previous Emacs binary and no @file{*.elc} byte-compiled Lisp files are available. The produced dump file is usually named @file{bootstrap-emacs.pdmp} in this case. - -@item dump -@cindex unexec -This method causes @command{temacs} to dump out an executable program, -called @file{emacs}, which has all the standard Lisp files already -preloaded into it. (The @samp{-batch} argument prevents -@command{temacs} from trying to initialize any of its data on the -terminal, so that the tables of terminal information are empty in the -dumped Emacs.) This method is also known as @dfn{unexec}, because it -produces a program file from a running process, and thus is in some -sense the opposite of executing a program to start a process. -Although this method was the way that Emacs traditionally saved its -state, it is now deprecated. - -@item bootstrap -Like @samp{dump}, but used when bootstrapping Emacs with the -@code{unexec} method. @end table @cindex preloaded Lisp files @@ -120,19 +102,9 @@ Emacs. @cindex @file{site-load.el} You can specify additional files to preload by writing a library named -@file{site-load.el} that loads them. You may need to rebuild Emacs -with an added definition - -@example -#define SITELOAD_PURESIZE_EXTRA @var{n} -@end example - -@noindent -to make @var{n} added bytes of pure space to hold the additional files; -see @file{src/puresize.h}. -(Try adding increments of 20000 until it is big enough.) However, the -advantage of preloading additional files decreases as machines get -faster. On modern machines, it is usually not advisable. +@file{site-load.el} that loads them. However, the advantage of +preloading additional files decreases as machines get faster. On modern +machines, it is usually not advisable. After @file{loadup.el} reads @file{site-load.el}, it finds the documentation strings for primitive and preloaded functions (and @@ -228,17 +200,6 @@ that problem, you can put functions on the Emacs. @end defun -@defun dump-emacs to-file from-file -@cindex unexec -This function dumps the current state of Emacs into an executable file -@var{to-file}, using the @code{unexec} method. It takes symbols from -@var{from-file} (this is normally the executable file @file{temacs}). - -This function cannot be used in an Emacs that was already dumped. -This function is deprecated, and by default Emacs is built without -@code{unexec} support so this function is not available. -@end defun - @defun pdumper-stats If the current Emacs session restored its state from a dump file, this function returns information about the dump file and the @@ -251,71 +212,6 @@ If the current session was not restored from a dump file, the value is @code{nil}. @end defun -@node Pure Storage -@section Pure Storage -@cindex pure storage - - Emacs Lisp uses two kinds of storage for user-created Lisp objects: -@dfn{normal storage} and @dfn{pure storage}. Normal storage is where -all the new data created during an Emacs session are kept -(@pxref{Garbage Collection}). Pure storage is used for certain data -in the preloaded standard Lisp files---data that should never change -during actual use of Emacs. - - Pure storage is allocated only while @command{temacs} is loading the -standard preloaded Lisp libraries. In the file @file{emacs}, it is -marked as read-only (on operating systems that permit this), so that -the memory space can be shared by all the Emacs jobs running on the -machine at once. Pure storage is not expandable; a fixed amount is -allocated when Emacs is compiled, and if that is not sufficient for -the preloaded libraries, @file{temacs} allocates dynamic memory for -the part that didn't fit. If Emacs will be dumped using the -@code{pdump} method (@pxref{Building Emacs}), the pure-space overflow -is of no special importance (it just means some of the preloaded stuff -cannot be shared with other Emacs jobs). However, if Emacs will be -dumped using the now obsolete @code{unexec} method, the resulting -image will work, but garbage collection (@pxref{Garbage Collection}) -is disabled in this situation, causing a memory leak. Such an -overflow normally won't happen unless you try to preload additional -libraries or add features to the standard ones. Emacs will display a -warning about the overflow when it starts, if it was dumped using -@code{unexec}. If this happens, you should increase the compilation -parameter @code{SYSTEM_PURESIZE_EXTRA} in the file -@file{src/puresize.h} and rebuild Emacs. - -@defun purecopy object -This function makes a copy in pure storage of @var{object}, and returns -it. It copies a string by simply making a new string with the same -characters, but without text properties, in pure storage. It -recursively copies the contents of vectors and cons cells. It does -not make copies of other objects such as symbols, but just returns -them unchanged. It signals an error if asked to copy markers. - -This function is a no-op except while Emacs is being built and dumped; -it is usually called only in preloaded Lisp files. -@end defun - -@defvar pure-bytes-used -The value of this variable is the number of bytes of pure storage -allocated so far. Typically, in a dumped Emacs, this number is very -close to the total amount of pure storage available---if it were not, -we would preallocate less. -@end defvar - -@defvar purify-flag -This variable determines whether @code{defun} should make a copy of the -function definition in pure storage. If it is non-@code{nil}, then the -function definition is copied into pure storage. - -This flag is @code{t} while loading all of the basic functions for -building Emacs initially (allowing those functions to be shareable and -non-collectible). Dumping Emacs as an executable always writes -@code{nil} in this variable, regardless of the value it actually has -before and after dumping. - -You should not change this flag in a running Emacs. -@end defvar - @node Garbage Collection @section Garbage Collection @@ -526,12 +422,6 @@ Total heap size, in @var{unit-size} units. @item free-size Heap space which is not currently used, in @var{unit-size} units. @end table - -If there was overflow in pure space (@pxref{Pure Storage}), and Emacs -was dumped using the (now obsolete) @code{unexec} method -(@pxref{Building Emacs}), then @code{garbage-collect} returns -@code{nil}, because a real garbage collection cannot be done in that -case. @end deffn @defopt garbage-collection-messages @@ -967,7 +857,6 @@ improves user experience. the variables are never written once Emacs is dumped. These variables with initializers are allocated in an area of memory that becomes read-only (on certain operating systems) as a result of dumping Emacs. -@xref{Pure Storage}. @cindex @code{defsubr}, Lisp symbol for a primitive Defining the C function is not enough to make a Lisp primitive diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index dc9666d4422..518abf0bb2e 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -3058,7 +3058,7 @@ By default, the global map binds @code{[tool-bar]} as follows: @example (keymap-global-set "" - `(menu-item ,(purecopy "tool bar") ignore + '(menu-item "tool bar" ignore :filter tool-bar-make-keymap)) @end example diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 9b92093f629..3da4d78f8b3 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -590,10 +590,10 @@ displays the startup messages. The value of this variable is @code{t} once the command line has been processed. -If you redump Emacs by calling @code{dump-emacs} (@pxref{Building -Emacs}), you may wish to set this variable to @code{nil} first in -order to cause the new dumped Emacs to process its new command-line -arguments. +If you redump Emacs by calling @code{dump-emacs-portable} +(@pxref{Building Emacs}), you may wish to set this variable to +@code{nil} first in order to cause the new dumped Emacs to process its +new command-line arguments. @end defvar @defvar command-switch-alist diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile index 11a6ce813af..d1875b464c6 100644 --- a/doc/lispref/spellfile +++ b/doc/lispref/spellfile @@ -418,7 +418,6 @@ ps psf psychotherapy pty -purecopy qu quux rassq diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index c334b5d5dfb..37fb3b49e43 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -606,8 +606,7 @@ If the value is non-@code{nil}, the named function is considered to be pure (@pxref{What Is a Function}). Calls with constant arguments can be evaluated at compile time. This may shift run time errors to compile time. This property is normally added to a function with -@code{declare} (@pxref{Declare Form}). Not to be confused with pure -storage (@pxref{Pure Storage}). +@code{declare} (@pxref{Declare Form}). @item risky-local-variable If the value is non-@code{nil}, the named variable is considered risky diff --git a/etc/NEWS b/etc/NEWS index 2b1951c7b0b..5b9e356737e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -24,6 +24,11 @@ applies, and please also update docstrings as needed. * Installation Changes in Emacs 31.1 ++++ +** Unexec dumper removed. +The traditional unexec dumper, deprecated since Emacs 27, has been +removed. + ** Changed GCC default options on 32-bit x86 systems. When using GCC 4 or later to build Emacs on 32-bit x86 systems, 'configure' now defaults to using the GCC options '-mfpmath=sse' (if the @@ -1062,6 +1067,9 @@ Optional arguments are provided to produce human-readable time-duration strings in a variety of formats, for example "6 months 3 weeks" or "5m 52.5s". ++++ +** The function 'purecopy' is now an obsolete alias for 'identity'. + ** New function 'native-compile-directory'. This function natively-compiles all Lisp files in a directory and in its sub-directories, recursively, which were not already natively-compiled. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 4496b9c7968..ee72a04f493 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2952,20 +2952,6 @@ This was observed for Emacs 28.1 on Solaris 10 32-bit sparc, with Oracle Developer Studio 12.6 (Sun C 5.15). The failure was intermittent, and running GNU Make a second time would typically finish the build. -*** On Solaris 10, Emacs crashes during the build process. -(This applies only with './configure --with-unexec=yes', which is rare.) -This was reported for Emacs 25.2 on i386-pc-solaris2.10 with Sun -Studio 12 (Sun C 5.9) and with Oracle Developer Studio 12.6 (Sun C -5.15), and intermittently for sparc-sun-solaris2.10 with Oracle -Developer Studio 12.5 (Sun C 5.14). Disabling compiler optimization -seems to fix the bug, as does upgrading the Solaris 10 operating -system to Update 11. The cause of the bug is unknown: it may be that -Emacs's archaic memory-allocation scheme is not compatible with -slightly-older versions of Solaris and/or Oracle Studio, or it may be -something else. Since the cause is not known, possibly the bug is -still present in newer versions of Emacs, Oracle Studio, and/or -Solaris. See Bug#26638. - *** On Solaris, C-x doesn't get through to Emacs when you use the console. This is a Solaris feature (at least on Intel x86 cpus). Type C-r @@ -4096,96 +4082,6 @@ minimum supported Windows version is 8.1, and the computer hardware (CPU, memory, disk) should also match the minimum Windows 8.1 requirements. -*** Segfault during 'make' - -If Emacs segfaults when 'make' executes one of these commands: - - LC_ALL=C ./temacs -batch -l loadup bootstrap - LC_ALL=C ./temacs -batch -l loadup dump - -the problem may be due to inadequate workarounds for address space -layout randomization (ASLR), an operating system feature that -randomizes the virtual address space of a process. ASLR is commonly -enabled in Linux and NetBSD kernels, and is intended to deter exploits -of pointer-related bugs in applications. If ASLR is enabled, the -command: - - cat /proc/sys/kernel/randomize_va_space # GNU/Linux - sysctl security.pax.aslr.global # NetBSD - -outputs a nonzero value. - -These segfaults should not occur on most modern systems, because the -Emacs build procedure uses the command 'setfattr' or 'paxctl' to mark -the Emacs executable as requiring non-randomized address space, and -Emacs uses the 'personality' system call to disable address space -randomization when dumping. However, older kernels may not support -'setfattr', 'paxctl', or 'personality', and newer Linux kernels have a -secure computing mode (seccomp) that can be configured to disable the -'personality' call. - -It may be possible to work around the 'personality' problem in a newer -Linux kernel by configuring seccomp to allow the 'personality' call. -For example, if you are building Emacs under Docker, you can run the -Docker container with a security profile that allows 'personality' by -using Docker's --security-opt option with an appropriate profile; see -. - -To work around the ASLR problem in either an older or a newer kernel, -you can temporarily disable the feature while building Emacs. On -GNU/Linux you can do so using the following command (as root). - - echo 0 > /proc/sys/kernel/randomize_va_space - -You can re-enable the feature when you are done, by echoing the -original value back to the file. NetBSD uses a different command, -e.g., 'sysctl -w security.pax.aslr.global=0'. - -Alternatively, you can try using the 'setarch' command when building -temacs like this, where -R disables address space randomization: - - setarch $(uname -m) -R make - -ASLR is not the only problem that can break Emacs dumping. Another -issue is that in Red Hat Linux kernels, Exec-shield is enabled by -default, and this creates a different memory layout. Emacs should -handle this at build time, but if this fails the following -instructions may be useful. Exec-shield is enabled on your system if - - cat /proc/sys/kernel/exec-shield - -prints a nonzero value. You can temporarily disable it as follows: - - echo 0 > /proc/sys/kernel/exec-shield - -As with randomize_va_space, you can re-enable Exec-shield when you are -done, by echoing the original value back to the file. - -*** temacs prints "Pure Lisp storage exhausted". - -This means that the Lisp code loaded from the .elc and .el files during -'temacs --batch --load loadup dump' took up more space than was allocated. - -This could be caused by - 1) adding code to the preloaded Lisp files - 2) adding more preloaded files in loadup.el - 3) having a site-init.el or site-load.el which loads files. - Note that ANY site-init.el or site-load.el is nonstandard; - if you have received Emacs from some other site and it contains a - site-init.el or site-load.el file, consider deleting that file. - 4) getting the wrong .el or .elc files - (not from the directory you expected). - 5) deleting some .elc files that are supposed to exist. - This would cause the source files (.el files) to be - loaded instead. They take up more room, so you lose. - 6) a bug in the Emacs distribution which underestimates the space required. - -If the need for more space is legitimate, change the definition -of PURESIZE in puresize.h. - -But in some of the cases listed above, this problem is a consequence -of something else that is wrong. Be sure to check and fix the real problem. - *** openSUSE 10.3: Segfault in bcopy during dumping. This is due to a bug in the bcopy implementation in openSUSE 10.3. @@ -4205,13 +4101,6 @@ binary null characters, and the 'file' utility says: We don't know what exactly causes this failure. A work-around is to build Emacs in a directory on a local disk. -*** The dumped Emacs crashes when run, trying to write pure data. - -On a system where getpagesize is not a system call, it is defined -as a macro. If the definition (in both unex*.c and malloc.c) is wrong, -it can cause problems like this. You might be able to find the correct -value in the man page for a.out(5). - * Problems on legacy systems This section covers bugs reported on very old hardware or software. @@ -4340,17 +4229,6 @@ should do. pen@lysator.liu.se says (Feb 1998) that the Compose key does work if you link with the MIT X11 libraries instead of the Solaris X11 libraries. -** OpenBSD - -*** OpenBSD 4.0 macppc: Segfault during dumping. - -The build aborts with signal 11 when the command './temacs --batch ---load loadup bootstrap' tries to load files.el. A workaround seems -to be to reduce the level of compiler optimization used during the -build (from -O2 to -O1). It is possible this is an OpenBSD -GCC problem specific to the macppc architecture, possibly only -occurring with older versions of GCC (e.g. 3.3.5). - ** AIX *** AIX 4.3.x or 4.4: Compiling fails. diff --git a/lib/Makefile.in b/lib/Makefile.in index 0f38dadb187..2ebf8b89d13 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -94,9 +94,8 @@ not_emacs_OBJECTS = regex.o malloc/%.o free.o libgnu_a_OBJECTS = fingerprint.o $(gl_LIBOBJS) \ $(patsubst %.c,%.o,$(filter %.c,$(libgnu_a_SOURCES))) for_emacs_OBJECTS = $(filter-out $(not_emacs_OBJECTS),$(libgnu_a_OBJECTS)) -libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(for_emacs_OBJECTS)) -$(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES) +$(libgnu_a_OBJECTS): $(BUILT_SOURCES) .SUFFIXES: .c .c.o: @@ -104,18 +103,13 @@ $(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES) e-%.o: %.c $(AM_V_CC)$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) -Demacs -o $@ $< -all: libgnu.a $(if $(HYBRID_MALLOC),libegnu.a) +all: libgnu.a libgnu.a: $(libgnu_a_OBJECTS) $(AM_V_AR)rm -f $@ $(AM_V_at)$(AR) $(ARFLAGS) $@ $(libgnu_a_OBJECTS) $(AM_V_at)$(RANLIB) $@ -libegnu.a: $(libegnu_a_OBJECTS) - $(AM_V_AR)rm -f $@ - $(AM_V_at)$(AR) $(ARFLAGS) $@ $(libegnu_a_OBJECTS) - $(AM_V_at)$(RANLIB) $@ - ETAGS = ../lib-src/etags$(EXEEXT) $(ETAGS): $(MAKE) -C $(dir $@) $(notdir $@) diff --git a/lisp/auth-source.el b/lisp/auth-source.el index d22747493b2..e188b0b6f7b 100644 --- a/lisp/auth-source.el +++ b/lisp/auth-source.el @@ -2515,8 +2515,6 @@ Adapt also mode line." (read-passwd--hide-password))))) (defvar read-passwd-map - ;; BEWARE: `defconst' would purecopy it, breaking the sharing with - ;; minibuffer-local-map along the way! (let ((map (make-sparse-keymap))) (set-keymap-parent map minibuffer-local-map) (define-key map "\C-u" #'delete-minibuffer-contents) ;bug#12570 diff --git a/lisp/bindings.el b/lisp/bindings.el index 9987f28c027..f829c1bea26 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -67,7 +67,7 @@ corresponding to the mode line clicked." (interactive "e") (with-selected-window (posn-window (event-start e)) (describe-current-input-method)))) - (purecopy map))) + map)) (defvar mode-line-coding-system-map (let ((map (make-sparse-keymap))) @@ -83,7 +83,7 @@ corresponding to the mode line clicked." (interactive "e") (with-selected-window (posn-window (event-start e)) (call-interactively 'set-buffer-file-coding-system)))) - (purecopy map)) + map) "Local keymap for the coding-system part of the mode line.") (defun mode-line-change-eol (event) @@ -203,11 +203,11 @@ mouse-3: Set coding system" (current-input-method (:propertize ("" current-input-method-title) help-echo (concat - ,(purecopy "Current input method: ") + "Current input method: " current-input-method - ,(purecopy "\n\ + "\n\ mouse-2: Disable input method\n\ -mouse-3: Describe current input method")) +mouse-3: Describe current input method") local-map ,mode-line-input-method-map mouse-face mode-line-highlight)) ,(propertize @@ -228,7 +228,7 @@ mnemonics of the following coding systems: (defvar mode-line-client `(:eval (if (frame-parameter nil 'client) - ,(propertize "@" 'help-echo (purecopy "emacsclient frame")))) + ,(propertize "@" 'help-echo "emacsclient frame"))) "Mode line construct for identifying emacsclient frames.") ;; Autoload if this file no longer dumped. ;;;###autoload @@ -250,15 +250,15 @@ mnemonics of the following coding systems: (list (propertize "%1*" 'help-echo 'mode-line-read-only-help-echo - 'local-map (purecopy (make-mode-line-mouse-map - 'mouse-1 - #'mode-line-toggle-read-only)) + 'local-map (make-mode-line-mouse-map + 'mouse-1 + #'mode-line-toggle-read-only) 'mouse-face 'mode-line-highlight) (propertize "%1+" 'help-echo 'mode-line-modified-help-echo - 'local-map (purecopy (make-mode-line-mouse-map - 'mouse-1 #'mode-line-toggle-modified)) + 'local-map (make-mode-line-mouse-map + 'mouse-1 #'mode-line-toggle-modified) 'mouse-face 'mode-line-highlight)) "Mode line construct for displaying whether current buffer is modified.") ;;;###autoload @@ -268,16 +268,16 @@ mnemonics of the following coding systems: (list (propertize "%1@" 'mouse-face 'mode-line-highlight - 'help-echo (purecopy (lambda (window _object _point) - (format "%s" - (with-selected-window window - (if (stringp default-directory) - (concat - (if (file-remote-p default-directory) - "Current directory is remote: " - "Current directory is local: ") - default-directory) - "Current directory is nil"))))))) + 'help-echo (lambda (window _object _point) + (format "%s" + (with-selected-window window + (if (stringp default-directory) + (concat + (if (file-remote-p default-directory) + "Current directory is remote: " + "Current directory is local: ") + default-directory) + "Current directory is nil")))))) "Mode line construct to indicate a remote buffer.") ;;;###autoload (put 'mode-line-remote 'risky-local-variable t) @@ -301,8 +301,8 @@ Value is used for `mode-line-frame-identification', which see." (defvar mode-line-window-dedicated-keymap (let ((map (make-sparse-keymap))) (define-key map [mode-line mouse-1] #'toggle-window-dedicated) - (purecopy map)) "\ -Keymap for what is displayed by `mode-line-window-dedicated'.") + map) + "Keymap for what is displayed by `mode-line-window-dedicated'.") (defun mode-line-window-control () "Compute mode line construct for window dedicated state. @@ -400,29 +400,6 @@ the symbol `mode-line-format-right-align' is processed by ;;;###autoload (put 'mode-line-format-right-align 'risky-local-variable t) -(defun bindings--define-key (map key item) - "Define KEY in keymap MAP according to ITEM from a menu. -This is like `define-key', but it takes the definition from the -specified menu item, and makes pure copies of as much as possible -of the menu's data." - (declare (indent 2)) - (define-key map key - (cond - ((not (consp item)) item) ;Not sure that could be other than a symbol. - ;; Keymaps can't be made pure otherwise users can't remove/add elements - ;; from/to them any more. - ((keymapp item) item) - ((stringp (car item)) - (if (keymapp (cdr item)) - (cons (purecopy (car item)) (cdr item)) - (purecopy item))) - ((eq 'menu-item (car item)) - (if (keymapp (nth 2 item)) - `(menu-item ,(purecopy (nth 1 item)) ,(nth 2 item) - ,@(purecopy (nthcdr 3 item))) - (purecopy item))) - (t (message "non-menu-item: %S" item) item)))) - (defvar mode-line-mode-menu (make-sparse-keymap "Minor Modes") "\ Menu of mode operations in the mode line.") @@ -454,11 +431,11 @@ a menu, so this function is not useful for non-menu keymaps." (defvar mode-line-major-mode-keymap (let ((map (make-sparse-keymap))) - (bindings--define-key map [mode-line down-mouse-1] + (define-key map [mode-line down-mouse-1] `(menu-item "Menu Bar" ignore :filter ,(lambda (_) (mouse-menu-major-mode-map)))) (define-key map [mode-line mouse-2] 'describe-mode) - (bindings--define-key map [mode-line down-mouse-3] + (define-key map [mode-line down-mouse-3] `(menu-item "Minor Modes" ,mode-line-mode-menu :filter bindings--sort-menu-keymap)) map) "\ @@ -509,15 +486,15 @@ mouse-3: Toggle minor modes" (defvar mode-line-column-line-number-mode-map (let ((map (make-sparse-keymap)) (menu-map (make-sparse-keymap "Toggle Line and Column Number Display"))) - (bindings--define-key menu-map [size-indication-mode] + (define-key menu-map [size-indication-mode] '(menu-item "Display Size Indication" size-indication-mode :help "Toggle displaying a size indication in the mode-line" :button (:toggle . size-indication-mode))) - (bindings--define-key menu-map [line-number-mode] + (define-key menu-map [line-number-mode] '(menu-item "Display Line Numbers" line-number-mode :help "Toggle displaying line numbers in the mode-line" :button (:toggle . line-number-mode))) - (bindings--define-key menu-map [column-number-mode] + (define-key menu-map [column-number-mode] '(menu-item "Display Column Numbers" column-number-mode :help "Toggle displaying column numbers in the mode-line" :button (:toggle . column-number-mode))) @@ -671,8 +648,8 @@ text properties for face, help-echo, and local-map to it." (list (propertize fmt 'face 'mode-line-buffer-id 'help-echo - (purecopy "Buffer name -mouse-1: Previous buffer\nmouse-3: Next buffer") + "Buffer name +mouse-1: Previous buffer\nmouse-3: Next buffer" 'mouse-face 'mode-line-highlight 'local-map mode-line-buffer-identification-keymap))) @@ -774,54 +751,54 @@ meaningful if it refers to a lexically bound variable." ;; Use mode-line-mode-menu for local minor-modes only. ;; Global ones can go on the menubar (Options --> Show/Hide). -(bindings--define-key mode-line-mode-menu [overwrite-mode] +(define-key mode-line-mode-menu [overwrite-mode] '(menu-item "Overwrite (Ovwrt)" overwrite-mode :help "Overwrite mode: typed characters replace existing text" :button (:toggle . overwrite-mode))) -(bindings--define-key mode-line-mode-menu [outline-minor-mode] +(define-key mode-line-mode-menu [outline-minor-mode] '(menu-item "Outline (Outl)" outline-minor-mode ;; XXX: This needs a good, brief description. :help "" :button (:toggle . (bound-and-true-p outline-minor-mode)))) -(bindings--define-key mode-line-mode-menu [highlight-changes-mode] +(define-key mode-line-mode-menu [highlight-changes-mode] '(menu-item "Highlight changes (Chg)" highlight-changes-mode :help "Show changes in the buffer in a distinctive color" :button (:toggle . (bound-and-true-p highlight-changes-mode)))) -(bindings--define-key mode-line-mode-menu [hide-ifdef-mode] +(define-key mode-line-mode-menu [hide-ifdef-mode] '(menu-item "Hide ifdef (Ifdef)" hide-ifdef-mode :help "Show/Hide code within #ifdef constructs" :button (:toggle . (bound-and-true-p hide-ifdef-mode)))) -(bindings--define-key mode-line-mode-menu [glasses-mode] +(define-key mode-line-mode-menu [glasses-mode] '(menu-item "Glasses (o^o)" glasses-mode :help "Insert virtual separators to make long identifiers easy to read" :button (:toggle . (bound-and-true-p glasses-mode)))) -(bindings--define-key mode-line-mode-menu [font-lock-mode] +(define-key mode-line-mode-menu [font-lock-mode] '(menu-item "Font Lock" font-lock-mode :help "Syntax coloring" :button (:toggle . font-lock-mode))) -(bindings--define-key mode-line-mode-menu [flyspell-mode] +(define-key mode-line-mode-menu [flyspell-mode] '(menu-item "Flyspell (Fly)" flyspell-mode :help "Spell checking on the fly" :button (:toggle . (bound-and-true-p flyspell-mode)))) -(bindings--define-key mode-line-mode-menu [completion-preview-mode] +(define-key mode-line-mode-menu [completion-preview-mode] '(menu-item "Completion Preview (CP)" completion-preview-mode :help "Show preview of completion suggestions as you type" :enable completion-at-point-functions :button (:toggle . (bound-and-true-p completion-preview-mode)))) -(bindings--define-key mode-line-mode-menu [auto-revert-tail-mode] +(define-key mode-line-mode-menu [auto-revert-tail-mode] '(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode :help "Revert the tail of the buffer when the file on disk grows" :enable (buffer-file-name) :button (:toggle . (bound-and-true-p auto-revert-tail-mode)))) -(bindings--define-key mode-line-mode-menu [auto-revert-mode] +(define-key mode-line-mode-menu [auto-revert-mode] '(menu-item "Auto revert (ARev)" auto-revert-mode :help "Revert the buffer when the file on disk changes" :button (:toggle . (bound-and-true-p auto-revert-mode)))) -(bindings--define-key mode-line-mode-menu [auto-fill-mode] +(define-key mode-line-mode-menu [auto-fill-mode] '(menu-item "Auto fill (Fill)" auto-fill-mode :help "Automatically insert new lines" :button (:toggle . auto-fill-function))) -(bindings--define-key mode-line-mode-menu [abbrev-mode] +(define-key mode-line-mode-menu [abbrev-mode] '(menu-item "Abbrev (Abbrev)" abbrev-mode :help "Automatically expand abbreviations" :button (:toggle . abbrev-mode))) @@ -846,8 +823,7 @@ Actually, STRING need not be a string; any mode-line construct is okay. See `mode-line-format'.") ;;;###autoload (put 'minor-mode-alist 'risky-local-variable t) -;; Don't use purecopy here--some people want to change these strings, -;; also string properties are lost when put into pure space. + (setq minor-mode-alist '((abbrev-mode " Abbrev") (overwrite-mode overwrite-mode) @@ -865,14 +841,11 @@ okay. See `mode-line-format'.") (setq completion-ignored-extensions (append (cond ((memq system-type '(ms-dos windows-nt)) - (mapcar 'purecopy - '(".o" "~" ".bin" ".bak" ".obj" ".map" ".ico" ".pif" ".lnk" - ".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386"))) + '(".o" "~" ".bin" ".bak" ".obj" ".map" ".ico" ".pif" ".lnk" + ".a" ".ln" ".blg" ".bbl" ".dll" ".drv" ".vxd" ".386")) (t - (mapcar 'purecopy - '(".o" "~" ".bin" ".lbin" ".so" - ".a" ".ln" ".blg" ".bbl")))) - (mapcar 'purecopy + '(".o" "~" ".bin" ".lbin" ".so" + ".a" ".ln" ".blg" ".bbl"))) '(".elc" ".lof" ".glo" ".idx" ".lot" ;; VCS metadata directories @@ -902,7 +875,7 @@ okay. See `mode-line-format'.") ".cp" ".fn" ".ky" ".pg" ".tp" ".vr" ".cps" ".fns" ".kys" ".pgs" ".tps" ".vrs" ;; Python byte-compiled - ".pyc" ".pyo")))) + ".pyc" ".pyo"))) ;; Suffixes used for executables. (setq exec-suffixes @@ -1648,6 +1621,8 @@ if `inhibit-field-text-motion' is non-nil." ;; Text conversion (define-key global-map [text-conversion] 'analyze-text-conversion) +(define-obsolete-function-alias 'bindings--define-key #'define-key "31.1") + ;; Don't look for autoload cookies in this file. ;; Local Variables: ;; no-update-autoloads: t diff --git a/lisp/bookmark.el b/lisp/bookmark.el index 298e27381e0..d68e9308208 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -2560,37 +2560,37 @@ strings returned are not." ;;;###autoload (defvar menu-bar-bookmark-map (let ((map (make-sparse-keymap "Bookmark functions"))) - (bindings--define-key map [load] + (define-key map [load] '(menu-item "Load a Bookmark File..." bookmark-load :help "Load bookmarks from a bookmark file)")) - (bindings--define-key map [write] + (define-key map [write] '(menu-item "Save Bookmarks As..." bookmark-write :help "Write bookmarks to a file (reading the file name with the minibuffer)")) - (bindings--define-key map [save] + (define-key map [save] '(menu-item "Save Bookmarks" bookmark-save :help "Save currently defined bookmarks")) - (bindings--define-key map [edit] + (define-key map [edit] '(menu-item "Edit Bookmark List" bookmark-bmenu-list :help "Display a list of existing bookmarks")) - (bindings--define-key map [delete] + (define-key map [delete] '(menu-item "Delete Bookmark..." bookmark-delete :help "Delete a bookmark from the bookmark list")) - (bindings--define-key map [delete-all] + (define-key map [delete-all] '(menu-item "Delete all Bookmarks..." bookmark-delete-all :help "Delete all bookmarks from the bookmark list")) - (bindings--define-key map [rename] + (define-key map [rename] '(menu-item "Rename Bookmark..." bookmark-rename :help "Change the name of a bookmark")) - (bindings--define-key map [locate] + (define-key map [locate] '(menu-item "Insert Location..." bookmark-locate :help "Insert the name of the file associated with a bookmark")) - (bindings--define-key map [insert] + (define-key map [insert] '(menu-item "Insert Contents..." bookmark-insert :help "Insert the text of the file pointed to by a bookmark")) - (bindings--define-key map [set] + (define-key map [set] '(menu-item "Set Bookmark..." bookmark-set :help "Set a bookmark named inside a file.")) - (bindings--define-key map [jump] + (define-key map [jump] '(menu-item "Jump to Bookmark..." bookmark-jump :help "Jump to a bookmark (a point in some file)")) map)) diff --git a/lisp/button.el b/lisp/button.el index 5798c7dfe49..674de1bb4fa 100644 --- a/lisp/button.el +++ b/lisp/button.el @@ -97,7 +97,7 @@ Disabling the mode will remove all buttons in the current buffer." (put 'default-button 'type 'button) ;; `action' may be either a function to call, or a marker to go to. (put 'default-button 'action #'ignore) -(put 'default-button 'help-echo (purecopy "mouse-2, RET: Push this button")) +(put 'default-button 'help-echo "mouse-2, RET: Push this button") ;; Make overlay buttons go away if their underlying text is deleted. (put 'default-button 'evaporate t) ;; Prevent insertions adjacent to text-property buttons from diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 46053dddbf2..b40c56abd86 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -44,7 +44,6 @@ ;;;###autoload (defcustom holiday-general-holidays - (mapcar 'purecopy '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Groundhog Day") @@ -61,7 +60,7 @@ (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") - (holiday-float 11 4 4 "Thanksgiving"))) + (holiday-float 11 4 4 "Thanksgiving")) "General holidays. Default value is for the United States. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -70,7 +69,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-oriental-holidays - (mapcar 'purecopy '((holiday-chinese-new-year) (if calendar-chinese-all-holidays-flag (append @@ -81,7 +79,7 @@ See the documentation for `calendar-holidays' for details." (holiday-chinese 8 15 "Mid-Autumn Festival") (holiday-chinese 9 9 "Double Ninth Festival") (holiday-chinese-winter-solstice) - )))) + ))) "Oriental holidays. See the documentation for `calendar-holidays' for details." :version "23.1" ; added more holidays @@ -107,14 +105,13 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-hebrew-holidays - (mapcar 'purecopy '((holiday-hebrew-passover) (holiday-hebrew-rosh-hashanah) (holiday-hebrew-hanukkah) (if calendar-hebrew-all-holidays-flag (append (holiday-hebrew-tisha-b-av) - (holiday-hebrew-misc))))) + (holiday-hebrew-misc)))) "Jewish holidays. See the documentation for `calendar-holidays' for details." :type 'sexp @@ -125,7 +122,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-christian-holidays - (mapcar 'purecopy '((holiday-easter-etc) ; respects calendar-christian-all-holidays-flag (holiday-fixed 12 25 "Christmas") (if calendar-christian-all-holidays-flag @@ -134,7 +130,7 @@ See the documentation for `calendar-holidays' for details." (holiday-julian 12 25 "Christmas (Julian calendar)") (holiday-greek-orthodox-easter) (holiday-fixed 8 15 "Assumption") - (holiday-advent 0 "Advent"))))) + (holiday-advent 0 "Advent")))) "Christian holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -143,7 +139,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-islamic-holidays - (mapcar 'purecopy '((holiday-islamic-new-year) (holiday-islamic 9 1 "Ramadan Begins") (if calendar-islamic-all-holidays-flag @@ -154,7 +149,7 @@ See the documentation for `calendar-holidays' for details." (holiday-islamic 8 15 "Shab-e-Bara't") (holiday-islamic 9 27 "Shab-e Qadr") (holiday-islamic 10 1 "Id-al-Fitr") - (holiday-islamic 12 10 "Id-al-Adha"))))) + (holiday-islamic 12 10 "Id-al-Adha")))) "Islamic holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -163,7 +158,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-bahai-holidays - (mapcar 'purecopy '((holiday-bahai-new-year) (holiday-bahai-ridvan) ; respects calendar-bahai-all-holidays-flag (holiday-fixed 5 23 "Declaration of the Báb") @@ -174,7 +168,7 @@ See the documentation for `calendar-holidays' for details." (if calendar-bahai-all-holidays-flag (append (holiday-fixed 11 26 "Day of the Covenant") - (holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá"))))) + (holiday-fixed 11 28 "Ascension of `Abdu’l-Bahá")))) "Bahá’í holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) @@ -183,7 +177,6 @@ See the documentation for `calendar-holidays' for details." ;;;###autoload (defcustom holiday-solar-holidays - (mapcar 'purecopy '((solar-equinoxes-solstices) (holiday-sexp calendar-daylight-savings-starts (format "Daylight Saving Time Begins %s" @@ -194,7 +187,7 @@ See the documentation for `calendar-holidays' for details." (format "Daylight Saving Time Ends %s" (solar-time-string (/ calendar-daylight-savings-ends-time (float 60)) - calendar-daylight-time-zone-name))))) + calendar-daylight-time-zone-name)))) "Sun-related holidays. See the documentation for `calendar-holidays' for details." :type 'sexp) diff --git a/lisp/comint.el b/lisp/comint.el index 2c6845fc5c6..5d6d02207ad 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -3253,7 +3253,7 @@ Note that this applies to `comint-dynamic-complete-filename' only." :group 'comint-completion) ;;;###autoload -(defvar comint-file-name-prefix (purecopy "") +(defvar comint-file-name-prefix "" "Prefix prepended to absolute file names taken from process input. This is used by Comint's and shell's completion functions, and by shell's directory tracking functions.") diff --git a/lisp/composite.el b/lisp/composite.el index b09c46cfb86..89136ba5f39 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -755,7 +755,7 @@ All non-spacing characters have this function in ;; Allow for bootstrapping without uni-*.el. (when unicode-category-table - (let ((elt `([,(purecopy "\\c.\\c^+") 1 compose-gstring-for-graphic] + (let ((elt `(["\\c.\\c^+" 1 compose-gstring-for-graphic] [nil 0 compose-gstring-for-graphic]))) (map-char-table #'(lambda (key val) @@ -764,7 +764,7 @@ All non-spacing characters have this function in unicode-category-table)) ;; for dotted-circle (aset composition-function-table #x25CC - `([,(purecopy ".\\c^") 0 compose-gstring-for-dotted-circle])) + `([".\\c^" 0 compose-gstring-for-dotted-circle])) ;; For prettier display of fractions (set-char-table-range composition-function-table @@ -772,10 +772,10 @@ All non-spacing characters have this function in ;; We use font-shape-gstring so that if the font doesn't support ;; fractional display, the characters are shown separately, not as ;; a composed cluster. - (list (vector (purecopy "[1-9][0-9][0-9]\u2044[0-9]+") + (list (vector "[1-9][0-9][0-9]\u2044[0-9]+" 3 'font-shape-gstring) - (vector (purecopy "[1-9][0-9]\u2044[0-9]+") 2 'font-shape-gstring) - (vector (purecopy "[1-9]\u2044[0-9]+") 1 'font-shape-gstring)))) + (vector "[1-9][0-9]\u2044[0-9]+" 2 'font-shape-gstring) + (vector "[1-9]\u2044[0-9]+" 1 'font-shape-gstring)))) (defun compose-gstring-for-terminal (gstring _direction) "Compose glyph-string GSTRING for terminal display. diff --git a/lisp/cus-face.el b/lisp/cus-face.el index d06d041942e..ccaf43d772a 100644 --- a/lisp/cus-face.el +++ b/lisp/cus-face.el @@ -35,10 +35,10 @@ (not (documentation-stringp doc))) (error "Invalid (or missing) doc string %S" doc)) (unless (get face 'face-defface-spec) - (face-spec-set face (purecopy spec) 'face-defface-spec) + (face-spec-set face spec 'face-defface-spec) (push (cons 'defface face) current-load-list) (when doc - (set-face-documentation face (purecopy doc))) + (set-face-documentation face doc)) (custom-handle-all-keywords face args 'custom-face) (run-hooks 'custom-define-hook)) face) diff --git a/lisp/custom.el b/lisp/custom.el index 122cd2bcee8..3abc326e674 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -166,7 +166,7 @@ not the default value itself. DEFAULT is stored as SYMBOL's standard value, in SYMBOL's property `standard-value'. At the same time, SYMBOL's property `force-value' is set to nil, as the value is no longer rogue." - (put symbol 'standard-value (purecopy (list default))) + (put symbol 'standard-value (list default)) ;; Maybe this option was rogue in an earlier version. It no longer is. (when (get symbol 'force-value) (put symbol 'force-value nil)) @@ -207,7 +207,7 @@ set to nil, as the value is no longer rogue." (when (memq value '(permanent permanent-only)) (put symbol 'permanent-local t))) ((eq keyword :type) - (put symbol 'custom-type (purecopy value))) + (put symbol 'custom-type value)) ((eq keyword :options) (if (get symbol 'custom-options) ;; Slow safe code to avoid duplicates. @@ -488,7 +488,7 @@ information." (setq members (cdr members))) (when doc ;; This text doesn't get into DOC. - (put symbol 'group-documentation (purecopy doc))) + (put symbol 'group-documentation doc)) (while args (let ((arg (car args))) (setq args (cdr args)) @@ -500,7 +500,7 @@ information." (error "Keyword %s is missing an argument" keyword)) (setq args (cdr args)) (cond ((eq keyword :prefix) - (put symbol 'custom-prefix (purecopy value))) + (put symbol 'custom-prefix value)) (t (custom-handle-keyword symbol keyword value 'custom-group)))))) @@ -587,8 +587,6 @@ Third argument TYPE is the custom option type." (defun custom-handle-keyword (symbol keyword value type) "For customization option SYMBOL, handle KEYWORD with VALUE. Fourth argument TYPE is the custom option type." - (if purify-flag - (setq value (purecopy value))) (cond ((eq keyword :group) (custom-add-to-group value symbol type)) ((eq keyword :version) @@ -641,22 +639,22 @@ For other custom types, this has no effect." "To the custom option SYMBOL add the link WIDGET." (let ((links (get symbol 'custom-links))) (unless (member widget links) - (put symbol 'custom-links (cons (purecopy widget) links))))) + (put symbol 'custom-links (cons widget links))))) (defun custom-add-version (symbol version) "To the custom option SYMBOL add the version VERSION." - (put symbol 'custom-version (purecopy version))) + (put symbol 'custom-version version)) (defun custom-add-package-version (symbol version) "To the custom option SYMBOL add the package version VERSION." - (put symbol 'custom-package-version (purecopy version))) + (put symbol 'custom-package-version version)) (defun custom-add-load (symbol load) "To the custom option SYMBOL add the dependency LOAD. LOAD should be either a library file name, or a feature name." (let ((loads (get symbol 'custom-loads))) (unless (member load loads) - (put symbol 'custom-loads (cons (purecopy load) loads))))) + (put symbol 'custom-loads (cons load loads))))) (defun custom-autoload (symbol load &optional noset) "Mark SYMBOL as autoloaded custom variable and add dependency LOAD. diff --git a/lisp/dired.el b/lisp/dired.el index 94865808d73..2eb6546107a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -60,7 +60,7 @@ :group 'dired) ;;;###autoload -(defcustom dired-listing-switches (purecopy "-al") +(defcustom dired-listing-switches "-al" "Switches passed to `ls' for Dired. MUST contain the `l' option. May contain all other options that don't contradict `-l'; may contain even `F', `b', `i' and `s'. See also the variable diff --git a/lisp/dnd.el b/lisp/dnd.el index a8c4c2ddd0d..07e271e7756 100644 --- a/lisp/dnd.el +++ b/lisp/dnd.el @@ -42,11 +42,11 @@ ;;;###autoload (defcustom dnd-protocol-alist - `((,(purecopy "^file:///") . dnd-open-local-file) ; XDND format. - (,(purecopy "^file://[^/]") . dnd-open-file) ; URL with host - (,(purecopy "^file:/[^/]") . dnd-open-local-file) ; Old KDE, Motif, Sun - (,(purecopy "^file:[^/]") . dnd-open-local-file) ; MS-Windows - (,(purecopy "^\\(https?\\|ftp\\|nfs\\)://") . dnd-open-file)) + '(("^file:///" . dnd-open-local-file) ; XDND format. + ("^file://[^/]" . dnd-open-file) ; URL with host + ("^file:/[^/]" . dnd-open-local-file) ; Old KDE, Motif, Sun + ("^file:[^/]" . dnd-open-local-file) ; MS-Windows + ("^\\(https?\\|ftp\\|nfs\\)://" . dnd-open-file)) "The functions to call for different protocols when a drop is made. This variable is used by `dnd-handle-multiple-urls'. The list contains of (REGEXP . FUNCTION) pairs. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index f063c351e28..9f1b796bdf2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1861,7 +1861,7 @@ See Info node `(elisp) Integer Basics'." (side-effect-and-error-free-fns '( ;; alloc.c - bool-vector cons list make-marker purecopy record vector + bool-vector cons list make-marker record vector ;; buffer.c buffer-list buffer-live-p current-buffer overlay-lists overlayp ;; casetab.c diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index 7f6723aa189..6412c8cde22 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -543,7 +543,7 @@ was first made obsolete, for example a date or a release number." (put obsolete-name 'byte-obsolete-info ;; The second entry used to hold the `byte-compile' handler, but ;; is not used any more nowadays. - (purecopy (list current-name nil when))) + (list current-name nil when)) obsolete-name) (defmacro define-obsolete-function-alias ( obsolete-name current-name when @@ -579,7 +579,7 @@ ACCESS-TYPE if non-nil should specify the kind of access that will trigger obsolescence warnings; it can be either `get' or `set'." (byte-run--constant-obsolete-warning obsolete-name) (put obsolete-name 'byte-obsolete-variable - (purecopy (list current-name access-type when))) + (list current-name access-type when)) obsolete-name) (defmacro define-obsolete-variable-alias ( obsolete-name current-name when @@ -634,7 +634,7 @@ obsolete, for example a date or a release number." `(progn (put ,obsolete-face 'face-alias ,current-face) ;; Used by M-x describe-face. - (put ,obsolete-face 'obsolete-face (or (purecopy ,when) t)))) + (put ,obsolete-face 'obsolete-face (or ,when t)))) (defmacro dont-compile (&rest body) "Like `progn', but the body always runs interpreted (not compiled). diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 63aa9567283..f8c2f8c7219 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4640,13 +4640,12 @@ Return (TAIL VAR TEST CASES), where: cases)))) (setq jump-table (make-hash-table :test test - :purecopy t :size nvalues))) (setq default-tag (byte-compile-make-tag)) ;; The structure of byte-switch code: ;; ;; varref var - ;; constant #s(hash-table purecopy t data (val1 (TAG1) val2 (TAG2))) + ;; constant #s(hash-table data (val1 (TAG1) val2 (TAG2))) ;; switch ;; goto DEFAULT-TAG ;; TAG1 diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index ce48eb02978..96260c3aff8 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -722,7 +722,7 @@ PROPLIST is a list of the sort returned by `symbol-plist'. (define-button-type 'cl-type-definition :supertype 'help-function-def - 'help-echo (purecopy "mouse-2, RET: find type definition")) + 'help-echo "mouse-2, RET: find type definition") (declare-function help-fns-short-filename "help-fns" (filename)) diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 3aa26fba3c3..6a81b55bccf 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -654,11 +654,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined (symbol-function sym))) ;; Prevent `defalias' from recording this as the definition site of ;; the generic function. - current-load-list - ;; BEWARE! Don't purify this function definition, since that leads - ;; to memory corruption if the hash-tables it holds are modified - ;; (the GC doesn't trace those pointers). - (purify-flag nil)) + current-load-list) (when (listp old-adv-cc) (set-advertised-calling-convention gfun old-adv-cc nil)) ;; But do use `defalias', so that it interacts properly with nadvice, diff --git a/lisp/emacs-lisp/cl-preloaded.el b/lisp/emacs-lisp/cl-preloaded.el index 7c36b398263..0399b179125 100644 --- a/lisp/emacs-lisp/cl-preloaded.el +++ b/lisp/emacs-lisp/cl-preloaded.el @@ -41,7 +41,7 @@ ;; The `assert' macro from the cl package signals ;; `cl-assertion-failed' at runtime so always define it. -(define-error 'cl-assertion-failed (purecopy "Assertion failed")) +(define-error 'cl-assertion-failed "Assertion failed") (defun cl--assertion-failed (form &optional string sargs args) (if debug-on-error @@ -183,20 +183,7 @@ (add-to-list 'current-load-list `(define-type . ,name)) (cl--struct-register-child parent-class tag) (unless (or (eq named t) (eq tag name)) - ;; We used to use `defconst' instead of `set' but that - ;; has a side-effect of purecopying during the dump, so that the - ;; class object stored in the tag ends up being a *copy* of the - ;; one stored in the `cl--class' property! We could have fixed - ;; this needless duplication by using the purecopied object, but - ;; that then breaks down a bit later when we modify the - ;; cl-structure-class class object to close the recursion - ;; between cl-structure-object and cl-structure-class (because - ;; modifying purecopied objects is not allowed. Since this is - ;; done during dumping, we could relax this rule and allow the - ;; modification, but it's cumbersome). - ;; So in the end, it's easier to just avoid the duplication by - ;; avoiding the use of the purespace here. - (set tag class) + (eval `(defconst ,tag ',class) t) ;; In the cl-generic support, we need to be able to check ;; if a vector is a cl-struct object, without knowing its particular type. ;; So we use the (otherwise) unused function slots of the tag symbol diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el index bdc35f33b3b..5af34361b92 100644 --- a/lisp/emacs-lisp/cl-print.el +++ b/lisp/emacs-lisp/cl-print.el @@ -160,7 +160,7 @@ Print the contents hidden by the ellipsis to STREAM." 'follow-link t 'action (lambda (button) (disassemble (button-get button 'byte-code-function))) - 'help-echo (purecopy "mouse-2, RET: disassemble this function")) + 'help-echo "mouse-2, RET: disassemble this function") (defvar cl-print-compiled nil "Control how to print byte-compiled functions. diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 269eae315e4..dd94e75966c 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -155,7 +155,7 @@ native compilation runs.") (defvar comp-curr-allocation-class 'd-default "Current allocation class. -Can be one of: `d-default', `d-impure' or `d-ephemeral'. See `comp-ctxt'.") +Can be one of: `d-default' or `d-ephemeral'. See `comp-ctxt'.") (defconst comp-passes '(comp--spill-lap comp--limplify @@ -395,9 +395,6 @@ Needed to replace immediate byte-compiled lambdas with the compiled reference.") :documentation "Documentation index -> documentation") (d-default (make-comp-data-container) :type comp-data-container :documentation "Standard data relocated in use by functions.") - (d-impure (make-comp-data-container) :type comp-data-container - :documentation "Relocated data that cannot be moved into pure space. -This is typically for top-level forms other than defun.") (d-ephemeral (make-comp-data-container) :type comp-data-container :documentation "Relocated data not necessary after load.") (with-late-load nil :type boolean @@ -1190,7 +1187,7 @@ Return value is the fall-through block name." (defun comp--jump-table-optimizable (jmp-table) "Return t if JMP-TABLE can be optimized out." ;; Identify LAP sequences like: - ;; (byte-constant #s(hash-table test eq purecopy t data (created 126 deleted 126 changed 126)) . 24) + ;; (byte-constant #s(hash-table test eq data (created 126 deleted 126 changed 126)) . 24) ;; (byte-switch) ;; (TAG 126 . 10) (let ((targets (hash-table-values jmp-table))) @@ -1615,7 +1612,7 @@ and the annotation emission." (unless for-late-load (comp--emit (comp--call 'eval - (let ((comp-curr-allocation-class 'd-impure)) + (let ((comp-curr-allocation-class 'd-default)) (make--comp-mvar :constant (byte-to-native-top-level-form form))) (make--comp-mvar :constant @@ -1625,7 +1622,7 @@ and the annotation emission." "Emit the creation of subrs for lambda FUNC. These are stored in the reloc data array." (let ((args (comp--prepare-args-for-top-level func))) - (let ((comp-curr-allocation-class 'd-impure)) + (let ((comp-curr-allocation-class 'd-default)) (comp--add-const-to-relocs (comp-func-byte-func func))) (comp--emit (comp--call 'comp--register-lambda @@ -3257,7 +3254,10 @@ Set it into the `type' slot." ;; from the corresponding m-var. collect (if (gethash obj (comp-ctxt-byte-func-to-func-h comp-ctxt)) - 'lambda-fixup + ;; Hack not to have `--lambda-fixup' in + ;; data relocations as it would trigger the + ;; check in 'check_comp_unit_relocs'. + (intern (concat (make-string 1 ?-) "-lambda-fixup")) obj)))) (defun comp--finalize-relocs () @@ -3271,28 +3271,15 @@ Update all insn accordingly." (let* ((d-default (comp-ctxt-d-default comp-ctxt)) (d-default-idx (comp-data-container-idx d-default)) - (d-impure (comp-ctxt-d-impure comp-ctxt)) - (d-impure-idx (comp-data-container-idx d-impure)) (d-ephemeral (comp-ctxt-d-ephemeral comp-ctxt)) (d-ephemeral-idx (comp-data-container-idx d-ephemeral))) - ;; We never want compiled lambdas ending up in pure space. A copy must - ;; be already present in impure (see `comp--emit-lambda-for-top-level'). - (cl-loop for obj being each hash-keys of d-default-idx - when (gethash obj (comp-ctxt-lambda-fixups-h comp-ctxt)) - do (cl-assert (gethash obj d-impure-idx)) - (remhash obj d-default-idx)) - ;; Remove entries in d-impure already present in d-default. - (cl-loop for obj being each hash-keys of d-impure-idx - when (gethash obj d-default-idx) - do (remhash obj d-impure-idx)) - ;; Remove entries in d-ephemeral already present in d-default or - ;; d-impure. + ;; Remove entries in d-ephemeral already present in d-default (cl-loop for obj being each hash-keys of d-ephemeral-idx - when (or (gethash obj d-default-idx) (gethash obj d-impure-idx)) + when (gethash obj d-default-idx) do (remhash obj d-ephemeral-idx)) ;; Fix-up indexes in each relocation class and fill corresponding ;; reloc lists. - (mapc #'comp--finalize-container (list d-default d-impure d-ephemeral)) + (mapc #'comp--finalize-container (list d-default d-ephemeral)) ;; Make a vector from the function documentation hash table. (cl-loop with h = (comp-ctxt-function-docs comp-ctxt) with v = (make-vector (hash-table-count h) nil) @@ -3302,13 +3289,13 @@ Update all insn accordingly." finally do (setf (comp-ctxt-function-docs comp-ctxt) v)) ;; And now we conclude with the following: We need to pass to - ;; `comp--register-lambda' the index in the impure relocation - ;; array to store revived lambdas, but given we know it only now - ;; we fix it up as last. + ;; `comp--register-lambda' the index in the relocation array to + ;; store revived lambdas, but given we know it only now we fix it up + ;; as last. (cl-loop for f being each hash-keys of (comp-ctxt-lambda-fixups-h comp-ctxt) using (hash-value mvar) with reverse-h = (make-hash-table) ;; Make sure idx is unique. - for idx = (gethash f d-impure-idx) + for idx = (gethash f d-default-idx) do (cl-assert (null (gethash idx reverse-h))) (cl-assert (fixnump idx)) diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 6b10150d04d..2e54d6ce36c 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -220,7 +220,7 @@ No problems result if this variable is not bound. (with-no-warnings (defvar ,map (make-sparse-keymap))) (unless (get ',map 'variable-documentation) (put ',map 'variable-documentation - (purecopy ,(format "Keymap for `%s'." child)))) + ,(format "Keymap for `%s'." child))) ,(if declare-syntax `(progn (defvar ,syntax) @@ -229,7 +229,7 @@ No problems result if this variable is not bound. (defvar ,syntax (make-syntax-table))) (unless (get ',syntax 'variable-documentation) (put ',syntax 'variable-documentation - (purecopy ,(format "Syntax table for `%s'." child)))))) + ,(format "Syntax table for `%s'." child))))) ,(if declare-abbrev `(progn (defvar ,abbrev) @@ -239,7 +239,7 @@ No problems result if this variable is not bound. (progn (define-abbrev-table ',abbrev nil) ,abbrev))) (unless (get ',abbrev 'variable-documentation) (put ',abbrev 'variable-documentation - (purecopy ,(format "Abbrev table for `%s'." child)))))) + ,(format "Abbrev table for `%s'." child))))) (if (fboundp 'derived-mode-set-parent) ;; Emacs≥30.1 (derived-mode-set-parent ',child ',parent) (put ',child 'derived-mode-parent ',parent)) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 35f291dd1a7..2f63fc90f53 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -269,7 +269,7 @@ INIT-VALUE LIGHTER KEYMAP. (setq body (cdr body)) (pcase keyw (:init-value (setq init-value (pop body))) - (:lighter (setq lighter (purecopy (pop body)))) + (:lighter (setq lighter (pop body))) (:global (setq globalp (pop body)) (when (and globalp (symbolp mode)) (setq setter `(setq-default ,mode)) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index 41b735489ff..81890268dd7 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -78,7 +78,7 @@ If nil, truncated messages will just have \"...\" to indicate truncation." :version "28.1") ;;;###autoload -(defcustom eldoc-minor-mode-string (purecopy " ElDoc") +(defcustom eldoc-minor-mode-string " ElDoc" "String to display in mode line when ElDoc Mode is enabled; nil for none." :type '(choice string (const :tag "None" nil))) @@ -154,7 +154,6 @@ this file since the obarray is initialized at load time. Remember to keep it a prime number to improve hash performance.") (defvar eldoc-message-commands - ;; Don't define as `defconst' since it would then go to (read-only) purespace. (obarray-make eldoc-message-commands-table-size) "Commands after which it is appropriate to print in the echo area. ElDoc does not try to print function arglists, etc., after just any command, @@ -166,7 +165,6 @@ directly. Instead, use `eldoc-add-command' and `eldoc-remove-command'.") ;; Not a constant. (defvar eldoc-last-data (make-vector 3 nil) - ;; Don't define as `defconst' since it would then go to (read-only) purespace. "Bookkeeping; elements are as follows: 0 - contains the last symbol read from the buffer. 1 - contains the string last displayed in the echo area for variables, diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el index b7b54b2a6b1..c863857d6ba 100644 --- a/lisp/emacs-lisp/gv.el +++ b/lisp/emacs-lisp/gv.el @@ -182,7 +182,7 @@ If CURRENT-NAME is a string, that is the `use instead' message. WHEN should be a string indicating when the variable was first made obsolete, for example a date or a release number." (put obsolete-name 'byte-obsolete-generalized-variable - (purecopy (list current-name when))) + (list current-name when)) obsolete-name) ;; Additions for `declare'. We specify the values as named aliases so diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index bb9f2edac4e..8c241723465 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -94,68 +94,68 @@ (defvar lisp-imenu-generic-expression (list (list nil - (purecopy (concat "^\\s-*(" - (regexp-opt - '("defun" "defmacro" - ;; Elisp. - "defun*" "defsubst" "define-inline" - "define-advice" "defadvice" "define-skeleton" - "define-compilation-mode" "define-minor-mode" - "define-global-minor-mode" - "define-globalized-minor-mode" - "define-derived-mode" "define-generic-mode" - "ert-deftest" - "cl-defun" "cl-defsubst" "cl-defmacro" - "cl-define-compiler-macro" "cl-defgeneric" - "cl-defmethod" - ;; CL. - "define-compiler-macro" "define-modify-macro" - "defsetf" "define-setf-expander" - "define-method-combination" - ;; CLOS and EIEIO - "defgeneric" "defmethod") - t) - "\\s-+\\(" (rx lisp-mode-symbol) "\\)")) + (concat "^\\s-*(" + (regexp-opt + '("defun" "defmacro" + ;; Elisp. + "defun*" "defsubst" "define-inline" + "define-advice" "defadvice" "define-skeleton" + "define-compilation-mode" "define-minor-mode" + "define-global-minor-mode" + "define-globalized-minor-mode" + "define-derived-mode" "define-generic-mode" + "ert-deftest" + "cl-defun" "cl-defsubst" "cl-defmacro" + "cl-define-compiler-macro" "cl-defgeneric" + "cl-defmethod" + ;; CL. + "define-compiler-macro" "define-modify-macro" + "defsetf" "define-setf-expander" + "define-method-combination" + ;; CLOS and EIEIO + "defgeneric" "defmethod") + t) + "\\s-+\\(" (rx lisp-mode-symbol) "\\)") 2) ;; Like the previous, but uses a quoted symbol as the name. (list nil - (purecopy (concat "^\\s-*(" - (regexp-opt - '("defalias" "define-obsolete-function-alias") - t) - "\\s-+'\\(" (rx lisp-mode-symbol) "\\)")) + (concat "^\\s-*(" + (regexp-opt + '("defalias" "define-obsolete-function-alias") + t) + "\\s-+'\\(" (rx lisp-mode-symbol) "\\)") 2) - (list (purecopy "Variables") - (purecopy (concat "^\\s-*(" - (regexp-opt - '(;; Elisp - "defconst" "defcustom" "defvar-keymap" - ;; CL - "defconstant" - "defparameter" "define-symbol-macro") - t) - "\\s-+\\(" (rx lisp-mode-symbol) "\\)")) + (list "Variables" + (concat "^\\s-*(" + (regexp-opt + '(;; Elisp + "defconst" "defcustom" "defvar-keymap" + ;; CL + "defconstant" + "defparameter" "define-symbol-macro") + t) + "\\s-+\\(" (rx lisp-mode-symbol) "\\)") 2) ;; For `defvar'/`defvar-local', we ignore (defvar FOO) constructs. - (list (purecopy "Variables") - (purecopy (concat "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(" - (rx lisp-mode-symbol) "\\)" - "[[:space:]\n]+[^)]")) + (list "Variables" + (concat "^\\s-*(defvar\\(?:-local\\)?\\s-+\\(" + (rx lisp-mode-symbol) "\\)" + "[[:space:]\n]+[^)]") 1) - (list (purecopy "Types") - (purecopy (concat "^\\s-*(" - (regexp-opt - '(;; Elisp - "defgroup" "deftheme" - "define-widget" "define-error" - "defface" "cl-deftype" "cl-defstruct" - ;; CL - "deftype" "defstruct" - "define-condition" "defpackage" - ;; CLOS and EIEIO - "defclass") - t) - "\\s-+'?\\(" (rx lisp-mode-symbol) "\\)")) + (list "Types" + (concat "^\\s-*(" + (regexp-opt + '(;; Elisp + "defgroup" "deftheme" + "define-widget" "define-error" + "defface" "cl-deftype" "cl-defstruct" + ;; CL + "deftype" "defstruct" + "define-condition" "defpackage" + ;; CLOS and EIEIO + "defclass") + t) + "\\s-+'?\\(" (rx lisp-mode-symbol) "\\)") 2)) "Imenu generic expression for Lisp mode. See `imenu-generic-expression'.") diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index ad78b5fbae3..2387a5d4b92 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -441,7 +441,7 @@ don't include." (file-name-sans-extension (file-name-nondirectory file))))) (push (list (or local-outfile main-outfile) file - `(push (purecopy ',(cons (intern package) version)) + `(push ',(cons (intern package) version) package--builtin-versions)) defs)))) diff --git a/lisp/emacs-lisp/warnings.el b/lisp/emacs-lisp/warnings.el index 8caf32dfcd8..8a5c73ebd3a 100644 --- a/lisp/emacs-lisp/warnings.el +++ b/lisp/emacs-lisp/warnings.el @@ -172,7 +172,7 @@ also call that function before the next warning.") ;; safely, testing the existing value, before they call one of the ;; warnings functions. ;;;###autoload -(defvar warning-type-format (purecopy " (%s)") +(defvar warning-type-format " (%s)" "Format for displaying the warning type in the warning message. The result of formatting the type this way gets included in the message under the control of the string in `warning-levels'.") diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index a9005e8d8d3..0f83528bae5 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el @@ -35,7 +35,7 @@ (if (fboundp 'epa-file-name-regexp-update) (epa-file-name-regexp-update))) -(defcustom epa-file-name-regexp (purecopy "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'") +(defcustom epa-file-name-regexp "\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" "Regexp which matches filenames to be encrypted with GnuPG. If you set this outside Custom while epa-file is already enabled, diff --git a/lisp/faces.el b/lisp/faces.el index 145af31a3d4..5fe3ab1a294 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -25,7 +25,7 @@ ;;; Code: -(defcustom term-file-prefix (purecopy "term/") +(defcustom term-file-prefix "term/" "If non-nil, Emacs startup performs terminal-specific initialization. It does this by: (load (concat term-file-prefix (getenv \"TERM\"))) @@ -99,7 +99,6 @@ a font height that isn't optimal." ;; unavailable, and we fall back on the courier and helv families, ;; which are generally available. (defcustom face-font-family-alternatives - (mapcar (lambda (arg) (mapcar 'purecopy arg)) '(("Monospace" "Cascadia Code" "Lucida Console" "courier" "fixed") ;; Monospace Serif is an Emacs invention, intended to work around @@ -137,7 +136,7 @@ a font height that isn't optimal." ;; https://en.wikipedia.org/wiki/List_of_typefaces_included_with_Microsoft_Windows "Calibri" "Tahoma" "Lucida Sans Unicode" "helv" "helvetica" "arial" "fixed") - ("helv" "helvetica" "arial" "fixed"))) + ("helv" "helvetica" "arial" "fixed")) "Alist of alternative font family names. Each element has the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...). If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then @@ -152,7 +151,6 @@ ALTERNATIVE2 etc." ;; This is defined originally in xfaces.c. (defcustom face-font-registry-alternatives - (mapcar (lambda (arg) (mapcar 'purecopy arg)) (if (featurep 'w32) '(("iso8859-1" "ms-oemlatin") ("gb2312.1980" "gb2312" "gbk" "gb18030") @@ -162,7 +160,7 @@ ALTERNATIVE2 etc." '(("gb2312.1980" "gb2312.80&gb8565.88" "gbk" "gb18030") ("jisx0208.1990" "jisx0208.1983" "jisx0208.1978") ("ksc5601.1989" "ksx1001.1992" "ksc5601.1987") - ("muletibetan-2" "muletibetan-0")))) + ("muletibetan-2" "muletibetan-0"))) "Alist of alternative font registry names. Each element has the form (REGISTRY ALTERNATIVE1 ALTERNATIVE2 ...). If fonts of registry REGISTRY can be loaded, font selection @@ -354,11 +352,6 @@ is either `foreground-color', `background-color', or a keyword." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defcustom face-x-resources - (mapcar - (lambda (arg) - ;; FIXME; can we purecopy some of the conses too? - (cons (car arg) - (cons (purecopy (car (cdr arg))) (purecopy (cdr (cdr arg)))))) '((:family (".attributeFamily" . "Face.AttributeFamily")) (:foundry (".attributeFoundry" . "Face.AttributeFoundry")) (:width (".attributeWidth" . "Face.AttributeWidth")) @@ -381,7 +374,7 @@ is either `foreground-color', `background-color', or a keyword." (:bold (".attributeBold" . "Face.AttributeBold")) (:italic (".attributeItalic" . "Face.AttributeItalic")) (:font (".attributeFont" . "Face.AttributeFont")) - (:inherit (".attributeInherit" . "Face.AttributeInherit")))) + (:inherit (".attributeInherit" . "Face.AttributeInherit"))) "List of X resources and classes for face attributes. Each element has the form (ATTRIBUTE ENTRY1 ENTRY2...) where ATTRIBUTE is the name of a face attribute, and each ENTRY is a cons of the form @@ -664,7 +657,7 @@ If FACE is a face-alias, get the documentation for the target face." (defun set-face-documentation (face string) "Set the documentation string for FACE to STRING." ;; Perhaps the text should go in DOC. - (put face 'face-documentation (purecopy string))) + (put face 'face-documentation string)) (define-obsolete-function-alias 'face-doc-string #'face-documentation "29.1") @@ -863,7 +856,6 @@ setting `:weight' to `bold', and a value of t for `:italic' is equivalent to setting `:slant' to `italic'. But if `:weight' is specified in the face spec, `:bold' is ignored, and if `:slant' is specified, `:italic' is ignored." - (setq args (purecopy args)) (let ((where (if (null frame) 0 frame)) (spec args) family foundry orig-family orig-foundry) @@ -893,15 +885,13 @@ is specified, `:italic' is ignored." (setq family orig-family) (setq foundry orig-foundry))) (when (or (stringp family) (eq family 'unspecified)) - (internal-set-lisp-face-attribute face :family (purecopy family) - where)) + (internal-set-lisp-face-attribute face :family family where)) (when (or (stringp foundry) (eq foundry 'unspecified)) - (internal-set-lisp-face-attribute face :foundry (purecopy foundry) - where))) + (internal-set-lisp-face-attribute face :foundry foundry where))) (while args (unless (memq (car args) '(:family :foundry)) (internal-set-lisp-face-attribute face (car args) - (purecopy (cadr args)) + (cadr args) where)) (setq args (cddr args))))) @@ -3192,16 +3182,15 @@ This face is used by `show-paren-mode'." (encoding "[^-]+") ) (setq x-font-regexp - (purecopy (concat "\\`\\*?[-?*]" + (concat "\\`\\*?[-?*]" foundry - family - weight\? - slant\? - swidth - adstyle - pixelsize - pointsize - resx - resy - spacing - avgwidth - - registry - encoding "\\*?\\'" - ))) + registry - encoding "\\*?\\'")) (setq x-font-regexp-head - (purecopy (concat "\\`[-?*]" foundry - family - weight\? - slant\? - "\\([-*?]\\|\\'\\)"))) - (setq x-font-regexp-slant (purecopy (concat - slant -))) - (setq x-font-regexp-weight (purecopy (concat - weight -))) + (concat "\\`[-?*]" foundry - family - weight\? - slant\? + "\\([-*?]\\|\\'\\)")) + (setq x-font-regexp-slant (concat - slant -)) + (setq x-font-regexp-weight (concat - weight -)) nil) diff --git a/lisp/files.el b/lisp/files.el index 09bc3ea429f..5ff40c335d7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -231,7 +231,7 @@ have fast storage with limited space, such as a RAM disk." :type '(choice (const nil) directory)) ;; The system null device. (Should reference NULL_DEVICE from C.) -(defvar null-device (purecopy "/dev/null") "The system null device.") +(defvar null-device "/dev/null" "The system null device.") (declare-function msdos-long-file-names "msdos.c") (declare-function w32-long-file-name "w32proc.c") @@ -243,17 +243,15 @@ have fast storage with limited space, such as a RAM disk." (defvar file-name-invalid-regexp (cond ((and (eq system-type 'ms-dos) (not (msdos-long-file-names))) - (purecopy (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive "[+, ;=|<>\"?*]\\|\\[\\|\\]\\|" ; invalid characters "[\000-\037]\\|" ; control characters "\\(/\\.\\.?[^/]\\)\\|" ; leading dots - "\\(/[^/.]+\\.[^/.]*\\.\\)"))) ; more than a single dot + "\\(/[^/.]+\\.[^/.]*\\.\\)")) ; more than a single dot ((memq system-type '(ms-dos windows-nt cygwin)) - (purecopy - (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive - "[|<>\"?*\000-\037]"))) ; invalid characters - (t (purecopy "[\000]"))) + (concat "^\\([^A-Z[-`a-z]\\|..+\\)?:\\|" ; colon except after drive + "[|<>\"?*\000-\037]")) ; invalid characters + (t "[\000]")) "Regexp recognizing file names that aren't allowed by the filesystem.") (defcustom file-precious-flag nil @@ -1175,7 +1173,7 @@ one or more of those symbols." string-dir names string-file pred action))))) (defvar locate-dominating-stop-dir-regexp - (purecopy "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'") + "\\`\\(?:[\\/][\\/][^\\/]+[\\/]\\|/\\(?:net\\|afs\\|\\.\\.\\.\\)/\\)\\'" "Regexp of directory names that stop the search in `locate-dominating-file'. Any directory whose name matches this regexp will be treated like a kind of root directory by `locate-dominating-file', which will stop its @@ -2988,279 +2986,276 @@ since only a single case-insensitive search through the alist is made." ;; Note: The entries for the modes defined in cc-mode.el (c-mode, ;; c++-mode, java-mode and more) are added through autoload ;; directives in that file. - (mapcar - (lambda (elt) - (cons (purecopy (car elt)) (cdr elt))) - `(;; do this first, so that .html.pl is Polish html, not Perl - ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) - ("\\.svgz?\\'" . image-mode) - ("\\.svgz?\\'" . xml-mode) - ("\\.x[bp]m\\'" . image-mode) - ("\\.x[bp]m\\'" . c-mode) - ("\\.p[bpgn]m\\'" . image-mode) - ("\\.tiff?\\'" . image-mode) - ("\\.gif\\'" . image-mode) - ("\\.png\\'" . image-mode) - ("\\.jpe?g\\'" . image-mode) - ("\\.webp\\'" . image-mode) - ("\\.te?xt\\'" . text-mode) - ("\\.[tT]e[xX]\\'" . tex-mode) - ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. - ("\\.ltx\\'" . latex-mode) - ("\\.dtx\\'" . doctex-mode) - ("\\.org\\'" . org-mode) - ;; .dir-locals.el is not really Elisp. Could use the - ;; `dir-locals-file' constant if it weren't defined below. - ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) - ("\\.eld\\'" . lisp-data-mode) - ;; FIXME: The lisp-data-mode files below should use the `.eld' extension - ;; (or a -*- mode cookie) so we don't need ad-hoc entries here. - ("eww-bookmarks\\'" . lisp-data-mode) - ("tramp\\'" . lisp-data-mode) - ("/archive-contents\\'" . lisp-data-mode) - ("places\\'" . lisp-data-mode) - ("\\.emacs-places\\'" . lisp-data-mode) - ("\\.el\\'" . emacs-lisp-mode) - ("Project\\.ede\\'" . emacs-lisp-mode) - ("\\(?:\\.\\(?:scm\\|sls\\|sld\\|stk\\|ss\\|sch\\)\\|/\\.guile\\)\\'" . scheme-mode) - ("\\.l\\'" . lisp-mode) - ("\\.li?sp\\'" . lisp-mode) - ("\\.[fF]\\'" . fortran-mode) - ("\\.for\\'" . fortran-mode) - ("\\.p\\'" . pascal-mode) - ("\\.pas\\'" . pascal-mode) - ("\\.\\(dpr\\|DPR\\)\\'" . opascal-mode) - ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) - ("Imakefile\\'" . makefile-imake-mode) - ("Makeppfile\\(?:\\.mk\\)?\\'" . makefile-makepp-mode) ; Put this before .mk - ("\\.makepp\\'" . makefile-makepp-mode) - ,@(if (memq system-type '(berkeley-unix darwin)) - '(("\\.mk\\'" . makefile-bsdmake-mode) - ("\\.make\\'" . makefile-bsdmake-mode) - ("GNUmakefile\\'" . makefile-gmake-mode) - ("[Mm]akefile\\'" . makefile-bsdmake-mode)) - '(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give GNU the host advantage - ("\\.make\\'" . makefile-gmake-mode) - ("[Mm]akefile\\'" . makefile-gmake-mode))) - ("\\.am\\'" . makefile-automake-mode) - ;; Less common extensions come here - ;; so more common ones above are found faster. - ("\\.texinfo\\'" . texinfo-mode) - ("\\.te?xi\\'" . texinfo-mode) - ("\\.[sS]\\'" . asm-mode) - ("\\.asm\\'" . asm-mode) - ("\\.css\\'" . css-mode) - ("\\.mixal\\'" . mixal-mode) - ("\\.gcov\\'" . compilation-mode) - ;; Besides .gdbinit, gdb documents other names to be usable for init - ;; files, cross-debuggers can use something like - ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files - ;; don't interfere with each other. - ("/[._]?[A-Za-z0-9-]*\\(?:gdbinit\\(?:\\.\\(?:ini?\\|loader\\)\\)?\\|gdb\\.ini\\)\\'" . gdb-script-mode) - ;; GDB 7.5 introduced OBJFILE-gdb.gdb script files; e.g. a file - ;; named 'emacs-gdb.gdb', if it exists, will be automatically - ;; loaded when GDB reads an objfile called 'emacs'. - ("-gdb\\.gdb" . gdb-script-mode) - ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) - ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode) - ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) - ("\\.scm\\.[0-9]*\\'" . scheme-mode) - ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) - ("\\.bash\\'" . sh-mode) - ;; Bash builtin 'fc' creates a temp file named "bash-fc.XXXXXX" - ;; to edit shell commands from its history list. - ("/bash-fc\\.[0-9A-Za-z]\\{6\\}\\'" . sh-mode) - ("/PKGBUILD\\'" . sh-mode) - ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode) - ("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) - ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) - ("\\.m?spec\\'" . sh-mode) - ("\\.m[mes]\\'" . nroff-mode) - ("\\.man\\'" . nroff-mode) - ("\\.sty\\'" . latex-mode) - ("\\.cl[so]\\'" . latex-mode) ;LaTeX 2e class option - ("\\.bbl\\'" . latex-mode) - ("\\.bib\\'" . bibtex-mode) - ("\\.bst\\'" . bibtex-style-mode) - ("\\.sql\\'" . sql-mode) - ;; These .m4 files are Autoconf files. - ("\\(acinclude\\|aclocal\\|acsite\\)\\.m4\\'" . autoconf-mode) - ("\\.m[4c]\\'" . m4-mode) - ("\\.mf\\'" . metafont-mode) - ("\\.mp\\'" . metapost-mode) - ("\\.vhdl?\\'" . vhdl-mode) - ("\\.article\\'" . text-mode) - ("\\.letter\\'" . text-mode) - ("\\.i?tcl\\'" . tcl-mode) - ("\\.exp\\'" . tcl-mode) - ("\\.itk\\'" . tcl-mode) - ("\\.icn\\'" . icon-mode) - ("\\.sim\\'" . simula-mode) - ("\\.mss\\'" . scribe-mode) - ;; The Fortran standard does not say anything about file extensions. - ;; .f90 was widely used for F90, now we seem to be trapped into - ;; using a different extension for each language revision. - ;; Anyway, the following extensions are supported by gfortran. - ("\\.f9[05]\\'" . f90-mode) - ("\\.f0[38]\\'" . f90-mode) - ("\\.srt\\'" . srecode-template-mode) - ("\\.prolog\\'" . prolog-mode) - ("\\.tar\\'" . tar-mode) - ;; The list of archive file extensions should be in sync with - ;; `auto-coding-alist' with `no-conversion' coding system. - ("\\.\\(\ + `(;; do this first, so that .html.pl is Polish html, not Perl + ("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) + ("\\.svgz?\\'" . image-mode) + ("\\.svgz?\\'" . xml-mode) + ("\\.x[bp]m\\'" . image-mode) + ("\\.x[bp]m\\'" . c-mode) + ("\\.p[bpgn]m\\'" . image-mode) + ("\\.tiff?\\'" . image-mode) + ("\\.gif\\'" . image-mode) + ("\\.png\\'" . image-mode) + ("\\.jpe?g\\'" . image-mode) + ("\\.webp\\'" . image-mode) + ("\\.te?xt\\'" . text-mode) + ("\\.[tT]e[xX]\\'" . tex-mode) + ("\\.ins\\'" . tex-mode) ;Installation files for TeX packages. + ("\\.ltx\\'" . latex-mode) + ("\\.dtx\\'" . doctex-mode) + ("\\.org\\'" . org-mode) + ;; .dir-locals.el is not really Elisp. Could use the + ;; `dir-locals-file' constant if it weren't defined below. + ("\\.dir-locals\\(?:-2\\)?\\.el\\'" . lisp-data-mode) + ("\\.eld\\'" . lisp-data-mode) + ;; FIXME: The lisp-data-mode files below should use the `.eld' extension + ;; (or a -*- mode cookie) so we don't need ad-hoc entries here. + ("eww-bookmarks\\'" . lisp-data-mode) + ("tramp\\'" . lisp-data-mode) + ("/archive-contents\\'" . lisp-data-mode) + ("places\\'" . lisp-data-mode) + ("\\.emacs-places\\'" . lisp-data-mode) + ("\\.el\\'" . emacs-lisp-mode) + ("Project\\.ede\\'" . emacs-lisp-mode) + ("\\(?:\\.\\(?:scm\\|sls\\|sld\\|stk\\|ss\\|sch\\)\\|/\\.guile\\)\\'" . scheme-mode) + ("\\.l\\'" . lisp-mode) + ("\\.li?sp\\'" . lisp-mode) + ("\\.[fF]\\'" . fortran-mode) + ("\\.for\\'" . fortran-mode) + ("\\.p\\'" . pascal-mode) + ("\\.pas\\'" . pascal-mode) + ("\\.\\(dpr\\|DPR\\)\\'" . opascal-mode) + ("\\.\\([pP]\\([Llm]\\|erl\\|od\\)\\|al\\)\\'" . perl-mode) + ("Imakefile\\'" . makefile-imake-mode) + ("Makeppfile\\(?:\\.mk\\)?\\'" . makefile-makepp-mode) ; Put this before .mk + ("\\.makepp\\'" . makefile-makepp-mode) + ,@(if (memq system-type '(berkeley-unix darwin)) + '(("\\.mk\\'" . makefile-bsdmake-mode) + ("\\.make\\'" . makefile-bsdmake-mode) + ("GNUmakefile\\'" . makefile-gmake-mode) + ("[Mm]akefile\\'" . makefile-bsdmake-mode)) + '(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give GNU the host advantage + ("\\.make\\'" . makefile-gmake-mode) + ("[Mm]akefile\\'" . makefile-gmake-mode))) + ("\\.am\\'" . makefile-automake-mode) + ;; Less common extensions come here + ;; so more common ones above are found faster. + ("\\.texinfo\\'" . texinfo-mode) + ("\\.te?xi\\'" . texinfo-mode) + ("\\.[sS]\\'" . asm-mode) + ("\\.asm\\'" . asm-mode) + ("\\.css\\'" . css-mode) + ("\\.mixal\\'" . mixal-mode) + ("\\.gcov\\'" . compilation-mode) + ;; Besides .gdbinit, gdb documents other names to be usable for init + ;; files, cross-debuggers can use something like + ;; .PROCESSORNAME-gdbinit so that the host and target gdbinit files + ;; don't interfere with each other. + ("/[._]?[A-Za-z0-9-]*\\(?:gdbinit\\(?:\\.\\(?:ini?\\|loader\\)\\)?\\|gdb\\.ini\\)\\'" . gdb-script-mode) + ;; GDB 7.5 introduced OBJFILE-gdb.gdb script files; e.g. a file + ;; named 'emacs-gdb.gdb', if it exists, will be automatically + ;; loaded when GDB reads an objfile called 'emacs'. + ("-gdb\\.gdb" . gdb-script-mode) + ("[cC]hange\\.?[lL]og?\\'" . change-log-mode) + ("[cC]hange[lL]og[-.][0-9]+\\'" . change-log-mode) + ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode) + ("\\.scm\\.[0-9]*\\'" . scheme-mode) + ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode) + ("\\.bash\\'" . sh-mode) + ;; Bash builtin 'fc' creates a temp file named "bash-fc.XXXXXX" + ;; to edit shell commands from its history list. + ("/bash-fc\\.[0-9A-Za-z]\\{6\\}\\'" . sh-mode) + ("/PKGBUILD\\'" . sh-mode) + ("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode) + ("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode) + ("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode) + ("\\.m?spec\\'" . sh-mode) + ("\\.m[mes]\\'" . nroff-mode) + ("\\.man\\'" . nroff-mode) + ("\\.sty\\'" . latex-mode) + ("\\.cl[so]\\'" . latex-mode) ;LaTeX 2e class option + ("\\.bbl\\'" . latex-mode) + ("\\.bib\\'" . bibtex-mode) + ("\\.bst\\'" . bibtex-style-mode) + ("\\.sql\\'" . sql-mode) + ;; These .m4 files are Autoconf files. + ("\\(acinclude\\|aclocal\\|acsite\\)\\.m4\\'" . autoconf-mode) + ("\\.m[4c]\\'" . m4-mode) + ("\\.mf\\'" . metafont-mode) + ("\\.mp\\'" . metapost-mode) + ("\\.vhdl?\\'" . vhdl-mode) + ("\\.article\\'" . text-mode) + ("\\.letter\\'" . text-mode) + ("\\.i?tcl\\'" . tcl-mode) + ("\\.exp\\'" . tcl-mode) + ("\\.itk\\'" . tcl-mode) + ("\\.icn\\'" . icon-mode) + ("\\.sim\\'" . simula-mode) + ("\\.mss\\'" . scribe-mode) + ;; The Fortran standard does not say anything about file extensions. + ;; .f90 was widely used for F90, now we seem to be trapped into + ;; using a different extension for each language revision. + ;; Anyway, the following extensions are supported by gfortran. + ("\\.f9[05]\\'" . f90-mode) + ("\\.f0[38]\\'" . f90-mode) + ("\\.srt\\'" . srecode-template-mode) + ("\\.prolog\\'" . prolog-mode) + ("\\.tar\\'" . tar-mode) + ;; The list of archive file extensions should be in sync with + ;; `auto-coding-alist' with `no-conversion' coding system. + ("\\.\\(\ arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|cbr\\|7z\\|squashfs\\|\ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\|SQUASHFS\\)\\'" . archive-mode) - ("\\.oxt\\'" . archive-mode) ;(Open|Libre)Office extensions. - ("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages. - ;; Mailer puts message to be edited in - ;; /tmp/Re.... or Message - ("\\`/tmp/Re" . text-mode) - ("/Message[0-9]*\\'" . text-mode) - ;; some news reader is reported to use this - ("\\`/tmp/fol/" . text-mode) - ("\\.oak\\'" . scheme-mode) - ("\\.sgml?\\'" . sgml-mode) - ("\\.x[ms]l\\'" . xml-mode) - ("\\.dbk\\'" . xml-mode) - ("\\.dtd\\'" . sgml-mode) - ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) - ("\\.js[mx]?\\'" . javascript-mode) - ;; https://en.wikipedia.org/wiki/.har - ("\\.har\\'" . javascript-mode) - ("\\.json\\'" . js-json-mode) - ("\\.[ds]?va?h?\\'" . verilog-mode) - ("\\.by\\'" . bovine-grammar-mode) - ("\\.wy\\'" . wisent-grammar-mode) - ("\\.erts\\'" . erts-mode) - ;; .emacs or .gnus or .viper following a directory delimiter in - ;; Unix or MS-DOS syntax. - ("[:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode) - ("\\`\\..*emacs\\'" . emacs-lisp-mode) - ;; _emacs following a directory delimiter in MS-DOS syntax - ("[:/]_emacs\\'" . emacs-lisp-mode) - ("/crontab\\.X*[0-9]+\\'" . shell-script-mode) - ("\\.ml\\'" . lisp-mode) - ;; Linux-2.6.9 uses some different suffix for linker scripts: - ;; "ld", "lds", "lds.S", "lds.in", "ld.script", and "ld.script.balo". - ;; eCos uses "ld" and "ldi". Netbsd uses "ldscript.*". - ("\\.ld[si]?\\'" . ld-script-mode) - ("ld\\.?script\\'" . ld-script-mode) - ;; .xs is also used for ld scripts, but seems to be more commonly - ;; associated with Perl .xs files (C with Perl bindings). (Bug#7071) - ("\\.xs\\'" . c-mode) - ;; Explained in binutils ld/genscripts.sh. Eg: - ;; A .x script file is the default script. - ;; A .xr script is for linking without relocation (-r flag). Etc. - ("\\.x[abdsru]?[cnw]?\\'" . ld-script-mode) - ("\\.zone\\'" . dns-mode) - ("\\.soa\\'" . dns-mode) - ;; Common Lisp ASDF package system. - ("\\.asd\\'" . lisp-mode) - ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode) - ("\\.\\(as\\|mi\\|sm\\)2\\'" . snmpv2-mode) - ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode) - ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MS-DOS - ("\\.[eE]?[pP][sS]\\'" . ps-mode) - ("\\.\\(?:PDF\\|EPUB\\|CBZ\\|FB2\\|O?XPS\\|DVI\\|OD[FGPST]\\|DOCX\\|XLSX?\\|PPTX?\\|pdf\\|epub\\|cbz\\|fb2\\|o?xps\\|djvu\\|dvi\\|od[fgpst]\\|docx\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe) - ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode) - ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode) - ("BROWSE\\'" . ebrowse-tree-mode) - ("\\.ebrowse\\'" . ebrowse-tree-mode) - ("#\\*mail\\*" . mail-mode) - ("\\.g\\'" . antlr-mode) - ("\\.mod\\'" . m2-mode) - ("\\.ses\\'" . ses-mode) - ("\\.docbook\\'" . sgml-mode) - ("\\.com\\'" . dcl-mode) - ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) - ("/\\.?\\(authinfo\\|netrc\\)\\'" . authinfo-mode) - ;; Windows candidates may be opened case sensitively on Unix - ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) - ("\\.la\\'" . conf-unix-mode) - ("\\.ppd\\'" . conf-ppd-mode) - ("java.+\\.conf\\'" . conf-javaprop-mode) - ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) - ("\\.toml\\'" . conf-toml-mode) - ("\\.desktop\\'" . conf-desktop-mode) - ("/\\.redshift\\.conf\\'" . conf-windows-mode) - ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) - ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode) - ;; ChangeLog.old etc. Other change-log-mode entries are above; - ;; this has lower priority to avoid matching changelog.sgml etc. - ("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode) - ;; either user's dot-files or under /etc or some such - ("/\\.?\\(?:gitconfig\\|gnokiirc\\|hgrc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode) - ("/\\.mailmap\\'" . conf-unix-mode) - ;; alas not all ~/.*rc files are like this - ("/\\.\\(?:asound\\|enigma\\|fetchmail\\|gltron\\|gtk\\|hxplayer\\|mairix\\|mbsync\\|msmtp\\|net\\|neverball\\|nvidia-settings-\\|offlineimap\\|qt/.+\\|realplayer\\|reportbug\\|rtorrent\\.\\|screen\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode) - ("/\\.\\(?:gdbtkinit\\|grip\\|mpdconf\\|notmuch-config\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode) - ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode) - ("/X11.+app-defaults/\\|\\.ad\\'" . conf-xdefaults-mode) - ("/X11.+locale/.+/Compose\\'" . conf-colon-mode) - ;; this contains everything twice, with space and with colon :-( - ("/X11.+locale/compose\\.dir\\'" . conf-javaprop-mode) - ;; Get rid of any trailing .n.m and try again. - ;; This is for files saved by cvs-merge that look like .#. - ;; or .#.- or VC's .~~. - ;; Using mode nil rather than `ignore' would let the search continue - ;; through this list (with the shortened name) rather than start over. - ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) - ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t) - ;; This should come after "in" stripping (e.g. config.h.in). - ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config - ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode-maybe) - ;; The following should come after the ChangeLog pattern - ;; for the sake of ChangeLog.1, etc. - ;; and after the .scm.[0-9] and CVS' . patterns too. - ("\\.[1-9]\\'" . nroff-mode) - ;; Image file types probably supported by `image-convert'. - ("\\.art\\'" . image-mode) - ("\\.avs\\'" . image-mode) - ("\\.bmp\\'" . image-mode) - ("\\.cmyk\\'" . image-mode) - ("\\.cmyka\\'" . image-mode) - ("\\.crw\\'" . image-mode) - ("\\.dcm\\'" . image-mode) - ("\\.dcr\\'" . image-mode) - ("\\.dcx\\'" . image-mode) - ("\\.dng\\'" . image-mode) - ("\\.dpx\\'" . image-mode) - ("\\.fax\\'" . image-mode) - ("\\.heic\\'" . image-mode) - ("\\.hrz\\'" . image-mode) - ("\\.icb\\'" . image-mode) - ("\\.icc\\'" . image-mode) - ("\\.icm\\'" . image-mode) - ("\\.ico\\'" . image-mode) - ("\\.icon\\'" . image-mode) - ("\\.jbg\\'" . image-mode) - ("\\.jbig\\'" . image-mode) - ("\\.jng\\'" . image-mode) - ("\\.jnx\\'" . image-mode) - ("\\.miff\\'" . image-mode) - ("\\.mng\\'" . image-mode) - ("\\.mvg\\'" . image-mode) - ("\\.otb\\'" . image-mode) - ("\\.p7\\'" . image-mode) - ("\\.pcx\\'" . image-mode) - ("\\.pdb\\'" . image-mode) - ("\\.pfa\\'" . image-mode) - ("\\.pfb\\'" . image-mode) - ("\\.picon\\'" . image-mode) - ("\\.pict\\'" . image-mode) - ("\\.rgb\\'" . image-mode) - ("\\.rgba\\'" . image-mode) - ("\\.six\\'" . image-mode) - ("\\.tga\\'" . image-mode) - ("\\.wbmp\\'" . image-mode) - ("\\.webp\\'" . image-mode) - ("\\.wmf\\'" . image-mode) - ("\\.wpg\\'" . image-mode) - ("\\.xcf\\'" . image-mode) - ("\\.xmp\\'" . image-mode) - ("\\.xwd\\'" . image-mode) - ("\\.yuv\\'" . image-mode))) + ("\\.oxt\\'" . archive-mode) ;(Open|Libre)Office extensions. + ("\\.\\(deb\\|[oi]pk\\)\\'" . archive-mode) ; Debian/Opkg packages. + ;; Mailer puts message to be edited in + ;; /tmp/Re.... or Message + ("\\`/tmp/Re" . text-mode) + ("/Message[0-9]*\\'" . text-mode) + ;; some news reader is reported to use this + ("\\`/tmp/fol/" . text-mode) + ("\\.oak\\'" . scheme-mode) + ("\\.sgml?\\'" . sgml-mode) + ("\\.x[ms]l\\'" . xml-mode) + ("\\.dbk\\'" . xml-mode) + ("\\.dtd\\'" . sgml-mode) + ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) + ("\\.js[mx]?\\'" . javascript-mode) + ;; https://en.wikipedia.org/wiki/.har + ("\\.har\\'" . javascript-mode) + ("\\.json\\'" . js-json-mode) + ("\\.[ds]?va?h?\\'" . verilog-mode) + ("\\.by\\'" . bovine-grammar-mode) + ("\\.wy\\'" . wisent-grammar-mode) + ("\\.erts\\'" . erts-mode) + ;; .emacs or .gnus or .viper following a directory delimiter in + ;; Unix or MS-DOS syntax. + ("[:/\\]\\..*\\(emacs\\|gnus\\|viper\\)\\'" . emacs-lisp-mode) + ("\\`\\..*emacs\\'" . emacs-lisp-mode) + ;; _emacs following a directory delimiter in MS-DOS syntax + ("[:/]_emacs\\'" . emacs-lisp-mode) + ("/crontab\\.X*[0-9]+\\'" . shell-script-mode) + ("\\.ml\\'" . lisp-mode) + ;; Linux-2.6.9 uses some different suffix for linker scripts: + ;; "ld", "lds", "lds.S", "lds.in", "ld.script", and "ld.script.balo". + ;; eCos uses "ld" and "ldi". Netbsd uses "ldscript.*". + ("\\.ld[si]?\\'" . ld-script-mode) + ("ld\\.?script\\'" . ld-script-mode) + ;; .xs is also used for ld scripts, but seems to be more commonly + ;; associated with Perl .xs files (C with Perl bindings). (Bug#7071) + ("\\.xs\\'" . c-mode) + ;; Explained in binutils ld/genscripts.sh. Eg: + ;; A .x script file is the default script. + ;; A .xr script is for linking without relocation (-r flag). Etc. + ("\\.x[abdsru]?[cnw]?\\'" . ld-script-mode) + ("\\.zone\\'" . dns-mode) + ("\\.soa\\'" . dns-mode) + ;; Common Lisp ASDF package system. + ("\\.asd\\'" . lisp-mode) + ("\\.\\(asn\\|mib\\|smi\\)\\'" . snmp-mode) + ("\\.\\(as\\|mi\\|sm\\)2\\'" . snmpv2-mode) + ("\\.\\(diffs?\\|patch\\|rej\\)\\'" . diff-mode) + ("\\.\\(dif\\|pat\\)\\'" . diff-mode) ; for MS-DOS + ("\\.[eE]?[pP][sS]\\'" . ps-mode) + ("\\.\\(?:PDF\\|EPUB\\|CBZ\\|FB2\\|O?XPS\\|DVI\\|OD[FGPST]\\|DOCX\\|XLSX?\\|PPTX?\\|pdf\\|epub\\|cbz\\|fb2\\|o?xps\\|djvu\\|dvi\\|od[fgpst]\\|docx\\|xlsx?\\|pptx?\\)\\'" . doc-view-mode-maybe) + ("configure\\.\\(ac\\|in\\)\\'" . autoconf-mode) + ("\\.s\\(v\\|iv\\|ieve\\)\\'" . sieve-mode) + ("BROWSE\\'" . ebrowse-tree-mode) + ("\\.ebrowse\\'" . ebrowse-tree-mode) + ("#\\*mail\\*" . mail-mode) + ("\\.g\\'" . antlr-mode) + ("\\.mod\\'" . m2-mode) + ("\\.ses\\'" . ses-mode) + ("\\.docbook\\'" . sgml-mode) + ("\\.com\\'" . dcl-mode) + ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) + ("/\\.?\\(authinfo\\|netrc\\)\\'" . authinfo-mode) + ;; Windows candidates may be opened case sensitively on Unix + ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) + ("\\.la\\'" . conf-unix-mode) + ("\\.ppd\\'" . conf-ppd-mode) + ("java.+\\.conf\\'" . conf-javaprop-mode) + ("\\.properties\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-javaprop-mode) + ("\\.toml\\'" . conf-toml-mode) + ("\\.desktop\\'" . conf-desktop-mode) + ("/\\.redshift\\.conf\\'" . conf-windows-mode) + ("\\`/etc/\\(?:DIR_COLORS\\|ethers\\|.?fstab\\|.*hosts\\|lesskey\\|login\\.?de\\(?:fs\\|vperm\\)\\|magic\\|mtab\\|pam\\.d/.*\\|permissions\\(?:\\.d/.+\\)?\\|protocols\\|rpc\\|services\\)\\'" . conf-space-mode) + ("\\`/etc/\\(?:acpid?/.+\\|aliases\\(?:\\.d/.+\\)?\\|default/.+\\|group-?\\|hosts\\..+\\|inittab\\|ksysguarddrc\\|opera6rc\\|passwd-?\\|shadow-?\\|sysconfig/.+\\)\\'" . conf-mode) + ;; ChangeLog.old etc. Other change-log-mode entries are above; + ;; this has lower priority to avoid matching changelog.sgml etc. + ("[cC]hange[lL]og[-.][-0-9a-z]+\\'" . change-log-mode) + ;; either user's dot-files or under /etc or some such + ("/\\.?\\(?:gitconfig\\|gnokiirc\\|hgrc\\|kde.*rc\\|mime\\.types\\|wgetrc\\)\\'" . conf-mode) + ("/\\.mailmap\\'" . conf-unix-mode) + ;; alas not all ~/.*rc files are like this + ("/\\.\\(?:asound\\|enigma\\|fetchmail\\|gltron\\|gtk\\|hxplayer\\|mairix\\|mbsync\\|msmtp\\|net\\|neverball\\|nvidia-settings-\\|offlineimap\\|qt/.+\\|realplayer\\|reportbug\\|rtorrent\\.\\|screen\\|scummvm\\|sversion\\|sylpheed/.+\\|xmp\\)rc\\'" . conf-mode) + ("/\\.\\(?:gdbtkinit\\|grip\\|mpdconf\\|notmuch-config\\|orbital/.+txt\\|rhosts\\|tuxracer/options\\)\\'" . conf-mode) + ("/\\.?X\\(?:default\\|resource\\|re\\)s\\>" . conf-xdefaults-mode) + ("/X11.+app-defaults/\\|\\.ad\\'" . conf-xdefaults-mode) + ("/X11.+locale/.+/Compose\\'" . conf-colon-mode) + ;; this contains everything twice, with space and with colon :-( + ("/X11.+locale/compose\\.dir\\'" . conf-javaprop-mode) + ;; Get rid of any trailing .n.m and try again. + ;; This is for files saved by cvs-merge that look like .#. + ;; or .#.- or VC's .~~. + ;; Using mode nil rather than `ignore' would let the search continue + ;; through this list (with the shortened name) rather than start over. + ("\\.~?[0-9]+\\.[0-9][-.0-9]*~?\\'" nil t) + ("\\.\\(?:orig\\|in\\|[bB][aA][kK]\\)\\'" nil t) + ;; This should come after "in" stripping (e.g. config.h.in). + ;; *.cf, *.cfg, *.conf, *.config[.local|.de_DE.UTF8|...], */config + ("[/.]c\\(?:on\\)?f\\(?:i?g\\)?\\(?:\\.[a-zA-Z0-9._-]+\\)?\\'" . conf-mode-maybe) + ;; The following should come after the ChangeLog pattern + ;; for the sake of ChangeLog.1, etc. + ;; and after the .scm.[0-9] and CVS' . patterns too. + ("\\.[1-9]\\'" . nroff-mode) + ;; Image file types probably supported by `image-convert'. + ("\\.art\\'" . image-mode) + ("\\.avs\\'" . image-mode) + ("\\.bmp\\'" . image-mode) + ("\\.cmyk\\'" . image-mode) + ("\\.cmyka\\'" . image-mode) + ("\\.crw\\'" . image-mode) + ("\\.dcm\\'" . image-mode) + ("\\.dcr\\'" . image-mode) + ("\\.dcx\\'" . image-mode) + ("\\.dng\\'" . image-mode) + ("\\.dpx\\'" . image-mode) + ("\\.fax\\'" . image-mode) + ("\\.heic\\'" . image-mode) + ("\\.hrz\\'" . image-mode) + ("\\.icb\\'" . image-mode) + ("\\.icc\\'" . image-mode) + ("\\.icm\\'" . image-mode) + ("\\.ico\\'" . image-mode) + ("\\.icon\\'" . image-mode) + ("\\.jbg\\'" . image-mode) + ("\\.jbig\\'" . image-mode) + ("\\.jng\\'" . image-mode) + ("\\.jnx\\'" . image-mode) + ("\\.miff\\'" . image-mode) + ("\\.mng\\'" . image-mode) + ("\\.mvg\\'" . image-mode) + ("\\.otb\\'" . image-mode) + ("\\.p7\\'" . image-mode) + ("\\.pcx\\'" . image-mode) + ("\\.pdb\\'" . image-mode) + ("\\.pfa\\'" . image-mode) + ("\\.pfb\\'" . image-mode) + ("\\.picon\\'" . image-mode) + ("\\.pict\\'" . image-mode) + ("\\.rgb\\'" . image-mode) + ("\\.rgba\\'" . image-mode) + ("\\.six\\'" . image-mode) + ("\\.tga\\'" . image-mode) + ("\\.wbmp\\'" . image-mode) + ("\\.webp\\'" . image-mode) + ("\\.wmf\\'" . image-mode) + ("\\.wpg\\'" . image-mode) + ("\\.xcf\\'" . image-mode) + ("\\.xmp\\'" . image-mode) + ("\\.xwd\\'" . image-mode) + ("\\.yuv\\'" . image-mode)) "Alist of file name patterns vs corresponding major mode functions. Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL). \(NON-NIL stands for anything that is not nil; the value does not matter.) @@ -3293,34 +3288,31 @@ and `magic-mode-alist', which determines modes based on file contents.") ;; Note: The entries for the modes defined in cc-mode.el (awk-mode ;; and pike-mode) are added through autoload directives in that ;; file. - (mapcar - (lambda (l) - (cons (purecopy (car l)) (cdr l))) - '(("\\(mini\\)?perl5?" . perl-mode) - ("wishx?" . tcl-mode) - ("tcl\\(sh\\)?" . tcl-mode) - ("expect" . tcl-mode) - ("octave" . octave-mode) - ("scm" . scheme-mode) - ("[acjkwz]sh" . sh-mode) - ("r?bash2?" . sh-mode) - ("dash" . sh-mode) - ("mksh" . sh-mode) - ("\\(dt\\|pd\\|w\\)ksh" . sh-mode) - ("es" . sh-mode) - ("i?tcsh" . sh-mode) - ("oash" . sh-mode) - ("rc" . sh-mode) - ("rpm" . sh-mode) - ("sh5?" . sh-mode) - ("tail" . text-mode) - ("more" . text-mode) - ("less" . text-mode) - ("pg" . text-mode) - ("make" . makefile-gmake-mode) ; Debian uses this - ("guile" . scheme-mode) - ("clisp" . lisp-mode) - ("emacs" . emacs-lisp-mode))) + '(("\\(mini\\)?perl5?" . perl-mode) + ("wishx?" . tcl-mode) + ("tcl\\(sh\\)?" . tcl-mode) + ("expect" . tcl-mode) + ("octave" . octave-mode) + ("scm" . scheme-mode) + ("[acjkwz]sh" . sh-mode) + ("r?bash2?" . sh-mode) + ("dash" . sh-mode) + ("mksh" . sh-mode) + ("\\(dt\\|pd\\|w\\)ksh" . sh-mode) + ("es" . sh-mode) + ("i?tcsh" . sh-mode) + ("oash" . sh-mode) + ("rc" . sh-mode) + ("rpm" . sh-mode) + ("sh5?" . sh-mode) + ("tail" . text-mode) + ("more" . text-mode) + ("less" . text-mode) + ("pg" . text-mode) + ("make" . makefile-gmake-mode) ; Debian uses this + ("guile" . scheme-mode) + ("clisp" . lisp-mode) + ("emacs" . emacs-lisp-mode)) "Alist mapping interpreter names to major modes. This is used for files whose first lines match `auto-mode-interpreter-regexp'. Each element looks like (REGEXP . MODE). @@ -3334,13 +3326,13 @@ See also `auto-mode-alist'.") ;; because we are duplicating info from auto-mode-alist. ;; TODO many elements of this list are also in auto-coding-alist. (defvar inhibit-local-variables-regexps - (mapcar 'purecopy '("\\.tar\\'" "\\.t[bg]z\\'" - "\\.arc\\'" "\\.zip\\'" "\\.lzh\\'" "\\.lha\\'" - "\\.zoo\\'" "\\.[jew]ar\\'" "\\.xpi\\'" "\\.rar\\'" - "\\.7z\\'" - "\\.sx[dmicw]\\'" "\\.odt\\'" - "\\.diff\\'" "\\.patch\\'" - "\\.tiff?\\'" "\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'")) + '("\\.tar\\'" "\\.t[bg]z\\'" + "\\.arc\\'" "\\.zip\\'" "\\.lzh\\'" "\\.lha\\'" + "\\.zoo\\'" "\\.[jew]ar\\'" "\\.xpi\\'" "\\.rar\\'" + "\\.7z\\'" + "\\.sx[dmicw]\\'" "\\.odt\\'" + "\\.diff\\'" "\\.patch\\'" + "\\.tiff?\\'" "\\.gif\\'" "\\.png\\'" "\\.jpe?g\\'") "List of regexps matching file names in which to ignore local variables. This includes `-*-' lines as well as trailing \"Local Variables\" sections. Files matching this list are typically binary file formats. @@ -3381,25 +3373,24 @@ and `inhibit-local-variables-suffixes'. If temp)) (defvar auto-mode-interpreter-regexp - (purecopy - (concat - "#![ \t]*" - ;; Optional group 1: env(1) invocation. - "\\(" - "[^ \t\n]*/bin/env[ \t]*" - ;; Within group 1: possible -S/--split-string and environment - ;; adjustments. - "\\(?:" - ;; -S/--split-string - "\\(?:-[0a-z]*S[ \t]*\\|--split-string=\\)" - ;; More env arguments. - "\\(?:-[^ \t\n]+[ \t]+\\)*" - ;; Interpreter environment modifications. - "\\(?:[^ \t\n]+=[^ \t\n]*[ \t]+\\)*" - "\\)?" - "\\)?" - ;; Group 2: interpreter. - "\\([^ \t\n]+\\)")) + (concat + "#![ \t]*" + ;; Optional group 1: env(1) invocation. + "\\(" + "[^ \t\n]*/bin/env[ \t]*" + ;; Within group 1: possible -S/--split-string and environment + ;; adjustments. + "\\(?:" + ;; -S/--split-string + "\\(?:-[0a-z]*S[ \t]*\\|--split-string=\\)" + ;; More env arguments. + "\\(?:-[^ \t\n]+[ \t]+\\)*" + ;; Interpreter environment modifications. + "\\(?:[^ \t\n]+=[^ \t\n]*[ \t]+\\)*" + "\\)?" + "\\)?" + ;; Group 2: interpreter. + "\\([^ \t\n]+\\)") "Regexp matching interpreters, for file mode determination. This regular expression is matched against the first line of a file to determine the file's mode in `set-auto-mode'. If it matches, the file @@ -3420,7 +3411,6 @@ If FUNCTION is nil, then it is not called. (That is a way of saying (put 'magic-mode-alist 'risky-local-variable t) (defvar magic-fallback-mode-alist - (purecopy `((image-type-auto-detected-p . image-mode) ("\\(PK00\\)?[P]K\003\004" . archive-mode) ; zip ;; The < comes before the groups (but the first) to reduce backtracking. @@ -3442,7 +3432,7 @@ If FUNCTION is nil, then it is not called. (That is a way of saying . sgml-mode) ("\320\317\021\340\241\261\032\341" . doc-view-mode-maybe) ; Word documents 1997-2004 ("%!PS" . ps-mode) - ("# xmcd " . conf-unix-mode))) + ("# xmcd " . conf-unix-mode)) "Like `magic-mode-alist' but has lower priority than `auto-mode-alist'. Each element looks like (REGEXP . FUNCTION) or (MATCH-FUNCTION . FUNCTION). After visiting a file, if REGEXP matches the text at the beginning of the @@ -6251,7 +6241,7 @@ Before and after saving the buffer, this function runs (set-buffer-modified-p nil)) ;; Return t so we don't ask about BUF again. t) - ,(purecopy "skip this buffer and mark it unmodified")) + "skip this buffer and mark it unmodified") (?\C-r ,(lambda (buf) (if (not enable-recursive-minibuffers) @@ -6261,12 +6251,12 @@ Before and after saving the buffer, this function runs (recursive-edit)) ;; Return nil to ask about BUF again. nil) - ,(purecopy "view this buffer")) + "view this buffer") (?\C-f ,(lambda (buf) (funcall save-some-buffers--switch-window-callback buf) (setq quit-flag t)) - ,(purecopy "view this buffer and quit")) + "view this buffer and quit") (?d ,(lambda (buf) (if (null (buffer-file-name buf)) (message "Not applicable: no file") @@ -6280,7 +6270,7 @@ Before and after saving the buffer, this function runs (recursive-edit)))) ;; Return nil to ask about BUF again. nil) - ,(purecopy "view changes in this buffer"))) + "view changes in this buffer")) "ACTION-ALIST argument used in call to `map-y-or-n-p'.") (put 'save-some-buffers-action-alist 'risky-local-variable t) @@ -7776,14 +7766,12 @@ by `sh' are supported." ;; not its part. Make the regexp say so. (concat "\\`" result "\\'"))) -(defcustom list-directory-brief-switches - (purecopy "-CF") +(defcustom list-directory-brief-switches "-CF" "Switches for `list-directory' to pass to `ls' for brief listing." :type 'string :group 'dired) -(defcustom list-directory-verbose-switches - (purecopy "-l") +(defcustom list-directory-verbose-switches "-l" "Switches for `list-directory' to pass to `ls' for verbose listing." :type 'string :group 'dired) @@ -8038,8 +8026,8 @@ need to be passed verbatim to shell commands." (defcustom insert-directory-program (if (and (memq system-type '(berkeley-unix darwin)) (executable-find "gls")) - (purecopy "gls") - (purecopy "ls")) + "gls" + "ls") "Absolute or relative name of the `ls'-like program. This is used by `insert-directory' and `dired-insert-directory' \(thus, also by `dired'). For Dired, this should ideally point to @@ -8068,7 +8056,7 @@ Return nil if we should prefer `ls-lisp' instead." t) insert-directory-program)) -(defcustom directory-free-space-program (purecopy "df") +(defcustom directory-free-space-program "df" "Program to get the amount of free space on a file system. We assume the output has the format of `df'. The value of this variable must be just a command name or file name; @@ -8082,7 +8070,7 @@ A value of nil disables this feature." "27.1") (defcustom directory-free-space-args - (purecopy (if (eq system-type 'darwin) "-k" "-Pk")) + (if (eq system-type 'darwin) "-k" "-Pk") "Options to use when running `directory-free-space-program'." :type 'string :group 'dired) @@ -8147,11 +8135,11 @@ If DIR's free space cannot be obtained, this function returns nil." ;; parentheses: ;; -rw-r--r-- (modified) 2005-10-22 21:25 files.el ;; This is not supported yet. - (purecopy (concat "\\([0-9][BkKMGTPEZYRQ]? " iso - "\\|.*[0-9][BkKMGTPEZYRQ]? " - "\\(" western "\\|" western-comma - "\\|" DD-MMM-YYYY "\\|" east-asian "\\)" - "\\) +"))) + (concat "\\([0-9][BkKMGTPEZYRQ]? " iso + "\\|.*[0-9][BkKMGTPEZYRQ]? " + "\\(" western "\\|" western-comma + "\\|" DD-MMM-YYYY "\\|" east-asian "\\)" + "\\) +")) "Regular expression to match up to the file name in a directory listing. The default value is designed to recognize dates and times regardless of the language.") @@ -8617,7 +8605,7 @@ arguments as the running Emacs)." ;; so that magic file name handlers will not apply to it. (setq file-name-handler-alist - (cons (cons (purecopy "\\`/:") 'file-name-non-special) + (cons '("\\`/:" . file-name-non-special) file-name-handler-alist)) ;; We depend on being the last handler on the list, diff --git a/lisp/find-file.el b/lisp/find-file.el index 7d9274efc83..9584a63189c 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -182,7 +182,7 @@ To override this, give an argument to `ff-find-other-file'." ;;;###autoload (defcustom ff-special-constructs ;; C/C++ include, for NeXTstep too - `((,(purecopy "^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") . + `(("^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]" . ,(lambda () (match-string 2)))) ;; We include `ff-treat-as-special' documentation here so that autoload ;; can make it available to be read prior to loading this file. diff --git a/lisp/format.el b/lisp/format.el index 1f160ed6921..855d7a73f92 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -65,27 +65,26 @@ (put 'buffer-auto-save-file-format 'permanent-local t) (defvar format-alist - ;; FIXME: maybe each item can be purecopied instead of just the strings. - `((text/enriched ,(purecopy "Extended MIME text/enriched format.") - ,(purecopy "Content-[Tt]ype:[ \t]*text/enriched") + `((text/enriched "Extended MIME text/enriched format." + "Content-[Tt]ype:[ \t]*text/enriched" enriched-decode enriched-encode t enriched-mode) - (plain ,(purecopy "ISO 8859-1 standard format, no text properties.") + (plain "ISO 8859-1 standard format, no text properties." ;; Plain only exists so that there is an obvious neutral choice in ;; the completion list. nil nil nil nil nil) - (TeX ,(purecopy "TeX (encoding)") + (TeX "TeX (encoding)" nil iso-tex2iso iso-iso2tex t nil) - (gtex ,(purecopy "German TeX (encoding)") + (gtex "German TeX (encoding)" nil iso-gtex2iso iso-iso2gtex t nil) - (html ,(purecopy "HTML/SGML \"ISO 8879:1986//ENTITIES Added Latin 1//EN\" (encoding)") + (html "HTML/SGML \"ISO 8879:1986//ENTITIES Added Latin 1//EN\" (encoding)" nil iso-sgml2iso iso-iso2sgml t nil) - (rot13 ,(purecopy "rot13") + (rot13 "rot13" nil rot13-region rot13-region t nil) - (duden ,(purecopy "Duden Ersatzdarstellung") + (duden "Duden Ersatzdarstellung" nil ;; FROM-FN used to call the "diac" command which is not widely ;; available and apparently not under a free software license: @@ -93,14 +92,14 @@ ;; Reliable round-trip conversion is not possible anyway and ;; would be by heuristic method, so make it write-only for now. iso-cvt-write-only iso-iso2duden t nil) - (de646 ,(purecopy "German ASCII (ISO 646)") + (de646 "German ASCII (ISO 646)" nil - ,(purecopy "iconv -f iso646-de -t utf-8") - ,(purecopy "iconv -f utf-8 -t iso646-de") t nil) - (denet ,(purecopy "net German") + "iconv -f iso646-de -t utf-8" + "iconv -f utf-8 -t iso646-de" t nil) + (denet "net German" nil iso-german iso-cvt-read-only t nil) - (esnet ,(purecopy "net Spanish") + (esnet "net Spanish" nil iso-spanish iso-cvt-read-only t nil)) "List of information about understood file formats. diff --git a/lisp/help-mode.el b/lisp/help-mode.el index f57ec02da4e..4ea4250556f 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -172,92 +172,92 @@ The format is (FUNCTION ARGS...).") (define-button-type 'help-function :supertype 'help-xref 'help-function 'describe-function - 'help-echo (purecopy "mouse-2, RET: describe this function")) + 'help-echo "mouse-2, RET: describe this function") (define-button-type 'help-variable :supertype 'help-xref 'help-function 'describe-variable - 'help-echo (purecopy "mouse-2, RET: describe this variable")) + 'help-echo "mouse-2, RET: describe this variable") (define-button-type 'help-type :supertype 'help-xref 'help-function #'cl-describe-type - 'help-echo (purecopy "mouse-2, RET: describe this type")) + 'help-echo "mouse-2, RET: describe this type") (define-button-type 'help-face :supertype 'help-xref 'help-function 'describe-face - 'help-echo (purecopy "mouse-2, RET: describe this face")) + 'help-echo "mouse-2, RET: describe this face") (define-button-type 'help-coding-system :supertype 'help-xref 'help-function 'describe-coding-system - 'help-echo (purecopy "mouse-2, RET: describe this coding system")) + 'help-echo "mouse-2, RET: describe this coding system") (define-button-type 'help-input-method :supertype 'help-xref 'help-function 'describe-input-method - 'help-echo (purecopy "mouse-2, RET: describe this input method")) + 'help-echo "mouse-2, RET: describe this input method") (define-button-type 'help-character-set :supertype 'help-xref 'help-function 'describe-character-set - 'help-echo (purecopy "mouse-2, RET: describe this character set")) + 'help-echo "mouse-2, RET: describe this character set") ;; Make some more idiosyncratic button types. (define-button-type 'help-symbol :supertype 'help-xref 'help-function #'describe-symbol - 'help-echo (purecopy "mouse-2, RET: describe this symbol")) + 'help-echo "mouse-2, RET: describe this symbol") (define-button-type 'help-back :supertype 'help-xref 'help-function #'help-xref-go-back - 'help-echo (purecopy "mouse-2, RET: go back to previous help buffer")) + 'help-echo "mouse-2, RET: go back to previous help buffer") (define-button-type 'help-forward :supertype 'help-xref 'help-function #'help-xref-go-forward - 'help-echo (purecopy "mouse-2, RET: move forward to next help buffer")) + 'help-echo "mouse-2, RET: move forward to next help buffer") (define-button-type 'help-info-variable :supertype 'help-xref ;; the name of the variable is put before the argument to Info 'help-function (lambda (_a v) (info v)) - 'help-echo (purecopy "mouse-2, RET: read this Info node")) + 'help-echo "mouse-2, RET: read this Info node") (define-button-type 'help-info :supertype 'help-xref 'help-function #'info - 'help-echo (purecopy "mouse-2, RET: read this Info node")) + 'help-echo "mouse-2, RET: read this Info node") (define-button-type 'help-man :supertype 'help-xref 'help-function #'man - 'help-echo (purecopy "mouse-2, RET: read this man page")) + 'help-echo "mouse-2, RET: read this man page") (define-button-type 'help-customization-group :supertype 'help-xref 'help-function #'customize-group - 'help-echo (purecopy "mouse-2, RET: display this customization group")) + 'help-echo "mouse-2, RET: display this customization group") (define-button-type 'help-url :supertype 'help-xref 'help-function #'browse-url - 'help-echo (purecopy "mouse-2, RET: view this URL in a browser")) + 'help-echo "mouse-2, RET: view this URL in a browser") (define-button-type 'help-customize-variable :supertype 'help-xref 'help-function (lambda (v) - (customize-variable v)) - 'help-echo (purecopy "mouse-2, RET: customize variable")) + (customize-variable v)) + 'help-echo "mouse-2, RET: customize variable") (define-button-type 'help-customize-face :supertype 'help-xref 'help-function (lambda (v) - (customize-face v)) - 'help-echo (purecopy "mouse-2, RET: customize face")) + (customize-face v)) + 'help-echo "mouse-2, RET: customize face") (defun help-function-def--button-function (fun &optional file type) (or file @@ -295,7 +295,7 @@ The format is (FUNCTION ARGS...).") (define-button-type 'help-function-def :supertype 'help-xref 'help-function #'help-function-def--button-function - 'help-echo (purecopy "mouse-2, RET: find function's definition")) + 'help-echo "mouse-2, RET: find function's definition") (define-button-type 'help-function-cmacro ; FIXME: Obsolete since 24.4. :supertype 'help-xref @@ -316,7 +316,7 @@ The format is (FUNCTION ARGS...).") (forward-line 0) (message "Unable to find location in file"))) (message "Unable to find file"))) - 'help-echo (purecopy "mouse-2, RET: find function's compiler macro")) + 'help-echo "mouse-2, RET: find function's compiler macro") (define-button-type 'help-variable-def :supertype 'help-xref @@ -337,7 +337,7 @@ The format is (FUNCTION ARGS...).") (widen)) (goto-char position)) (message "Unable to find location in file")))) - 'help-echo (purecopy "mouse-2, RET: find variable's definition")) + 'help-echo "mouse-2, RET: find variable's definition") (define-button-type 'help-face-def :supertype 'help-xref @@ -359,27 +359,27 @@ The format is (FUNCTION ARGS...).") (widen)) (goto-char position)) (message "Unable to find location in file")))) - 'help-echo (purecopy "mouse-2, RET: find face's definition")) + 'help-echo "mouse-2, RET: find face's definition") (define-button-type 'help-package :supertype 'help-xref 'help-function 'describe-package - 'help-echo (purecopy "mouse-2, RET: Describe package")) + 'help-echo "mouse-2, RET: Describe package") (define-button-type 'help-package-def :supertype 'help-xref 'help-function (lambda (file) (dired file)) - 'help-echo (purecopy "mouse-2, RET: visit package directory")) + 'help-echo "mouse-2, RET: visit package directory") (define-button-type 'help-theme-def :supertype 'help-xref 'help-function #'find-file - 'help-echo (purecopy "mouse-2, RET: visit theme file")) + 'help-echo "mouse-2, RET: visit theme file") (define-button-type 'help-theme-edit :supertype 'help-xref 'help-function #'customize-create-theme - 'help-echo (purecopy "mouse-2, RET: edit this theme file")) + 'help-echo "mouse-2, RET: edit this theme file") (define-button-type 'help-dir-local-var-def :supertype 'help-xref @@ -387,7 +387,7 @@ The format is (FUNCTION ARGS...).") ;; FIXME: this should go to the point where the ;; local variable was defined. (find-file file)) - 'help-echo (purecopy "mouse-2, RET: open directory-local variables file")) + 'help-echo "mouse-2, RET: open directory-local variables file") (define-button-type 'help-news :supertype 'help-xref 'help-function @@ -396,7 +396,7 @@ The format is (FUNCTION ARGS...).") (view-file file) (view-file-other-window file)) (goto-char pos)) - 'help-echo (purecopy "mouse-2, RET: show corresponding NEWS announcement")) + 'help-echo "mouse-2, RET: show corresponding NEWS announcement") ;;;###autoload (defun help-mode--add-function-link (str fun) @@ -448,21 +448,21 @@ Commands: ;; similar should be done for widget doc strings, which currently use ;; another mechanism. -(defvar help-back-label (purecopy "[back]") +(defvar help-back-label "[back]" "Label to use by `help-make-xrefs' for the go-back reference.") -(defvar help-forward-label (purecopy "[forward]") +(defvar help-forward-label "[forward]" "Label to use by `help-make-xrefs' for the go-forward reference.") (defconst help-xref-symbol-regexp - (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var - "\\(function\\|command\\|call\\)\\|" ; Link to function - "\\(face\\)\\|" ; Link to face - "\\(symbol\\|program\\|property\\)\\|" ; Don't link - "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" - "[ \t\n]+\\)?" - "\\(\\\\\\+\\)?" - "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]")) + (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var + "\\(function\\|command\\|call\\)\\|" ; Link to function + "\\(face\\)\\|" ; Link to face + "\\(symbol\\|program\\|property\\)\\|" ; Don't link + "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" + "[ \t\n]+\\)?" + "\\(\\\\\\+\\)?" + "['`‘]\\(\\(?:\\sw\\|\\s_\\)+\\|`\\)['’]") "Regexp matching doc string references to symbols. The words preceding the quoted symbol can be used in doc strings to @@ -477,21 +477,19 @@ when help commands related to multilingual environment (e.g., (defconst help-xref-info-regexp - (purecopy - "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]") + "\\<[Ii]nfo[ \t\n]+\\(node\\|anchor\\)[ \t\n]+['`‘]\\([^'’]+\\)['’]" "Regexp matching doc string references to an Info node.") (defconst help-xref-man-regexp - (purecopy - "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]") + "\\<[Mm]an[ \t\n]+page[ \t\n]+\\(?:for[ \t\n]+\\)?['`‘\"]\\([^'’\"]+\\)['’\"]" "Regexp matching doc string references to a man page.") (defconst help-xref-customization-group-regexp - (purecopy "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]") + "\\<[Cc]ustomization[ \t\n]+[Gg]roup[ \t\n]+['`‘]\\([^'’]+\\)['’]" "Regexp matching doc string references to a customization group.") (defconst help-xref-url-regexp - (purecopy "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]") + "\\<[Uu][Rr][Ll][ \t\n]+['`‘]\\([^'’]+\\)['’]" "Regexp matching doc string references to a URL.") ;;;###autoload diff --git a/lisp/help.el b/lisp/help.el index 053403af505..a5f65866c01 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -395,7 +395,7 @@ Do not call this in the scope of `with-help-window'." (defalias 'help #'help-for-help) (make-help-screen help-for-help - (purecopy "Type a help option: [abcCdefFgiIkKlLmnprstvw.] C-[cdefmnoptw] or ?") + "Type a help option: [abcCdefFgiIkKlLmnprstvw.] C-[cdefmnoptw] or ?" (concat "(Type " (help--key-description-fontified (kbd "")) diff --git a/lisp/image-file.el b/lisp/image-file.el index 5ae8fd49d4d..0f61d51b0f4 100644 --- a/lisp/image-file.el +++ b/lisp/image-file.el @@ -37,7 +37,7 @@ ;;;###autoload (defcustom image-file-name-extensions - (purecopy '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "webp")) + '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg" "webp") "A list of image-file filename extensions. Filenames having one of these extensions are considered image files, in addition to those matching `image-file-name-regexps'. diff --git a/lisp/info.el b/lisp/info.el index f22e085a69d..7a34b43369e 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -830,7 +830,7 @@ Select the window used, if it has been made." (select-window window)))) -;;;###autoload (put 'info 'info-file (purecopy "emacs")) +;;;###autoload (put 'info 'info-file "emacs") ;;;###autoload (defun info (&optional file-or-node buffer) "Enter Info, the documentation browser. @@ -4755,7 +4755,7 @@ in the first element of the returned list (which is treated specially in (cdr where)) where))) -;;;###autoload (put 'Info-goto-emacs-command-node 'info-file (purecopy "emacs")) +;;;###autoload (put 'Info-goto-emacs-command-node 'info-file "emacs") ;;;###autoload (defun Info-goto-emacs-command-node (command) "Go to the Info node in the Emacs manual for command COMMAND. @@ -4797,7 +4797,7 @@ COMMAND must be a symbol or string." (if (> num-matches 2) "them" "it"))))) (error "Couldn't find documentation for %s" command)))) -;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file (purecopy "emacs")) +;;;###autoload (put 'Info-goto-emacs-key-command-node 'info-file "emacs") ;;;###autoload (defun Info-goto-emacs-key-command-node (key) "Go to the node in the Emacs manual which describes the command bound to KEY. diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index f76963068f7..aaa72f961bc 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -33,8 +33,6 @@ ;; Setup font-encoding-alist for all known encodings. (setq font-encoding-alist - (mapcar (lambda (arg) - (cons (purecopy (car arg)) (cdr arg))) '(("iso8859-1$" . iso-8859-1) ("iso8859-2$" . iso-8859-2) ("iso8859-3$" . iso-8859-3) @@ -122,7 +120,7 @@ ("mulelao-1" . mule-lao) ("muletibetan-2" . tibetan) ("muletibetan-0" . tibetan) - ("muletibetan-1" . tibetan-1-column)))) + ("muletibetan-1" . tibetan-1-column))) (defvar font-encoding-charset-alist) @@ -1244,17 +1242,17 @@ Internal use only. Should be called at startup time." ;; Setting for suppressing XLoadQueryFont on big fonts. (setq x-pixel-size-width-font-regexp - (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5")) + "gb2312\\|gbk\\|gb18030\\|jisx0208\\|ksc5601\\|cns11643\\|big5") ;; These fonts require vertical centering. (setq vertical-centering-font-regexp - (purecopy "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5")) + "gb2312\\|gbk\\|gb18030\\|jisx0208\\|jisx0212\\|ksc5601\\|cns11643\\|big5") (put 'vertical-centering-font-regexp 'standard-value (list vertical-centering-font-regexp)) ;; CDAC fonts are actually smaller than their design sizes. (setq face-font-rescale-alist - (list (cons (purecopy "-cdac$") 1.3))) + (list '("-cdac$" . 1.3))) (defvar x-font-name-charset-alist nil "This variable has no meaning starting with Emacs 22.1.") @@ -1574,7 +1572,7 @@ It returns a name of the created fontset." ;; specified here because FAMILY of those fonts are not "fixed" in ;; many cases. (defvar standard-fontset-spec - (purecopy "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard") + "-*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard" "String of fontset spec of the standard fontset. You have the biggest chance to display international characters with correct glyphs by using the standard fontset. diff --git a/lisp/international/latexenc.el b/lisp/international/latexenc.el index fbcd7364f73..1b735810ee4 100644 --- a/lisp/international/latexenc.el +++ b/lisp/international/latexenc.el @@ -51,7 +51,6 @@ ;;;###autoload (defcustom latex-inputenc-coding-alist - (purecopy '(("ansinew" . windows-1252) ; MS Windows ANSI encoding, extension of Latin-1 ("applemac" . mac-roman) ("ascii" . us-ascii) @@ -74,7 +73,7 @@ ;; ("macce" . undecided) ; Apple Central European ("next" . next) ; The Next encoding ("utf8" . utf-8) - ("utf8x" . utf-8))) ; used by the Unicode LaTeX package + ("utf8x" . utf-8)) ; used by the Unicode LaTeX package "Mapping from LaTeX encodings in \"inputenc.sty\" to Emacs coding systems. LaTeX encodings are specified with \"\\usepackage[encoding]{inputenc}\". Used by the function `latexenc-find-file-coding-system'." diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 4caefb75b28..991fa589782 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -59,97 +59,97 @@ (defvar describe-language-environment-map (let ((map (make-sparse-keymap "Describe Language Environment"))) - (bindings--define-key map + (define-key map [Default] '(menu-item "Default" describe-specified-language-support)) map)) (defvar setup-language-environment-map (let ((map (make-sparse-keymap "Set Language Environment"))) - (bindings--define-key map + (define-key map [Default] '(menu-item "Default" setup-specified-language-environment)) map)) (defvar set-coding-system-map (let ((map (make-sparse-keymap "Set Coding System"))) - (bindings--define-key map [set-buffer-process-coding-system] + (define-key map [set-buffer-process-coding-system] '(menu-item "For I/O with Subprocess" set-buffer-process-coding-system :visible (fboundp 'make-process) :enable (get-buffer-process (current-buffer)) :help "How to en/decode I/O from/to subprocess connected to this buffer")) - (bindings--define-key map [set-next-selection-coding-system] + (define-key map [set-next-selection-coding-system] '(menu-item "For Next X Selection" set-next-selection-coding-system :visible (display-selections-p) :help "How to en/decode next selection/clipboard operation")) - (bindings--define-key map [set-selection-coding-system] + (define-key map [set-selection-coding-system] '(menu-item "For X Selections/Clipboard" set-selection-coding-system :visible (display-selections-p) :help "How to en/decode data to/from selection/clipboard")) - (bindings--define-key map [separator-3] menu-bar-separator) - (bindings--define-key map [set-terminal-coding-system] + (define-key map [separator-3] menu-bar-separator) + (define-key map [set-terminal-coding-system] '(menu-item "For Terminal" set-terminal-coding-system :enable (null (memq initial-window-system '(x w32 ns haiku pgtk android))) :help "How to encode terminal output")) - (bindings--define-key map [set-keyboard-coding-system] + (define-key map [set-keyboard-coding-system] '(menu-item "For Keyboard" set-keyboard-coding-system :help "How to decode keyboard input")) - (bindings--define-key map [separator-2] menu-bar-separator) - (bindings--define-key map [set-file-name-coding-system] + (define-key map [separator-2] menu-bar-separator) + (define-key map [set-file-name-coding-system] '(menu-item "For File Name" set-file-name-coding-system :help "How to decode/encode file names")) - (bindings--define-key map [revert-buffer-with-coding-system] + (define-key map [revert-buffer-with-coding-system] '(menu-item "For Reverting This File Now" revert-buffer-with-coding-system :enable buffer-file-name :help "Revisit this file immediately using specified coding system")) - (bindings--define-key map [set-buffer-file-coding-system] + (define-key map [set-buffer-file-coding-system] '(menu-item "For Saving This Buffer" set-buffer-file-coding-system :help "How to encode this buffer when saved")) - (bindings--define-key map [separator-1] menu-bar-separator) - (bindings--define-key map [universal-coding-system-argument] + (define-key map [separator-1] menu-bar-separator) + (define-key map [universal-coding-system-argument] '(menu-item "For Next Command" universal-coding-system-argument :help "Coding system to be used by next command")) map)) (defvar mule-menu-keymap (let ((map (make-sparse-keymap "Mule (Multilingual Environment)"))) - (bindings--define-key map [mule-diag] + (define-key map [mule-diag] '(menu-item "Show All Multilingual Settings" mule-diag :help "Display multilingual environment settings")) - (bindings--define-key map [list-character-sets] + (define-key map [list-character-sets] '(menu-item "List Character Sets" list-character-sets :help "Show table of available character sets")) - (bindings--define-key map [describe-coding-system] + (define-key map [describe-coding-system] '(menu-item "Describe Coding System..." describe-coding-system)) - (bindings--define-key map [describe-input-method] + (define-key map [describe-input-method] '(menu-item "Describe Input Method..." describe-input-method :help "Keyboard layout for a specific input method")) - (bindings--define-key map [describe-language-environment] + (define-key map [describe-language-environment] `(menu-item "Describe Language Environment" ,describe-language-environment-map :help "Show multilingual settings for a specific language")) - (bindings--define-key map [separator-coding-system] menu-bar-separator) - (bindings--define-key map [view-hello-file] + (define-key map [separator-coding-system] menu-bar-separator) + (define-key map [view-hello-file] '(menu-item "Show Multilingual Sample Text" view-hello-file :enable (file-readable-p (expand-file-name "HELLO" data-directory)) :help "Demonstrate various character sets")) - (bindings--define-key map [set-various-coding-system] + (define-key map [set-various-coding-system] `(menu-item "Set Coding Systems" ,set-coding-system-map)) - (bindings--define-key map [separator-input-method] menu-bar-separator) - (bindings--define-key map [activate-transient-input-method] + (define-key map [separator-input-method] menu-bar-separator) + (define-key map [activate-transient-input-method] '(menu-item "Transient Input Method" activate-transient-input-method)) - (bindings--define-key map [set-input-method] + (define-key map [set-input-method] '(menu-item "Select Input Method..." set-input-method)) - (bindings--define-key map [toggle-input-method] + (define-key map [toggle-input-method] '(menu-item "Toggle Input Method" toggle-input-method)) - (bindings--define-key map [separator-mule] menu-bar-separator) - (bindings--define-key map [set-language-environment] + (define-key map [separator-mule] menu-bar-separator) + (define-key map [set-language-environment] `(menu-item "Set Language Environment" ,setup-language-environment-map)) map) "Keymap for Mule (Multilingual environment) menu specific commands.") @@ -169,14 +169,14 @@ ;;; Mule related hyperlinks. (defconst help-xref-mule-regexp-template - (purecopy (concat "\\(\\<\\(" - "\\(coding system\\)\\|" - "\\(input method\\)\\|" - "\\(character set\\)\\|" - "\\(charset\\)" - "\\)\\s-+\\)?" - ;; Note starting with word-syntax character: - "['`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]"))) + (concat "\\(\\<\\(" + "\\(coding system\\)\\|" + "\\(input method\\)\\|" + "\\(character set\\)\\|" + "\\(charset\\)" + "\\)\\s-+\\)?" + ;; Note starting with word-syntax character: + "['`‘]\\(\\sw\\(\\sw\\|\\s_\\)+\\)['’]")) (defun coding-system-change-eol-conversion (coding-system eol-type) "Return a coding system which differs from CODING-SYSTEM in EOL conversion. @@ -1201,7 +1201,7 @@ Arguments are the same as `set-language-info'." (progn (setq key-slot (list key)) (setcdr lang-slot (cons key-slot (cdr lang-slot))))) - (setcdr key-slot (purecopy info)) + (setcdr key-slot info) ;; Update the custom-type of `current-language-environment'. (put 'current-language-environment 'custom-type (cons 'choice (mapcar @@ -1229,10 +1229,8 @@ where to put this language environment in the Describe Language Environment and Set Language Environment menus. For example, (\"European\") means to put this language environment in the European submenu in each of those two menus." - (cond ((symbolp lang-env) - (setq lang-env (symbol-name lang-env))) - ((stringp lang-env) - (setq lang-env (purecopy lang-env)))) + (when (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) (if parents (while parents (let (describe-map setup-map parent-symbol parent prompt) @@ -1439,13 +1437,11 @@ The commands `describe-input-method' and `list-input-methods' need these duplicated values to show some information about input methods without loading the relevant Quail packages. \n(fn INPUT-METHOD LANG-ENV ACTIVATE-FUNC TITLE DESCRIPTION &rest ARGS)" - (setq lang-env (if (symbolp lang-env) - (symbol-name lang-env) - (purecopy lang-env))) - (setq input-method (if (symbolp input-method) - (symbol-name input-method) - (purecopy input-method))) - (setq args (mapcar #'purecopy args)) + + (when (symbolp lang-env) + (setq lang-env (symbol-name lang-env))) + (when (symbolp input-method) + (setq input-method (symbol-name input-method))) (let ((info (cons lang-env args)) (slot (assoc input-method input-method-alist))) (if slot @@ -2252,12 +2248,8 @@ See `set-language-info-alist' for use in programs." (defvar locale-translation-file-name nil "File name for the system's file of locale-name aliases, or nil if none.") -;; The following definitions might as well be marked as constants and -;; purecopied, since they're normally used on startup, and probably -;; should reflect the facilities of the base Emacs. (defconst locale-language-names - (purecopy - '( + '( ;; Locale names of the form LANGUAGE[_TERRITORY][.CODESET][@MODIFIER] ;; as specified in the Single Unix Spec, Version 2. ;; LANGUAGE is a language code taken from ISO 639:1988 (E/F) @@ -2515,7 +2507,7 @@ See `set-language-info-alist' for use in programs." ; mwk MS-Windows Mohawk (Canada) ("uig" . "UTF-8") ; MS-Windows Uighur ("kin" . "UTF-8") ; MS-Windows Kinyarwanda - )) + ) "Alist of locale regexps vs the corresponding languages and coding systems. Each element has this form: (LOCALE-REGEXP LANG-ENV CODING-SYSTEM) @@ -2528,18 +2520,17 @@ In this case, LANG-ENV is one of generic language environments for an specific encoding such as \"Latin-1\" and \"UTF-8\".") (defconst locale-charset-language-names - (purecopy - '((".*8859[-_]?1\\>" . "Latin-1") - (".*8859[-_]?2\\>" . "Latin-2") - (".*8859[-_]?3\\>" . "Latin-3") - (".*8859[-_]?4\\>" . "Latin-4") - (".*8859[-_]?9\\>" . "Latin-5") - (".*8859[-_]?14\\>" . "Latin-8") - (".*8859[-_]?15\\>" . "Latin-9") - (".*utf\\(?:-?8\\)?\\>" . "UTF-8") - ;; utf-8@euro exists, so put this last. (@euro really specifies - ;; the currency, rather than the charset.) - (".*@euro\\>" . "Latin-9"))) + '((".*8859[-_]?1\\>" . "Latin-1") + (".*8859[-_]?2\\>" . "Latin-2") + (".*8859[-_]?3\\>" . "Latin-3") + (".*8859[-_]?4\\>" . "Latin-4") + (".*8859[-_]?9\\>" . "Latin-5") + (".*8859[-_]?14\\>" . "Latin-8") + (".*8859[-_]?15\\>" . "Latin-9") + (".*utf\\(?:-?8\\)?\\>" . "UTF-8") + ;; utf-8@euro exists, so put this last. (@euro really specifies + ;; the currency, rather than the charset.) + (".*@euro\\>" . "Latin-9")) "List of pairs of locale regexps and charset language names. The first element whose locale regexp matches the start of a downcased locale specifies the language name whose charset corresponds to that locale. @@ -2547,34 +2538,33 @@ This language name is used if the locale is not listed in `locale-language-names'.") (defconst locale-preferred-coding-systems - (purecopy - '((".*8859[-_]?1\\>" . iso-8859-1) - (".*8859[-_]?2\\>" . iso-8859-2) - (".*8859[-_]?3\\>" . iso-8859-3) - (".*8859[-_]?4\\>" . iso-8859-4) - (".*8859[-_]?9\\>" . iso-8859-9) - (".*8859[-_]?14\\>" . iso-8859-14) - (".*8859[-_]?15\\>" . iso-8859-15) - (".*utf\\(?:-?8\\)?" . utf-8) - ;; utf-8@euro exists, so put this after utf-8. (@euro really - ;; specifies the currency, rather than the charset.) - (".*@euro" . iso-8859-15) - ("koi8-?r" . koi8-r) - ("koi8-?u" . koi8-u) - ("tcvn" . tcvn) - ("big5[-_]?hkscs" . big5-hkscs) - ("big5" . big5) - ("euc-?tw" . euc-tw) - ("euc-?cn" . euc-cn) - ("gb2312" . gb2312) - ("gbk" . gbk) - ("gb18030" . gb18030) - ("ja.*[._]euc" . japanese-iso-8bit) - ("ja.*[._]jis7" . iso-2022-jp) - ("ja.*[._]pck" . japanese-shift-jis) - ("ja.*[._]sjis" . japanese-shift-jis) - ("jpn" . japanese-shift-jis) ; MS-Windows uses this. - )) + '((".*8859[-_]?1\\>" . iso-8859-1) + (".*8859[-_]?2\\>" . iso-8859-2) + (".*8859[-_]?3\\>" . iso-8859-3) + (".*8859[-_]?4\\>" . iso-8859-4) + (".*8859[-_]?9\\>" . iso-8859-9) + (".*8859[-_]?14\\>" . iso-8859-14) + (".*8859[-_]?15\\>" . iso-8859-15) + (".*utf\\(?:-?8\\)?" . utf-8) + ;; utf-8@euro exists, so put this after utf-8. (@euro really + ;; specifies the currency, rather than the charset.) + (".*@euro" . iso-8859-15) + ("koi8-?r" . koi8-r) + ("koi8-?u" . koi8-u) + ("tcvn" . tcvn) + ("big5[-_]?hkscs" . big5-hkscs) + ("big5" . big5) + ("euc-?tw" . euc-tw) + ("euc-?cn" . euc-cn) + ("gb2312" . gb2312) + ("gbk" . gbk) + ("gb18030" . gb18030) + ("ja.*[._]euc" . japanese-iso-8bit) + ("ja.*[._]jis7" . iso-2022-jp) + ("ja.*[._]pck" . japanese-shift-jis) + ("ja.*[._]sjis" . japanese-shift-jis) + ("jpn" . japanese-shift-jis) ; MS-Windows uses this. + ) "List of pairs of locale regexps and preferred coding systems. The first element whose locale regexp matches the start of a downcased locale specifies the coding system to prefer when using that locale. @@ -2965,7 +2955,6 @@ See also the documentation of `get-char-code-property' and (error "Invalid char-table: %s" table)) (or (stringp table) (error "Not a char-table nor a file name: %s" table))) - (if (stringp table) (setq table (purecopy table))) (if (and (stringp table) (char-table-p (alist-get name char-code-property-alist))) ;; The table is already setup and we're apparently trying to @@ -2973,7 +2962,7 @@ See also the documentation of `get-char-code-property' and ;; Just skip it, in order to work around a recursive load (bug#52945). nil (setf (alist-get name char-code-property-alist) table) - (put name 'char-code-property-documentation (purecopy docstring)))) + (put name 'char-code-property-documentation docstring))) (defvar char-code-property-table (make-char-table 'char-code-property-table) diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index fac5643aa3e..5b35338bf26 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1633,7 +1633,6 @@ for decoding and encoding files, process I/O, etc." ;; Tar files are not decoded at all, but we treat them as raw bytes. (setq file-coding-system-alist - (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg))) '(("\\.elc\\'" . utf-8-emacs) ("\\.el\\'" . prefer-utf-8) ("\\.utf\\(-8\\)?\\'" . utf-8) @@ -1647,7 +1646,7 @@ for decoding and encoding files, process I/O, etc." ("\\.tar\\'" . (no-conversion . no-conversion)) ( "\\.po[tx]?\\'\\|\\.po\\." . po-find-file-coding-system) ("\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" . latexenc-find-file-coding-system) - ("" . (undecided . nil))))) + ("" . (undecided . nil)))) ;;; Setting coding categories and their priorities. diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 03376e876bf..2a21d969572 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -43,7 +43,7 @@ ;;; CHARSET (define-button-type 'sort-listed-character-sets - 'help-echo (purecopy "mouse-2, RET: sort on this column") + 'help-echo "mouse-2, RET: sort on this column" 'face 'bold 'action (lambda (button) (sort-listed-character-sets (button-get button 'sort-key)))) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 8063ef68b7e..f72cc815287 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -265,7 +265,7 @@ attribute." (aset emacs-mule-charset-table emacs-mule-id name))) (dolist (slot attrs) - (setcdr slot (purecopy (plist-get props (car slot))))) + (setcdr slot (plist-get props (car slot)))) ;; Make sure that the value of :code-space is a vector of 8 ;; elements. @@ -278,19 +278,12 @@ attribute." ;; Add :name and :docstring properties to PROPS. (setq props - (cons :name (cons name (cons :docstring (cons (purecopy docstring) props))))) + (cons :name (cons name (cons :docstring (cons docstring props))))) (or (plist-get props :short-name) (plist-put props :short-name (symbol-name name))) (or (plist-get props :long-name) (plist-put props :long-name (plist-get props :short-name))) (plist-put props :base name) - ;; We can probably get a worthwhile amount in purespace. - (setq props - (mapcar (lambda (elt) - (if (stringp elt) - (purecopy elt) - elt)) - props)) (setcdr (assq :plist attrs) props) (apply 'define-charset-internal name (mapcar 'cdr attrs)))) @@ -326,7 +319,7 @@ Return t if file exists." (message "Loading %s (source)..." file) (message "Loading %s..." file))) (when purify-flag - (push (purecopy file) preloaded-file-list)) + (push file preloaded-file-list)) (unwind-protect (let ((load-true-file-name fullname) (load-file-name fullname) @@ -440,10 +433,7 @@ This is the last value stored with "Set CHARSETS's PROPNAME property to value VALUE. It can be retrieved with `(get-charset-property CHARSET PROPNAME)'." (set-charset-plist charset - (plist-put (charset-plist charset) propname - (if (stringp value) - (purecopy value) - value)))) + (plist-put (charset-plist charset) propname value))) (defun charset-description (charset) "Return description string of CHARSET." @@ -984,8 +974,7 @@ non-ASCII files. This attribute is meaningful only when ;; Add :name and :docstring properties to PROPS. (setq props - (cons :name (cons name (cons :docstring (cons (purecopy docstring) - props))))) + (cons :name (cons name (cons :docstring (cons docstring props))))) (setcdr (assq :plist common-attrs) props) (apply #'define-coding-system-internal name (mapcar #'cdr (append common-attrs spec-attrs))))) @@ -1529,13 +1518,12 @@ This setting is effective for the next communication only." ;;; X selections (defvar ctext-non-standard-encodings-alist - (mapcar 'purecopy '(("big5-0" big5 2 big5) ("ISO8859-14" iso-8859-14 1 latin-iso8859-14) ("ISO8859-15" iso-8859-15 1 latin-iso8859-15) ("gbk-0" gbk 2 chinese-gbk) ("koi8-r" koi8-r 1 koi8-r) - ("microsoft-cp1251" windows-1251 1 windows-1251))) + ("microsoft-cp1251" windows-1251 1 windows-1251)) "Alist of non-standard encoding names vs the corresponding usages in CTEXT. It controls how extended segments of a compound text are handled @@ -1568,14 +1556,13 @@ Each element must be one of the names listed in the variable `ctext-non-standard-encodings-alist' (which see).") (defvar ctext-non-standard-encodings-regexp - (purecopy (string-to-multibyte (concat ;; For non-standard encodings. "\\(\e%/[0-4][\200-\377][\200-\377]\\([^\002]+\\)\002\\)" "\\|" ;; For UTF-8 encoding. - "\\(\e%G[^\e]*\e%@\\)")))) + "\\(\e%G[^\e]*\e%@\\)"))) ;; Functions to support "Non-Standard Character Set Encodings" defined ;; by the COMPOUND-TEXT spec. They also support "The UTF-8 encoding" @@ -1746,7 +1733,6 @@ in-place." (defcustom auto-coding-alist ;; .exe and .EXE are added to support archive-mode looking at DOS ;; self-extracting exe archives. - (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg))) '(("\\.\\(\ arc\\|zip\\|lzh\\|lha\\|zoo\\|[jew]ar\\|xpi\\|rar\\|7z\\|squashfs\\|\ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\|SQUASHFS\\)\\'" @@ -1756,7 +1742,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\|SQUASHFS\\)\\'" ("\\.\\(gz\\|Z\\|bz\\|bz2\\|xz\\|gpg\\)\\'" . no-conversion) ("\\.\\(jpe?g\\|png\\|gif\\|tiff?\\|p[bpgn]m\\)\\'" . no-conversion) ("\\.pdf\\'" . no-conversion) - ("/#[^/]+#\\'" . utf-8-emacs-unix))) + ("/#[^/]+#\\'" . utf-8-emacs-unix)) "Alist of filename patterns vs corresponding coding systems. Each element looks like (REGEXP . CODING-SYSTEM). A file whose name matches REGEXP is decoded by CODING-SYSTEM on reading. @@ -1771,12 +1757,11 @@ and the contents of `file-coding-system-alist'." (symbol :tag "Coding system")))) (defcustom auto-coding-regexp-alist - (mapcar (lambda (arg) (cons (purecopy (car arg)) (cdr arg))) '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion) ("\\`\xFE\xFF" . utf-16be-with-signature) ("\\`\xFF\xFE" . utf-16le-with-signature) ("\\`\xEF\xBB\xBF" . utf-8-with-signature) - ("\\`;ELC\024\0\0\0" . emacs-mule))) ; Emacs 20-compiled + ("\\`;ELC\024\0\0\0" . emacs-mule)) ; Emacs 20-compiled "Alist of patterns vs corresponding coding systems. Each element looks like (REGEXP . CODING-SYSTEM). A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 9ccb479961d..94d4a758705 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -2494,11 +2494,11 @@ should be made by `quail-build-decode-map' (which see)." (help-setup-xref `(quail-keyboard-layout-button ,layout) nil) (quail-show-keyboard-layout layout)) - 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) + 'help-echo "mouse-2, RET: show keyboard layout") (define-button-type 'quail-keyboard-customize-button :supertype 'help-customize-variable - 'help-echo (purecopy "mouse-2, RET: customize keyboard layout")) + 'help-echo "mouse-2, RET: customize keyboard layout") (defun quail-help (&optional package) "Show brief description of the current Quail package. diff --git a/lisp/isearch.el b/lisp/isearch.el index 14b9bf9c67b..3d06e78f4f0 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -115,7 +115,7 @@ is called to let you enter the search string, and RET terminates editing and does a nonincremental search.)" :type 'boolean) -(defcustom search-whitespace-regexp (purecopy "[ \t]+") +(defcustom search-whitespace-regexp "[ \t]+" "If non-nil, regular expression to match a sequence of whitespace chars. When you enter a space or spaces in the incremental search, it will match any sequence matched by this regexp. As an exception, @@ -497,7 +497,7 @@ this variable is nil.") (eval-when-compile (require 'help-macro)) (make-help-screen isearch-help-for-help-internal - (purecopy "Type a help option: [bkm] or ?") + "Type a help option: [bkm] or ?" "You have typed %THIS-KEY%, the help character. Type a Help option: \(Type \\\\[help-quit] to exit the Help command.) diff --git a/lisp/jka-cmpr-hook.el b/lisp/jka-cmpr-hook.el index d8244a675e1..e3f5eb7d998 100644 --- a/lisp/jka-cmpr-hook.el +++ b/lisp/jka-cmpr-hook.el @@ -78,19 +78,18 @@ Otherwise, it is nil.") (defun jka-compr-build-file-regexp () - (purecopy - (let ((re-anchored '()) - (re-free '())) - (dolist (e jka-compr-compression-info-list) - (let ((re (jka-compr-info-regexp e))) - (if (string-match "\\\\'\\'" re) - (push (substring re 0 (match-beginning 0)) re-anchored) - (push re re-free)))) - (concat - (if re-free (concat (mapconcat 'identity re-free "\\|") "\\|")) - "\\(?:" - (mapconcat 'identity re-anchored "\\|") - "\\)" file-name-version-regexp "?\\'")))) + (let ((re-anchored '()) + (re-free '())) + (dolist (e jka-compr-compression-info-list) + (let ((re (jka-compr-info-regexp e))) + (if (string-match "\\\\'\\'" re) + (push (substring re 0 (match-beginning 0)) re-anchored) + (push re re-free)))) + (concat + (if re-free (concat (mapconcat 'identity re-free "\\|") "\\|")) + "\\(?:" + (mapconcat 'identity re-anchored "\\|") + "\\)" file-name-version-regexp "?\\'"))) ;; Functions for accessing the return value of jka-compr-get-compression-info ;; FIXME: Use cl-defstruct! @@ -202,7 +201,6 @@ options through Custom does this automatically." ;; uncomp-message uncomp-prog uncomp-args ;; can-append strip-extension-flag file-magic-bytes ;; uncompress-function] - (mapcar 'purecopy `(["\\.Z\\'" "compressing" "compress" ("-c") ;; gzip is more common than uncompress. It can only read, not write. @@ -261,7 +259,7 @@ options through Custom does this automatically." ["\\.tzst\\'" "zstd compressing" "zstd" ("-c" "-q") "zstd uncompressing" "zstd" ("-c" "-q" "-d") - t nil "\050\265\057\375"])) + t nil "\050\265\057\375"]) "List of vectors that describe available compression techniques. Each element, which describes a compression technique, is a vector of @@ -329,10 +327,10 @@ variables. Setting this through Custom does that automatically." :group 'jka-compr) (defcustom jka-compr-mode-alist-additions - (purecopy '(("\\.tgz\\'" . tar-mode) - ("\\.tbz2?\\'" . tar-mode) - ("\\.txz\\'" . tar-mode) - ("\\.tzst\\'" . tar-mode))) + '(("\\.tgz\\'" . tar-mode) + ("\\.tbz2?\\'" . tar-mode) + ("\\.txz\\'" . tar-mode) + ("\\.tzst\\'" . tar-mode)) "List of pairs added to `auto-mode-alist' when installing jka-compr. Uninstalling jka-compr removes all pairs from `auto-mode-alist' that installing added. @@ -346,7 +344,7 @@ variables. Setting this through Custom does that automatically." :set 'jka-compr-set :group 'jka-compr) -(defcustom jka-compr-load-suffixes (purecopy '(".gz")) +(defcustom jka-compr-load-suffixes '(".gz") "List of compression related suffixes to try when loading files. Enabling Auto Compression mode appends this list to `load-file-rep-suffixes', which see. Disabling Auto Compression mode removes all suffixes diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el index 26a96c541cd..14098c7e470 100644 --- a/lisp/language/ethiopic.el +++ b/lisp/language/ethiopic.el @@ -56,7 +56,7 @@ "CCL program to encode an Ethiopic code to code point of Ethiopic font.") (setq font-ccl-encoder-alist - (cons (cons (purecopy "ethiopic") ccl-encode-ethio-font) font-ccl-encoder-alist)) + (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist)) (set-language-info-alist "Ethiopic" '((setup-function . setup-ethiopic-environment-internal) diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el index b9dbfc6d9cc..fda6e8b4d79 100644 --- a/lisp/language/korea-util.el +++ b/lisp/language/korea-util.el @@ -29,10 +29,10 @@ ;;;###autoload (defvar default-korean-keyboard - (purecopy (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) + (if (string-search "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" - "")) - "The kind of Korean keyboard for Korean (Hangul) input method. + "") + "The kind of Korean keyboard for Korean (Hangul) input method. \"\" for 2, \"3\" for 3, and \"3f\" for 3f.") ;; functions useful for Korean text input diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el index 7645d77603c..76f43ade081 100644 --- a/lisp/language/tibetan.el +++ b/lisp/language/tibetan.el @@ -574,19 +574,17 @@ The result of matching is to be used for indexing alists at conversion from a roman transcription to the corresponding Tibetan character.") (defvar tibetan-precomposed-regexp - (purecopy - (eval-when-compile - (concat "^" - (regexp-opt (mapcar #'car tibetan-precomposed-transcription-alist) - t)))) + (eval-when-compile + (concat "^" + (regexp-opt (mapcar #'car tibetan-precomposed-transcription-alist) + t))) "Regexp string to match a romanized Tibetan complex consonant. The result of matching is to be used for indexing alists when the input key from an input method is converted to the corresponding precomposed glyph.") (defvar tibetan-precomposition-rule-regexp - (purecopy - (eval-when-compile - (regexp-opt (mapcar #'car tibetan-precomposition-rule-alist) t))) + (eval-when-compile + (regexp-opt (mapcar #'car tibetan-precomposition-rule-alist) t)) "Regexp string to match a sequence of Tibetan consonantic components. That is, one base consonant and one or more subjoined consonants. The result of matching is to be used for indexing alist when the component diff --git a/lisp/loadup.el b/lisp/loadup.el index 6f8e7036999..98a47f2867f 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -57,7 +57,7 @@ ;; Add subdirectories to the load-path for files that might get ;; autoloaded when bootstrapping or running Emacs normally. ;; This is because PATH_DUMPLOADSEARCH is just "../lisp". -(if (or (member dump-mode '("bootstrap" "pbootstrap")) +(if (or (member dump-mode '("pbootstrap")) ;; FIXME this is irritatingly fragile. (and (stringp (nth 4 command-line-args)) (string-match "^unidata-gen\\(\\.elc?\\)?$" @@ -105,10 +105,6 @@ ;; than usual. (setq max-lisp-eval-depth (max max-lisp-eval-depth 3400)))) -(if (eq t purify-flag) - ;; Hash consing saved around 11% of pure space in my tests. - (setq purify-flag (make-hash-table :test #'equal :size 80000))) - (message "Using load-path %s" load-path) (if dump-mode @@ -184,12 +180,6 @@ (file-error (load "ldefs-boot.el"))) -(let ((new (make-hash-table :test #'equal))) - ;; Now that loaddefs has populated definition-prefixes, purify its contents. - (maphash (lambda (k v) (puthash (purecopy k) (purecopy v) new)) - definition-prefixes) - (setq definition-prefixes new)) - (load "button") ;After loaddefs, because of define-minor-mode! (when (interpreted-function-p (symbol-function 'add-hook)) @@ -503,11 +493,6 @@ lost after dumping"))) ;; Avoid storing references to build directory in the binary. (setq custom-current-group-alist nil) -;; We keep the load-history data in PURE space. -;; Make sure that the spine of the list is not in pure space because it can -;; be destructively mutated in lread.c:build_load_history. -(setq load-history (mapcar #'purecopy load-history)) - (set-buffer-modified-p nil) (remove-hook 'after-load-functions (lambda (_) (garbage-collect))) @@ -576,30 +561,10 @@ directory got moved. This is set to be a pair in the form of: ;; file-local variables. (defvar comp--no-native-compile (make-hash-table :test #'equal))) -(when (hash-table-p purify-flag) - (let ((strings 0) - (vectors 0) - (bytecodes 0) - (conses 0) - (others 0)) - (maphash (lambda (k v) - (cond - ((stringp k) (setq strings (1+ strings))) - ((vectorp k) (setq vectors (1+ vectors))) - ((consp k) (setq conses (1+ conses))) - ((byte-code-function-p v) (setq bytecodes (1+ bytecodes))) - (t (setq others (1+ others))))) - purify-flag) - (message "Pure-hashed: %d strings, %d vectors, %d conses, %d bytecodes, %d others" - strings vectors conses bytecodes others))) -;; Avoid error if user loads some more libraries now and make sure the -;; hash-consing hash table is GC'd. +;; Avoid error if user loads some more libraries now. (setq purify-flag nil) -(if (null (garbage-collect)) - (setq pure-space-overflow t)) - ;; Make sure we will attempt bidi reordering henceforth. (setq redisplay--inhibit-bidi nil) @@ -635,8 +600,6 @@ directory got moved. This is set to be a pair in the form of: (error nil)))))) (if dump-mode (let ((output (cond ((equal dump-mode "pdump") "emacs.pdmp") - ((equal dump-mode "dump") "emacs") - ((equal dump-mode "bootstrap") "emacs") ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") (t (error "Unrecognized dump mode %s" dump-mode))))) (when (and (featurep 'native-compile) @@ -661,8 +624,7 @@ directory got moved. This is set to be a pair in the form of: (dump-emacs-portable (expand-file-name output invocation-directory)) (dump-emacs output (if (eq system-type 'ms-dos) "temacs.exe" - "temacs")) - (message "%d pure bytes used" pure-bytes-used)) + "temacs"))) (setq success t)) (unless success (ignore-errors @@ -680,7 +642,7 @@ directory got moved. This is set to be a pair in the form of: (eq system-type 'android)) ;; Don't bother adding another name if we're just ;; building bootstrap-emacs. - (member dump-mode '("pbootstrap" "bootstrap")))) + (member dump-mode '("pbootstrap")))) (let ((name (format "emacs-%s.%d" emacs-version emacs-build-number)) (exe (if (eq system-type 'windows-nt) ".exe" ""))) (while (string-match "[^-+_.a-zA-Z0-9]+" name) diff --git a/lisp/locate.el b/lisp/locate.el index 759551fed9b..d6d86ded1b1 100644 --- a/lisp/locate.el +++ b/lisp/locate.el @@ -182,7 +182,7 @@ or `locate-make-command-line', determines the database." :type '(choice (const :tag "None" nil) face)) ;;;###autoload -(defcustom locate-ls-subdir-switches (purecopy "-al") +(defcustom locate-ls-subdir-switches "-al" "`ls' switches for inserting subdirectories in `*Locate*' buffers. This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches." :type 'string diff --git a/lisp/lpr.el b/lisp/lpr.el index 2b38d6140c3..6c80fa9c20a 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -94,14 +94,13 @@ This switch is used in conjunction with `printer-name'." ;;;###autoload (defcustom lpr-command - (purecopy (cond (lpr-windows-system "") (lpr-lp-system "lp") (t - "lpr"))) + "lpr")) "Name of program for printing a file. On MS-DOS and MS-Windows systems, if the value is an empty string then diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index bf4200c459b..44b49293d08 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -152,7 +152,7 @@ its character representation and its display representation.") :group 'rmail) ;;;###autoload -(defcustom rmail-file-name (purecopy "~/RMAIL") +(defcustom rmail-file-name "~/RMAIL" "Name of user's primary mail file." :type 'string :group 'rmail @@ -160,7 +160,6 @@ its character representation and its display representation.") ;;;###autoload (defcustom rmail-spool-directory - (purecopy (cond ((file-exists-p "/var/mail") ;; SVR4 and recent BSD are said to use this. ;; Rather than trying to know precisely which systems use it, @@ -169,7 +168,7 @@ its character representation and its display representation.") ;; Many GNU/Linux systems use this name. ((file-exists-p "/var/spool/mail") "/var/spool/mail/") ((memq system-type '(hpux usg-unix-v)) "/usr/mail/") - (t "/usr/spool/mail/"))) + (t "/usr/spool/mail/")) "Name of directory used by system mailer for delivering new mail. Its name should end with a slash." :initialize #'custom-initialize-delay @@ -316,7 +315,6 @@ Setting this variable has an effect only before reading a mail." ;;;###autoload (defcustom rmail-ignored-headers - (purecopy (concat "^via:\\|^mail-from:\\|^origin:\\|^references:\\|^sender:" "\\|^status:\\|^received:\\|^x400-originator:\\|^x400-recipients:" "\\|^x400-received:\\|^x400-mts-identifier:\\|^x400-content-type:" @@ -336,7 +334,7 @@ Setting this variable has an effect only before reading a mail." "\\|^Received-SPF:" "\\|^Authentication-Results:" "\\|^resent-face:\\|^resent-x.*:\\|^resent-organization:\\|^resent-openpgp:" - "\\|^x-.*:")) + "\\|^x-.*:") "Regexp to match header fields that Rmail should normally hide. \(See also `rmail-nonignored-headers', which overrides this regexp.) This variable is used for reformatting the message header, @@ -385,7 +383,7 @@ If nil, display all header fields except those matched by :version "29.1") ;;;###autoload -(defcustom rmail-highlighted-headers (purecopy "^From:\\|^Subject:") +(defcustom rmail-highlighted-headers "^From:\\|^Subject:" "Regexp to match Header fields that Rmail should normally highlight. A value of nil means don't highlight. Uses the face `rmail-highlight'." :type '(choice regexp (const :tag "None" nil)) @@ -436,12 +434,12 @@ the frame where you have the RMAIL buffer displayed." :group 'rmail-reply) ;;;###autoload -(defcustom rmail-secondary-file-directory (purecopy "~/") +(defcustom rmail-secondary-file-directory "~/" "Directory for additional secondary Rmail files." :type 'directory :group 'rmail-files) ;;;###autoload -(defcustom rmail-secondary-file-regexp (purecopy "\\.xmail\\'") +(defcustom rmail-secondary-file-regexp "\\.xmail\\'" "Regexp for which files are secondary Rmail files." :type 'regexp :group 'rmail-files) diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 959e47161f7..539a3780bb4 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -160,7 +160,7 @@ This is used by the default mail-sending commands. See also :version "24.1") ;;;###autoload -(defcustom mail-header-separator (purecopy "--text follows this line--") +(defcustom mail-header-separator "--text follows this line--" "Line used to separate headers from text in messages being composed." :type 'string) @@ -201,7 +201,7 @@ The default file is defined in sendmail's configuration file, e.g. :type '(choice (const :tag "Sendmail default" nil) file)) ;;;###autoload -(defcustom mail-personal-alias-file (purecopy "~/.mailrc") +(defcustom mail-personal-alias-file "~/.mailrc" "If non-nil, the name of the user's personal mail alias file. This file typically should be in same format as the `.mailrc' file used by the `Mail' or `mailx' program. @@ -260,7 +260,7 @@ regardless of what part of it (if any) is included in the cited text.") (defcustom mail-citation-prefix-regexp ;; Use [[:word:]] rather than \w so we don't get tripped up if one ;; of those chars has a weird `syntax-table' text property. - (purecopy "\\([ \t]*\\([[:word:]]\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+") + "\\([ \t]*\\([[:word:]]\\|[_.]\\)+>+\\|[ \t]*[>|]\\)+" "Regular expression to match a citation prefix plus whitespace. It should match whatever sort of citation prefixes you want to handle, with whitespace before and after; it should also match just whitespace. @@ -379,12 +379,12 @@ and should insert whatever you want to insert." :risky t) ;;;###autoload -(defcustom mail-signature-file (purecopy "~/.signature") +(defcustom mail-signature-file "~/.signature" "File containing the text inserted at end of mail buffer." :type 'file) ;;;###autoload -(defcustom mail-default-directory (purecopy "~/") +(defcustom mail-default-directory "~/" "Value of `default-directory' for Mail mode buffers. This directory is used for auto-save files of Mail mode buffers. diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 28ab60f1d2d..13911109fd7 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -51,29 +51,29 @@ (defvar menu-bar-print-menu (let ((menu (make-sparse-keymap "Print"))) - (bindings--define-key menu [ps-print-region] + (define-key menu [ps-print-region] '(menu-item "PostScript Print Region (B+W)" ps-print-region :enable mark-active :help "Pretty-print marked region in black and white to PostScript printer")) - (bindings--define-key menu [ps-print-buffer] + (define-key menu [ps-print-buffer] '(menu-item "PostScript Print Buffer (B+W)" ps-print-buffer :enable (menu-bar-menu-frame-live-and-visible-p) :help "Pretty-print current buffer in black and white to PostScript printer")) - (bindings--define-key menu [ps-print-region-faces] + (define-key menu [ps-print-region-faces] '(menu-item "PostScript Print Region" ps-print-region-with-faces :enable mark-active :help "Pretty-print marked region to PostScript printer")) - (bindings--define-key menu [ps-print-buffer-faces] + (define-key menu [ps-print-buffer-faces] '(menu-item "PostScript Print Buffer" ps-print-buffer-with-faces :enable (menu-bar-menu-frame-live-and-visible-p) :help "Pretty-print current buffer to PostScript printer")) - (bindings--define-key menu [print-region] + (define-key menu [print-region] '(menu-item "Print Region" print-region :enable mark-active :help "Print region between mark and current position")) - (bindings--define-key menu [print-buffer] + (define-key menu [print-buffer] '(menu-item "Print Buffer" print-buffer :enable (menu-bar-menu-frame-live-and-visible-p) :help "Print current buffer with page headings")) @@ -91,37 +91,37 @@ in the tool bar will close the current window where possible." (let ((menu (make-sparse-keymap "File"))) ;; The "File" menu items - (bindings--define-key menu [exit-emacs] + (define-key menu [exit-emacs] '(menu-item "Quit" save-buffers-kill-terminal :help "Save unsaved buffers, then exit")) - (bindings--define-key menu [separator-exit] + (define-key menu [separator-exit] menu-bar-separator) - (bindings--define-key menu [print] + (define-key menu [print] `(menu-item "Print" ,menu-bar-print-menu)) - (bindings--define-key menu [separator-print] + (define-key menu [separator-print] menu-bar-separator) - (bindings--define-key menu [close-tab] + (define-key menu [close-tab] '(menu-item "Close Tab" tab-close :visible (fboundp 'tab-close) :help "Close currently selected tab")) - (bindings--define-key menu [make-tab] + (define-key menu [make-tab] '(menu-item "New Tab" tab-new :visible (fboundp 'tab-new) :help "Open a new tab")) - (bindings--define-key menu [separator-tab] + (define-key menu [separator-tab] menu-bar-separator) - (bindings--define-key menu [undelete-frame-mode] + (define-key menu [undelete-frame-mode] '(menu-item "Allow Undeleting Frames" undelete-frame-mode :help "Allow frames to be restored after deletion" :button (:toggle . undelete-frame-mode))) - (bindings--define-key menu [undelete-last-deleted-frame] + (define-key menu [undelete-last-deleted-frame] '(menu-item "Undelete Frame" undelete-frame :enable (and undelete-frame-mode (car undelete-frame--deleted-frames)) @@ -129,48 +129,48 @@ in the tool bar will close the current window where possible." ;; Don't use delete-frame as event name because that is a special ;; event. - (bindings--define-key menu [delete-this-frame] + (define-key menu [delete-this-frame] '(menu-item "Delete Frame" delete-frame :visible (fboundp 'delete-frame) :enable (delete-frame-enabled-p) :help "Delete currently selected frame")) - (bindings--define-key menu [make-frame-on-monitor] + (define-key menu [make-frame-on-monitor] '(menu-item "New Frame on Monitor..." make-frame-on-monitor :visible (fboundp 'make-frame-on-monitor) :help "Open a new frame on another monitor")) - (bindings--define-key menu [make-frame-on-display] + (define-key menu [make-frame-on-display] '(menu-item "New Frame on Display Server..." make-frame-on-display :visible (fboundp 'make-frame-on-display) :help "Open a new frame on a display server")) - (bindings--define-key menu [make-frame] + (define-key menu [make-frame] '(menu-item "New Frame" make-frame-command :visible (fboundp 'make-frame-command) :help "Open a new frame")) - (bindings--define-key menu [separator-frame] + (define-key menu [separator-frame] menu-bar-separator) - (bindings--define-key menu [one-window] + (define-key menu [one-window] '(menu-item "Remove Other Windows" delete-other-windows :enable (not (one-window-p t nil)) :help "Make selected window fill whole frame")) - (bindings--define-key menu [new-window-on-right] + (define-key menu [new-window-on-right] '(menu-item "New Window on Right" split-window-right :enable (and (menu-bar-menu-frame-live-and-visible-p) (menu-bar-non-minibuffer-window-p)) :help "Make new window on right of selected one")) - (bindings--define-key menu [new-window-below] + (define-key menu [new-window-below] '(menu-item "New Window Below" split-window-below :enable (and (menu-bar-menu-frame-live-and-visible-p) (menu-bar-non-minibuffer-window-p)) :help "Make new window below selected one")) - (bindings--define-key menu [separator-window] + (define-key menu [separator-window] menu-bar-separator) - (bindings--define-key menu [recover-session] + (define-key menu [recover-session] '(menu-item "Recover Crashed Session" recover-session :enable (and auto-save-list-file-prefix @@ -185,7 +185,7 @@ in the tool bar will close the current window where possible." auto-save-list-file-prefix))) t)) :help "Recover edits from a crashed session")) - (bindings--define-key menu [revert-buffer] + (define-key menu [revert-buffer] '(menu-item "Revert Buffer" revert-buffer :enable @@ -203,47 +203,47 @@ in the tool bar will close the current window where possible." (not (eq (not buffer-read-only) (file-writable-p buffer-file-name)))))) :help "Re-read current buffer from its file")) - (bindings--define-key menu [write-file] + (define-key menu [write-file] '(menu-item "Save As..." write-file :enable (and (menu-bar-menu-frame-live-and-visible-p) (menu-bar-non-minibuffer-window-p)) :help "Write current buffer to another file")) - (bindings--define-key menu [save-buffer] + (define-key menu [save-buffer] '(menu-item "Save" save-buffer :enable (and (buffer-modified-p) (buffer-file-name) (menu-bar-non-minibuffer-window-p)) :help "Save current buffer to its file")) - (bindings--define-key menu [separator-save] + (define-key menu [separator-save] menu-bar-separator) - (bindings--define-key menu [kill-buffer] + (define-key menu [kill-buffer] '(menu-item "Close" kill-this-buffer :enable (kill-this-buffer-enabled-p) :help "Discard (kill) current buffer")) - (bindings--define-key menu [insert-file] + (define-key menu [insert-file] '(menu-item "Insert File..." insert-file :enable (menu-bar-non-minibuffer-window-p) :help "Insert another file into current buffer")) - (bindings--define-key menu [project-dired] + (define-key menu [project-dired] '(menu-item "Open Project Directory" project-dired :enable (menu-bar-non-minibuffer-window-p) :help "Read the root directory of the current project, to operate on its files")) - (bindings--define-key menu [dired] + (define-key menu [dired] '(menu-item "Open Directory..." dired :enable (menu-bar-non-minibuffer-window-p) :help "Read a directory, to operate on its files")) - (bindings--define-key menu [project-open-file] + (define-key menu [project-open-file] '(menu-item "Open File In Project..." project-find-file :enable (menu-bar-non-minibuffer-window-p) :help "Read existing file that belongs to current project into an Emacs buffer")) - (bindings--define-key menu [open-file] + (define-key menu [open-file] '(menu-item "Open File..." menu-find-file-existing :enable (menu-bar-non-minibuffer-window-p) :help "Read an existing file into an Emacs buffer")) - (bindings--define-key menu [new-file] + (define-key menu [new-file] '(menu-item "Visit New File..." find-file :enable (menu-bar-non-minibuffer-window-p) :help "Specify a new file's name, to edit the file")) @@ -330,45 +330,45 @@ in the tool bar will close the current window where possible." ;; The Edit->Incremental Search menu (defvar menu-bar-i-search-menu (let ((menu (make-sparse-keymap "Incremental Search"))) - (bindings--define-key menu [isearch-forward-symbol-at-point] + (define-key menu [isearch-forward-symbol-at-point] '(menu-item "Forward Symbol at Point..." isearch-forward-symbol-at-point :help "Search forward for a symbol found at point")) - (bindings--define-key menu [isearch-forward-symbol] + (define-key menu [isearch-forward-symbol] '(menu-item "Forward Symbol..." isearch-forward-symbol :help "Search forward for a symbol as you type it")) - (bindings--define-key menu [isearch-forward-word] + (define-key menu [isearch-forward-word] '(menu-item "Forward Word..." isearch-forward-word :help "Search forward for a word as you type it")) - (bindings--define-key menu [isearch-backward-regexp] + (define-key menu [isearch-backward-regexp] '(menu-item "Backward Regexp..." isearch-backward-regexp :help "Search backwards for a regular expression as you type it")) - (bindings--define-key menu [isearch-forward-regexp] + (define-key menu [isearch-forward-regexp] '(menu-item "Forward Regexp..." isearch-forward-regexp :help "Search forward for a regular expression as you type it")) - (bindings--define-key menu [isearch-backward] + (define-key menu [isearch-backward] '(menu-item "Backward String..." isearch-backward :help "Search backwards for a string as you type it")) - (bindings--define-key menu [isearch-forward] + (define-key menu [isearch-forward] '(menu-item "Forward String..." isearch-forward :help "Search forward for a string as you type it")) menu)) (defvar menu-bar-search-menu (let ((menu (make-sparse-keymap "Search"))) - (bindings--define-key menu [tags-continue] + (define-key menu [tags-continue] '(menu-item "Continue Tags Search" fileloop-continue :enable (and (featurep 'fileloop) (not (eq fileloop--operate-function 'ignore))) :help "Continue last tags search operation")) - (bindings--define-key menu [tags-srch] + (define-key menu [tags-srch] '(menu-item "Search Tagged Files..." tags-search :help "Search for a regexp in all tagged files")) - (bindings--define-key menu [project-search] + (define-key menu [project-search] '(menu-item "Search in Project Files..." project-find-regexp :help "Search for a regexp in files belonging to current project")) - (bindings--define-key menu [separator-tag-search] menu-bar-separator) + (define-key menu [separator-tag-search] menu-bar-separator) - (bindings--define-key menu [repeat-search-back] + (define-key menu [repeat-search-back] '(menu-item "Repeat Backwards" nonincremental-repeat-search-backward :enable (or (and (eq menu-bar-last-search-type 'string) @@ -376,7 +376,7 @@ in the tool bar will close the current window where possible." (and (eq menu-bar-last-search-type 'regexp) regexp-search-ring)) :help "Repeat last search backwards")) - (bindings--define-key menu [repeat-search-fwd] + (define-key menu [repeat-search-fwd] '(menu-item "Repeat Forward" nonincremental-repeat-search-forward :enable (or (and (eq menu-bar-last-search-type 'string) @@ -384,23 +384,23 @@ in the tool bar will close the current window where possible." (and (eq menu-bar-last-search-type 'regexp) regexp-search-ring)) :help "Repeat last search forward")) - (bindings--define-key menu [separator-repeat-search] + (define-key menu [separator-repeat-search] menu-bar-separator) - (bindings--define-key menu [re-search-backward] + (define-key menu [re-search-backward] '(menu-item "Regexp Backwards..." nonincremental-re-search-backward :help "Search backwards for a regular expression")) - (bindings--define-key menu [re-search-forward] + (define-key menu [re-search-forward] '(menu-item "Regexp Forward..." nonincremental-re-search-forward :help "Search forward for a regular expression")) - (bindings--define-key menu [search-backward] + (define-key menu [search-backward] '(menu-item "String Backwards..." nonincremental-search-backward :help "Search backwards for a string")) - (bindings--define-key menu [search-forward] + (define-key menu [search-forward] '(menu-item "String Forward..." nonincremental-search-forward :help "Search forward for a string")) menu)) @@ -409,25 +409,25 @@ in the tool bar will close the current window where possible." (defvar menu-bar-replace-menu (let ((menu (make-sparse-keymap "Replace"))) - (bindings--define-key menu [tags-repl-continue] + (define-key menu [tags-repl-continue] '(menu-item "Continue Replace" fileloop-continue :enable (and (featurep 'fileloop) (not (eq fileloop--operate-function 'ignore))) :help "Continue last tags replace operation")) - (bindings--define-key menu [tags-repl] + (define-key menu [tags-repl] '(menu-item "Replace in Tagged Files..." tags-query-replace :help "Interactively replace a regexp in all tagged files")) - (bindings--define-key menu [project-replace] + (define-key menu [project-replace] '(menu-item "Replace in Project Files..." project-query-replace-regexp :help "Interactively replace a regexp in files belonging to current project")) - (bindings--define-key menu [separator-replace-tags] + (define-key menu [separator-replace-tags] menu-bar-separator) - (bindings--define-key menu [query-replace-regexp] + (define-key menu [query-replace-regexp] '(menu-item "Replace Regexp..." query-replace-regexp :enable (not buffer-read-only) :help "Replace regular expression interactively, ask about each occurrence")) - (bindings--define-key menu [query-replace] + (define-key menu [query-replace] '(menu-item "Replace String..." query-replace :enable (not buffer-read-only) :help "Replace string interactively, ask about each occurrence")) @@ -437,49 +437,49 @@ in the tool bar will close the current window where possible." (defvar menu-bar-goto-menu (let ((menu (make-sparse-keymap "Go To"))) - (bindings--define-key menu [set-tags-name] + (define-key menu [set-tags-name] '(menu-item "Set Tags File Name..." visit-tags-table :visible (menu-bar-goto-uses-etags-p) :help "Tell navigation commands which tag table file to use")) - (bindings--define-key menu [separator-tag-file] + (define-key menu [separator-tag-file] '(menu-item "--" nil :visible (menu-bar-goto-uses-etags-p))) - (bindings--define-key menu [xref-forward] + (define-key menu [xref-forward] '(menu-item "Forward" xref-go-forward :visible (and (featurep 'xref) (not (xref-forward-history-empty-p))) :help "Forward to the position gone Back from")) - (bindings--define-key menu [xref-pop] + (define-key menu [xref-pop] '(menu-item "Back" xref-go-back :visible (and (featurep 'xref) (not (xref-marker-stack-empty-p))) :help "Back to the position of the last search")) - (bindings--define-key menu [xref-apropos] + (define-key menu [xref-apropos] '(menu-item "Find Apropos..." xref-find-apropos :help "Find function/variables whose names match regexp")) - (bindings--define-key menu [xref-find-otherw] + (define-key menu [xref-find-otherw] '(menu-item "Find Definition in Other Window..." xref-find-definitions-other-window :help "Find function/variable definition in another window")) - (bindings--define-key menu [xref-find-def] + (define-key menu [xref-find-def] '(menu-item "Find Definition..." xref-find-definitions :help "Find definition of function or variable")) - (bindings--define-key menu [separator-xref] + (define-key menu [separator-xref] menu-bar-separator) - (bindings--define-key menu [end-of-buf] + (define-key menu [end-of-buf] '(menu-item "Goto End of Buffer" end-of-buffer)) - (bindings--define-key menu [beg-of-buf] + (define-key menu [beg-of-buf] '(menu-item "Goto Beginning of Buffer" beginning-of-buffer)) - (bindings--define-key menu [go-to-pos] + (define-key menu [go-to-pos] '(menu-item "Goto Buffer Position..." goto-char :help "Read a number N and go to buffer position N")) - (bindings--define-key menu [go-to-line] + (define-key menu [go-to-line] '(menu-item "Goto Line..." goto-line :help "Read a line number and go to that line")) menu)) @@ -488,53 +488,53 @@ in the tool bar will close the current window where possible." (or (not (boundp 'xref-backend-functions)) (eq (car xref-backend-functions) 'etags--xref-backend))) -(defvar yank-menu (cons (purecopy "Select Yank") nil)) +(defvar yank-menu '("Select Yank" nil)) (fset 'yank-menu (cons 'keymap yank-menu)) (defvar menu-bar-edit-menu (let ((menu (make-sparse-keymap "Edit"))) - (bindings--define-key menu [execute-extended-command] + (define-key menu [execute-extended-command] '(menu-item "Execute Command" execute-extended-command :enable t :help "Read a command name, its arguments, then call it.")) ;; ns-win.el said: Add spell for platform consistency. (if (featurep 'ns) - (bindings--define-key menu [spell] + (define-key menu [spell] '(menu-item "Spell" ispell-menu-map))) - (bindings--define-key menu [fill] + (define-key menu [fill] '(menu-item "Fill" fill-region :enable (and mark-active (not buffer-read-only)) :help "Fill text in region to fit between left and right margin")) - (bindings--define-key menu [separator-bookmark] + (define-key menu [separator-bookmark] menu-bar-separator) - (bindings--define-key menu [bookmark] + (define-key menu [bookmark] '(menu-item "Bookmarks" menu-bar-bookmark-map)) - (bindings--define-key menu [goto] + (define-key menu [goto] `(menu-item "Go To" ,menu-bar-goto-menu)) - (bindings--define-key menu [replace] + (define-key menu [replace] `(menu-item "Replace" ,menu-bar-replace-menu)) - (bindings--define-key menu [i-search] + (define-key menu [i-search] `(menu-item "Incremental Search" ,menu-bar-i-search-menu)) - (bindings--define-key menu [search] + (define-key menu [search] `(menu-item "Search" ,menu-bar-search-menu)) - (bindings--define-key menu [separator-search] + (define-key menu [separator-search] menu-bar-separator) - (bindings--define-key menu [mark-whole-buffer] + (define-key menu [mark-whole-buffer] '(menu-item "Select All" mark-whole-buffer :help "Mark the whole buffer for a subsequent cut/copy")) - (bindings--define-key menu [clear] + (define-key menu [clear] '(menu-item "Clear" delete-active-region :enable (and mark-active (not buffer-read-only)) @@ -542,7 +542,7 @@ in the tool bar will close the current window where possible." "Delete the text in region between mark and current position")) - (bindings--define-key menu (if (featurep 'ns) [select-paste] + (define-key menu (if (featurep 'ns) [select-paste] [paste-from-menu]) ;; ns-win.el said: Change text to be more consistent with ;; surrounding menu items `paste', etc." @@ -550,7 +550,7 @@ in the tool bar will close the current window where possible." yank-menu :enable (and (cdr yank-menu) (not buffer-read-only)) :help "Choose a string from the kill ring and paste it")) - (bindings--define-key menu [paste] + (define-key menu [paste] `(menu-item "Paste" yank :enable (funcall ',(lambda () @@ -565,7 +565,7 @@ in the tool bar will close the current window where possible." (if cua-mode "\\[cua-paste]" "\\[yank]")))) - (bindings--define-key menu [copy] + (define-key menu [copy] ;; ns-win.el said: Substitute a Copy function that works better ;; under X (for GNUstep). `(menu-item "Copy" ,(if (featurep 'ns) @@ -581,7 +581,7 @@ in the tool bar will close the current window where possible." "\\[cua-copy-handler]") (t "\\[kill-ring-save]"))))) - (bindings--define-key menu [cut] + (define-key menu [cut] `(menu-item "Cut" kill-region :enable (and mark-active (not buffer-read-only)) :help @@ -592,15 +592,15 @@ in the tool bar will close the current window where possible." "\\[kill-region]")))) ;; ns-win.el said: Separate undo from cut/paste section. (if (featurep 'ns) - (bindings--define-key menu [separator-undo] menu-bar-separator)) + (define-key menu [separator-undo] menu-bar-separator)) - (bindings--define-key menu [undo-redo] + (define-key menu [undo-redo] '(menu-item "Redo" undo-redo :enable (and (not buffer-read-only) (undo--last-change-was-undo-p buffer-undo-list)) :help "Redo last undone edits")) - (bindings--define-key menu [undo] + (define-key menu [undo] '(menu-item "Undo" undo :enable (and (not buffer-read-only) (not (eq t buffer-undo-list)) @@ -667,43 +667,43 @@ Do the same for the keys of the same name." (defvar menu-bar-custom-menu (let ((menu (make-sparse-keymap "Customize"))) - (bindings--define-key menu [customize-apropos-faces] + (define-key menu [customize-apropos-faces] '(menu-item "Faces Matching..." customize-apropos-faces :help "Browse faces matching a regexp or word list")) - (bindings--define-key menu [customize-apropos-options] + (define-key menu [customize-apropos-options] '(menu-item "Options Matching..." customize-apropos-options :help "Browse options matching a regexp or word list")) - (bindings--define-key menu [customize-apropos] + (define-key menu [customize-apropos] '(menu-item "All Settings Matching..." customize-apropos :help "Browse customizable settings matching a regexp or word list")) - (bindings--define-key menu [separator-1] + (define-key menu [separator-1] menu-bar-separator) - (bindings--define-key menu [customize-group] + (define-key menu [customize-group] '(menu-item "Specific Group..." customize-group :help "Customize settings of specific group")) - (bindings--define-key menu [customize-face] + (define-key menu [customize-face] '(menu-item "Specific Face..." customize-face :help "Customize attributes of specific face")) - (bindings--define-key menu [customize-option] + (define-key menu [customize-option] '(menu-item "Specific Option..." customize-option :help "Customize value of specific option")) - (bindings--define-key menu [separator-2] + (define-key menu [separator-2] menu-bar-separator) - (bindings--define-key menu [customize-changed] + (define-key menu [customize-changed] '(menu-item "New Options..." customize-changed :help "Options and faces added or changed in recent Emacs versions")) - (bindings--define-key menu [customize-saved] + (define-key menu [customize-saved] '(menu-item "Saved Options" customize-saved :help "Customize previously saved options")) - (bindings--define-key menu [separator-3] + (define-key menu [separator-3] menu-bar-separator) - (bindings--define-key menu [customize-browse] + (define-key menu [customize-browse] '(menu-item "Browse Customization Groups" customize-browse :help "Tree-like browser of all the groups of customizable options")) - (bindings--define-key menu [customize] + (define-key menu [customize] '(menu-item "Top-level Emacs Customization Group" customize :help "Top-level groups of customizable options, and their descriptions")) - (bindings--define-key menu [customize-themes] + (define-key menu [customize-themes] '(menu-item "Custom Themes" customize-themes :help "Choose a pre-defined customization theme")) menu)) @@ -883,12 +883,12 @@ The selected font will be the default on both the existing and future frames." ;; dividers are displayed by manipulating frame parameters directly. (defvar menu-bar-showhide-window-divider-menu (let ((menu (make-sparse-keymap "Window Divider"))) - (bindings--define-key menu [customize] + (define-key menu [customize] '(menu-item "Customize" menu-bar-window-divider-customize :help "Customize window dividers" :visible (memq (window-system) '(x w32)))) - (bindings--define-key menu [bottom-and-right] + (define-key menu [bottom-and-right] '(menu-item "Bottom and Right" menu-bar-bottom-and-right-window-divider :help "Display window divider on the bottom and right of each window" @@ -900,7 +900,7 @@ The selected font will be the default on both the existing and future frames." (window-divider-width-valid-p (cdr (assq 'right-divider-width (frame-parameters)))))))) - (bindings--define-key menu [right-only] + (define-key menu [right-only] '(menu-item "Right Only" menu-bar-right-window-divider :help "Display window divider on the right of each window only" @@ -912,7 +912,7 @@ The selected font will be the default on both the existing and future frames." (window-divider-width-valid-p (cdr (assq 'right-divider-width (frame-parameters)))))))) - (bindings--define-key menu [bottom-only] + (define-key menu [bottom-only] '(menu-item "Bottom Only" menu-bar-bottom-window-divider :help "Display window divider on the bottom of each window only" @@ -924,7 +924,7 @@ The selected font will be the default on both the existing and future frames." (not (window-divider-width-valid-p (cdr (assq 'right-divider-width (frame-parameters))))))))) - (bindings--define-key menu [no-divider] + (define-key menu [no-divider] '(menu-item "None" menu-bar-no-window-divider :help "Do not display window dividers" @@ -973,7 +973,7 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-fringe-ind-menu (let ((menu (make-sparse-keymap "Buffer boundaries"))) - (bindings--define-key menu [customize] + (define-key menu [customize] '(menu-item "Other (Customize)" menu-bar-showhide-fringe-ind-customize :help "Additional choices available through Custom buffer" @@ -983,7 +983,7 @@ The selected font will be the default on both the existing and future frames." ((top . left) (bottom . right)) ((t . right) (top . left)))))))) - (bindings--define-key menu [mixed] + (define-key menu [mixed] '(menu-item "Opposite, Arrows Right" menu-bar-showhide-fringe-ind-mixed :help "Show top/bottom indicators in opposite fringes, arrows in right" @@ -991,26 +991,26 @@ The selected font will be the default on both the existing and future frames." :button (:radio . (equal indicate-buffer-boundaries '((t . right) (top . left)))))) - (bindings--define-key menu [box] + (define-key menu [box] '(menu-item "Opposite, No Arrows" menu-bar-showhide-fringe-ind-box :help "Show top/bottom indicators in opposite fringes, no arrows" :visible (display-graphic-p) :button (:radio . (equal indicate-buffer-boundaries '((top . left) (bottom . right)))))) - (bindings--define-key menu [right] + (define-key menu [right] '(menu-item "In Right Fringe" menu-bar-showhide-fringe-ind-right :help "Show buffer boundaries and arrows in right fringe" :visible (display-graphic-p) :button (:radio . (eq indicate-buffer-boundaries 'right)))) - (bindings--define-key menu [left] + (define-key menu [left] '(menu-item "In Left Fringe" menu-bar-showhide-fringe-ind-left :help "Show buffer boundaries and arrows in left fringe" :visible (display-graphic-p) :button (:radio . (eq indicate-buffer-boundaries 'left)))) - (bindings--define-key menu [none] + (define-key menu [none] '(menu-item "No Indicators" menu-bar-showhide-fringe-ind-none :help "Hide all buffer boundary indicators and arrows" :visible (display-graphic-p) @@ -1048,42 +1048,42 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-fringe-menu (let ((menu (make-sparse-keymap "Fringe"))) - (bindings--define-key menu [showhide-fringe-ind] + (define-key menu [showhide-fringe-ind] `(menu-item "Buffer Boundaries" ,menu-bar-showhide-fringe-ind-menu :visible (display-graphic-p) :help "Indicate buffer boundaries in fringe")) - (bindings--define-key menu [indicate-empty-lines] + (define-key menu [indicate-empty-lines] (menu-bar-make-toggle-command toggle-indicate-empty-lines indicate-empty-lines "Empty Line Indicators" "Indicating of empty lines %s" "Indicate trailing empty lines in fringe, globally")) - (bindings--define-key menu [customize] + (define-key menu [customize] '(menu-item "Customize Fringe" menu-bar-showhide-fringe-menu-customize :help "Detailed customization of fringe" :visible (display-graphic-p))) - (bindings--define-key menu [default] + (define-key menu [default] '(menu-item "Default" menu-bar-showhide-fringe-menu-customize-reset :help "Default width fringe on both left and right side" :visible (display-graphic-p) :button (:radio . (eq fringe-mode nil)))) - (bindings--define-key menu [right] + (define-key menu [right] '(menu-item "On the Right" menu-bar-showhide-fringe-menu-customize-right :help "Fringe only on the right side" :visible (display-graphic-p) :button (:radio . (equal fringe-mode '(0 . nil))))) - (bindings--define-key menu [left] + (define-key menu [left] '(menu-item "On the Left" menu-bar-showhide-fringe-menu-customize-left :help "Fringe only on the left side" :visible (display-graphic-p) :button (:radio . (equal fringe-mode '(nil . 0))))) - (bindings--define-key menu [none] + (define-key menu [none] '(menu-item "None" menu-bar-showhide-fringe-menu-customize-disable :help "Turn off fringe" :visible (display-graphic-p) @@ -1108,15 +1108,15 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-scroll-bar-menu (let ((menu (make-sparse-keymap "Scroll Bar"))) - (bindings--define-key menu [horizontal] + (define-key menu [horizontal] (menu-bar-make-mm-toggle horizontal-scroll-bar-mode "Horizontal" "Horizontal scroll bar")) - (bindings--define-key menu [scrollbar-separator] + (define-key menu [scrollbar-separator] menu-bar-separator) - (bindings--define-key menu [right] + (define-key menu [right] '(menu-item "On the Right" menu-bar-right-scroll-bar :help "Scroll bar on the right side" :visible (display-graphic-p) @@ -1125,7 +1125,7 @@ The selected font will be the default on both the existing and future frames." nil 'vertical-scroll-bars) 'right))))) - (bindings--define-key menu [left] + (define-key menu [left] '(menu-item "On the Left" menu-bar-left-scroll-bar :help "Scroll bar on the left side" :visible (display-graphic-p) @@ -1134,7 +1134,7 @@ The selected font will be the default on both the existing and future frames." nil 'vertical-scroll-bars) 'left))))) - (bindings--define-key menu [none] + (define-key menu [none] '(menu-item "No Vertical Scroll Bar" menu-bar-no-scroll-bar :help "Turn off vertical scroll bar" :visible (display-graphic-p) @@ -1180,7 +1180,7 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-tool-bar-menu (let ((menu (make-sparse-keymap "Tool Bar"))) - (bindings--define-key menu [showhide-tool-bar-left] + (define-key menu [showhide-tool-bar-left] '(menu-item "On the Left" menu-bar-showhide-tool-bar-menu-customize-enable-left :help "Tool bar at the left side" @@ -1192,7 +1192,7 @@ The selected font will be the default on both the existing and future frames." 'tool-bar-position) 'left))))) - (bindings--define-key menu [showhide-tool-bar-right] + (define-key menu [showhide-tool-bar-right] '(menu-item "On the Right" menu-bar-showhide-tool-bar-menu-customize-enable-right :help "Tool bar at the right side" @@ -1204,7 +1204,7 @@ The selected font will be the default on both the existing and future frames." 'tool-bar-position) 'right))))) - (bindings--define-key menu [showhide-tool-bar-bottom] + (define-key menu [showhide-tool-bar-bottom] '(menu-item "On the Bottom" menu-bar-showhide-tool-bar-menu-customize-enable-bottom :help "Tool bar at the bottom" @@ -1216,7 +1216,7 @@ The selected font will be the default on both the existing and future frames." 'tool-bar-position) 'bottom))))) - (bindings--define-key menu [showhide-tool-bar-top] + (define-key menu [showhide-tool-bar-top] '(menu-item "On the Top" menu-bar-showhide-tool-bar-menu-customize-enable-top :help "Tool bar at the top" @@ -1228,7 +1228,7 @@ The selected font will be the default on both the existing and future frames." 'tool-bar-position) 'top))))) - (bindings--define-key menu [showhide-tool-bar-none] + (define-key menu [showhide-tool-bar-none] '(menu-item "None" menu-bar-showhide-tool-bar-menu-customize-disable :help "Turn tool bar off" @@ -1271,35 +1271,35 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-line-numbers-menu (let ((menu (make-sparse-keymap "Line Numbers"))) - (bindings--define-key menu [visual] + (define-key menu [visual] '(menu-item "Visual Line Numbers" menu-bar--display-line-numbers-mode-visual :help "Enable visual line numbers" :button (:radio . (eq display-line-numbers 'visual)) :visible (menu-bar-menu-frame-live-and-visible-p))) - (bindings--define-key menu [relative] + (define-key menu [relative] '(menu-item "Relative Line Numbers" menu-bar--display-line-numbers-mode-relative :help "Enable relative line numbers" :button (:radio . (eq display-line-numbers 'relative)) :visible (menu-bar-menu-frame-live-and-visible-p))) - (bindings--define-key menu [absolute] + (define-key menu [absolute] '(menu-item "Absolute Line Numbers" menu-bar--display-line-numbers-mode-absolute :help "Enable absolute line numbers" :button (:radio . (eq display-line-numbers t)) :visible (menu-bar-menu-frame-live-and-visible-p))) - (bindings--define-key menu [none] + (define-key menu [none] '(menu-item "No Line Numbers" menu-bar--display-line-numbers-mode-none :help "Disable line numbers" :button (:radio . (null display-line-numbers)) :visible (menu-bar-menu-frame-live-and-visible-p))) - (bindings--define-key menu [global] + (define-key menu [global] (menu-bar-make-mm-toggle global-display-line-numbers-mode "Global Line Numbers Mode" "Set line numbers globally")) @@ -1308,43 +1308,43 @@ The selected font will be the default on both the existing and future frames." (defvar menu-bar-showhide-menu (let ((menu (make-sparse-keymap "Show/Hide"))) - (bindings--define-key menu [display-line-numbers] + (define-key menu [display-line-numbers] `(menu-item "Line Numbers for All Lines" ,menu-bar-showhide-line-numbers-menu)) - (bindings--define-key menu [column-number-mode] + (define-key menu [column-number-mode] (menu-bar-make-mm-toggle column-number-mode "Column Numbers in Mode Line" "Show the current column number in the mode line")) - (bindings--define-key menu [line-number-mode] + (define-key menu [line-number-mode] (menu-bar-make-mm-toggle line-number-mode "Line Numbers in Mode Line" "Show the current line number in the mode line")) - (bindings--define-key menu [size-indication-mode] + (define-key menu [size-indication-mode] (menu-bar-make-mm-toggle size-indication-mode "Size Indication" "Show the size of the buffer in the mode line")) - (bindings--define-key menu [linecolumn-separator] + (define-key menu [linecolumn-separator] menu-bar-separator) - (bindings--define-key menu [showhide-battery] + (define-key menu [showhide-battery] (menu-bar-make-mm-toggle display-battery-mode "Battery Status" "Display battery status information in mode line")) - (bindings--define-key menu [showhide-date-time] + (define-key menu [showhide-date-time] (menu-bar-make-mm-toggle display-time-mode "Time, Load and Mail" "Display time, system load averages and \ mail status in mode line")) - (bindings--define-key menu [datetime-separator] + (define-key menu [datetime-separator] menu-bar-separator) - (bindings--define-key menu [showhide-speedbar] + (define-key menu [showhide-speedbar] '(menu-item "Speedbar" speedbar-frame-mode :help "Display a Speedbar quick-navigation frame" :button (:toggle @@ -1353,7 +1353,7 @@ mail status in mode line")) (frame-visible-p (symbol-value 'speedbar-frame)))))) - (bindings--define-key menu [showhide-outline-minor-mode] + (define-key menu [showhide-outline-minor-mode] '(menu-item "Outlines" outline-minor-mode :help "Turn outline-minor-mode on/off" :visible (seq-some #'local-variable-p @@ -1361,36 +1361,36 @@ mail status in mode line")) outline-regexp outline-level)) :button (:toggle . (bound-and-true-p outline-minor-mode)))) - (bindings--define-key menu [showhide-tab-line-mode] + (define-key menu [showhide-tab-line-mode] '(menu-item "Window Tab Line" global-tab-line-mode :help "Turn window-local tab-lines on/off" :visible (fboundp 'global-tab-line-mode) :button (:toggle . global-tab-line-mode))) - (bindings--define-key menu [showhide-window-divider] + (define-key menu [showhide-window-divider] `(menu-item "Window Divider" ,menu-bar-showhide-window-divider-menu :visible (memq (window-system) '(x w32)))) - (bindings--define-key menu [showhide-fringe] + (define-key menu [showhide-fringe] `(menu-item "Fringe" ,menu-bar-showhide-fringe-menu :visible (display-graphic-p))) - (bindings--define-key menu [showhide-scroll-bar] + (define-key menu [showhide-scroll-bar] `(menu-item "Scroll Bar" ,menu-bar-showhide-scroll-bar-menu :visible (display-graphic-p))) - (bindings--define-key menu [showhide-tooltip-mode] + (define-key menu [showhide-tooltip-mode] '(menu-item "Tooltips" tooltip-mode :help "Turn tooltips on/off" :visible (and (display-graphic-p) (fboundp 'x-show-tip)) :button (:toggle . tooltip-mode))) - (bindings--define-key menu [showhide-context-menu] + (define-key menu [showhide-context-menu] '(menu-item "Context Menus" context-menu-mode :help "Turn mouse-3 context menus on/off" :button (:toggle . context-menu-mode))) - (bindings--define-key menu [menu-bar-mode] + (define-key menu [menu-bar-mode] '(menu-item "Menu Bar" toggle-menu-bar-mode-from-frame :help "Turn menu bar on/off" :button @@ -1398,7 +1398,7 @@ mail status in mode line")) (frame-parameter (menu-bar-frame-for-menubar) 'menu-bar-lines))))) - (bindings--define-key menu [showhide-tab-bar] + (define-key menu [showhide-tab-bar] '(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame :help "Turn tab bar on/off" :button @@ -1408,11 +1408,11 @@ mail status in mode line")) (if (and (boundp 'menu-bar-showhide-tool-bar-menu) (keymapp menu-bar-showhide-tool-bar-menu)) - (bindings--define-key menu [showhide-tool-bar] + (define-key menu [showhide-tool-bar] `(menu-item "Tool Bar" ,menu-bar-showhide-tool-bar-menu :visible (display-graphic-p))) ;; else not tool bar that can move. - (bindings--define-key menu [showhide-tool-bar] + (define-key menu [showhide-tool-bar] '(menu-item "Tool Bar" toggle-tool-bar-mode-from-frame :help "Turn tool bar on/off" :visible (display-graphic-p) @@ -1446,7 +1446,7 @@ mail status in mode line")) (defvar menu-bar-line-wrapping-menu (let ((menu (make-sparse-keymap "Line Wrapping"))) - (bindings--define-key menu [visual-wrap] + (define-key menu [visual-wrap] '(menu-item "Visual Wrap Prefix mode" visual-wrap-prefix-mode :help "Display continuation lines with visual context-dependent prefix" :visible (menu-bar-menu-frame-live-and-visible-p) @@ -1454,7 +1454,7 @@ mail status in mode line")) . (bound-and-true-p visual-wrap-prefix-mode)) :enable t)) - (bindings--define-key menu [word-wrap] + (define-key menu [word-wrap] '(menu-item "Word Wrap (Visual Line mode)" menu-bar--visual-line-mode-enable :help "Wrap long lines at word boundaries" @@ -1464,7 +1464,7 @@ mail status in mode line")) word-wrap)) :visible (menu-bar-menu-frame-live-and-visible-p))) - (bindings--define-key menu [truncate] + (define-key menu [truncate] '(menu-item "Truncate Long Lines" menu-bar--toggle-truncate-long-lines :help "Truncate long lines at window edge" @@ -1473,7 +1473,7 @@ mail status in mode line")) :visible (menu-bar-menu-frame-live-and-visible-p) :enable (not (truncated-partial-width-window-p)))) - (bindings--define-key menu [window-wrap] + (define-key menu [window-wrap] '(menu-item "Wrap at Window Edge" menu-bar--wrap-long-lines-window-edge :help "Wrap long lines at window edge" @@ -1491,7 +1491,7 @@ mail status in mode line")) (dolist (x '((char-fold-to-regexp "Fold Characters" "Character folding") (isearch-symbol-regexp "Whole Symbols" "Whole symbol") (word-search-regexp "Whole Words" "Whole word"))) - (bindings--define-key menu (vector (nth 0 x)) + (define-key menu (vector (nth 0 x)) `(menu-item ,(nth 1 x) ,(lambda () (interactive) @@ -1500,7 +1500,7 @@ mail status in mode line")) :help ,(format "Enable %s search" (downcase (nth 2 x))) :button (:radio . (eq search-default-mode #',(nth 0 x)))))) - (bindings--define-key menu [regexp-search] + (define-key menu [regexp-search] `(menu-item "Regular Expression" ,(lambda () (interactive) @@ -1509,7 +1509,7 @@ mail status in mode line")) :help "Enable regular-expression search" :button (:radio . (eq search-default-mode t)))) - (bindings--define-key menu [regular-search] + (define-key menu [regular-search] `(menu-item "Literal Search" ,(lambda () (interactive) @@ -1520,9 +1520,9 @@ mail status in mode line")) :help "Disable special search modes" :button (:radio . (not search-default-mode)))) - (bindings--define-key menu [custom-separator] + (define-key menu [custom-separator] menu-bar-separator) - (bindings--define-key menu [case-fold-search] + (define-key menu [case-fold-search] (menu-bar-make-toggle-command toggle-case-fold-search case-fold-search "Ignore Case" @@ -1533,74 +1533,74 @@ mail status in mode line")) (defvar menu-bar-options-menu (let ((menu (make-sparse-keymap "Options"))) - (bindings--define-key menu [customize] + (define-key menu [customize] `(menu-item "Customize Emacs" ,menu-bar-custom-menu)) - (bindings--define-key menu [package] + (define-key menu [package] '(menu-item "Manage Emacs Packages" package-list-packages :help "Install or uninstall additional Emacs packages")) - (bindings--define-key menu [save] + (define-key menu [save] '(menu-item "Save Options" menu-bar-options-save :help "Save options set from the menu above")) - (bindings--define-key menu [custom-separator] + (define-key menu [custom-separator] menu-bar-separator) - (bindings--define-key menu [menu-set-font] + (define-key menu [menu-set-font] '(menu-item "Set Default Font..." menu-set-font :visible (display-multi-font-p) :help "Select a default font")) (if (featurep 'system-font-setting) - (bindings--define-key menu [menu-system-font] + (define-key menu [menu-system-font] (menu-bar-make-toggle-command toggle-use-system-font font-use-system-font "Use System Font" "Use system font: %s" "Use the monospaced font defined by the system"))) - (bindings--define-key menu [showhide] + (define-key menu [showhide] `(menu-item "Show/Hide" ,menu-bar-showhide-menu)) - (bindings--define-key menu [showhide-separator] + (define-key menu [showhide-separator] menu-bar-separator) - (bindings--define-key menu [mule] + (define-key menu [mule] ;; It is better not to use backquote here, ;; because that makes a bootstrapping problem ;; if you need to recompile all the Lisp files using interpreted code. `(menu-item "Multilingual Environment" ,mule-menu-keymap)) ;;(setq menu-bar-final-items (cons 'mule menu-bar-final-items)) - ;;(bindings--define-key menu [preferences] + ;;(define-key menu [preferences] ;; `(menu-item "Preferences" ,menu-bar-preferences-menu ;; :help "Toggle important global options")) - (bindings--define-key menu [mule-separator] + (define-key menu [mule-separator] menu-bar-separator) - (bindings--define-key menu [debug-on-quit] + (define-key menu [debug-on-quit] (menu-bar-make-toggle-command toggle-debug-on-quit debug-on-quit "Enter Debugger on Quit/C-g" "Debug on Quit %s" "Enter Lisp debugger when C-g is pressed")) - (bindings--define-key menu [debug-on-error] + (define-key menu [debug-on-error] (menu-bar-make-toggle-command toggle-debug-on-error debug-on-error "Enter Debugger on Error" "Debug on Error %s" "Enter Lisp debugger when an error is signaled")) - (bindings--define-key menu [debugger-separator] + (define-key menu [debugger-separator] menu-bar-separator) - (bindings--define-key menu [blink-cursor-mode] + (define-key menu [blink-cursor-mode] (menu-bar-make-mm-toggle blink-cursor-mode "Blink Cursor" "Whether the cursor blinks (Blink Cursor mode)")) - (bindings--define-key menu [cursor-separator] + (define-key menu [cursor-separator] menu-bar-separator) - (bindings--define-key menu [save-desktop] + (define-key menu [save-desktop] (menu-bar-make-toggle-command toggle-save-desktop-globally desktop-save-mode "Save State between Sessions" @@ -1613,7 +1613,7 @@ mail status in mode line")) (set-default 'desktop-save-mode (not (symbol-value 'desktop-save-mode)))))) - (bindings--define-key menu [save-place] + (define-key menu [save-place] (menu-bar-make-toggle-command toggle-save-place-globally save-place-mode "Save Place in Files between Sessions" @@ -1626,7 +1626,7 @@ mail status in mode line")) (set-default 'save-place-mode (not (symbol-value 'save-place-mode)))))) - (bindings--define-key menu [uniquify] + (define-key menu [uniquify] (menu-bar-make-toggle-command toggle-uniquify-buffer-names uniquify-buffer-name-style "Use Directory Names in Buffer Names" @@ -1636,9 +1636,9 @@ mail status in mode line")) (if (not uniquify-buffer-name-style) 'post-forward-angle-brackets)))) - (bindings--define-key menu [edit-options-separator] + (define-key menu [edit-options-separator] menu-bar-separator) - (bindings--define-key menu [cua-mode] + (define-key menu [cua-mode] (menu-bar-make-mm-toggle cua-mode "Cut/Paste with C-x/C-c/C-v (CUA Mode)" @@ -1646,7 +1646,7 @@ mail status in mode line")) (:visible (or (not (boundp 'cua-enable-cua-keys)) cua-enable-cua-keys)))) - (bindings--define-key menu [cua-emulation-mode] + (define-key menu [cua-emulation-mode] (menu-bar-make-mm-toggle cua-mode "CUA Mode (without C-x/C-c/C-v)" @@ -1654,23 +1654,23 @@ mail status in mode line")) (:visible (and (boundp 'cua-enable-cua-keys) (not cua-enable-cua-keys))))) - (bindings--define-key menu [search-options] + (define-key menu [search-options] `(menu-item "Default Search Options" ,menu-bar-search-options-menu)) - (bindings--define-key menu [line-wrapping] + (define-key menu [line-wrapping] `(menu-item "Line Wrapping in This Buffer" ,menu-bar-line-wrapping-menu)) - (bindings--define-key menu [highlight-separator] + (define-key menu [highlight-separator] menu-bar-separator) - (bindings--define-key menu [highlight-paren-mode] + (define-key menu [highlight-paren-mode] (menu-bar-make-mm-toggle show-paren-mode "Highlight Matching Parentheses" "Highlight matching/mismatched parentheses at cursor (Show Paren mode)")) - (bindings--define-key menu [transient-mark-mode] + (define-key menu [transient-mark-mode] (menu-bar-make-mm-toggle transient-mark-mode "Highlight Active Region" @@ -1684,104 +1684,104 @@ mail status in mode line")) (defvar menu-bar-games-menu (let ((menu (make-sparse-keymap "Games"))) - (bindings--define-key menu [zone] + (define-key menu [zone] '(menu-item "Zone Out" zone :help "Play tricks with Emacs display when Emacs is idle")) - (bindings--define-key menu [tetris] + (define-key menu [tetris] '(menu-item "Tetris" tetris :help "Falling blocks game")) - (bindings--define-key menu [solitaire] + (define-key menu [solitaire] '(menu-item "Solitaire" solitaire :help "Get rid of all the stones")) - (bindings--define-key menu [snake] + (define-key menu [snake] '(menu-item "Snake" snake :help "Move snake around avoiding collisions")) - (bindings--define-key menu [pong] + (define-key menu [pong] '(menu-item "Pong" pong :help "Bounce the ball to your opponent")) - (bindings--define-key menu [mult] + (define-key menu [mult] '(menu-item "Multiplication Puzzle" mpuz :help "Exercise brain with multiplication")) - (bindings--define-key menu [life] + (define-key menu [life] '(menu-item "Life" life :help "Watch how John Conway's cellular automaton evolves")) - (bindings--define-key menu [hanoi] + (define-key menu [hanoi] '(menu-item "Towers of Hanoi" hanoi :help "Watch Towers-of-Hanoi puzzle solved by Emacs")) - (bindings--define-key menu [gomoku] + (define-key menu [gomoku] '(menu-item "Gomoku" gomoku :help "Mark 5 contiguous squares (like tic-tac-toe)")) - (bindings--define-key menu [bubbles] + (define-key menu [bubbles] '(menu-item "Bubbles" bubbles :help "Remove all bubbles using the fewest moves")) - (bindings--define-key menu [black-box] + (define-key menu [black-box] '(menu-item "Blackbox" blackbox :help "Find balls in a black box by shooting rays")) - (bindings--define-key menu [adventure] + (define-key menu [adventure] '(menu-item "Adventure" dunnet :help "Dunnet, a text Adventure game for Emacs")) - (bindings--define-key menu [5x5] + (define-key menu [5x5] '(menu-item "5x5" 5x5 :help "Fill in all the squares on a 5x5 board")) menu)) (defvar menu-bar-encryption-decryption-menu (let ((menu (make-sparse-keymap "Encryption/Decryption"))) - (bindings--define-key menu [insert-keys] + (define-key menu [insert-keys] '(menu-item "Insert Keys" epa-insert-keys :help "Insert public keys after the current point")) - (bindings--define-key menu [export-keys] + (define-key menu [export-keys] '(menu-item "Export Keys" epa-export-keys :help "Export public keys to a file")) - (bindings--define-key menu [import-keys-region] + (define-key menu [import-keys-region] '(menu-item "Import Keys from Region" epa-import-keys-region :help "Import public keys from the current region")) - (bindings--define-key menu [import-keys] + (define-key menu [import-keys] '(menu-item "Import Keys from File..." epa-import-keys :help "Import public keys from a file")) - (bindings--define-key menu [list-keys] + (define-key menu [list-keys] '(menu-item "List Keys" epa-list-keys :help "Browse your public keyring")) - (bindings--define-key menu [separator-keys] + (define-key menu [separator-keys] menu-bar-separator) - (bindings--define-key menu [sign-region] + (define-key menu [sign-region] '(menu-item "Sign Region" epa-sign-region :help "Create digital signature of the current region")) - (bindings--define-key menu [verify-region] + (define-key menu [verify-region] '(menu-item "Verify Region" epa-verify-region :help "Verify digital signature of the current region")) - (bindings--define-key menu [encrypt-region] + (define-key menu [encrypt-region] '(menu-item "Encrypt Region" epa-encrypt-region :help "Encrypt the current region")) - (bindings--define-key menu [decrypt-region] + (define-key menu [decrypt-region] '(menu-item "Decrypt Region" epa-decrypt-region :help "Decrypt the current region")) - (bindings--define-key menu [separator-file] + (define-key menu [separator-file] menu-bar-separator) - (bindings--define-key menu [sign-file] + (define-key menu [sign-file] '(menu-item "Sign File..." epa-sign-file :help "Create digital signature of a file")) - (bindings--define-key menu [verify-file] + (define-key menu [verify-file] '(menu-item "Verify File..." epa-verify-file :help "Verify digital signature of a file")) - (bindings--define-key menu [encrypt-file] + (define-key menu [encrypt-file] '(menu-item "Encrypt File..." epa-encrypt-file :help "Encrypt a file")) - (bindings--define-key menu [decrypt-file] + (define-key menu [decrypt-file] '(menu-item "Decrypt File..." epa-decrypt-file :help "Decrypt a file")) @@ -1789,24 +1789,24 @@ mail status in mode line")) (defvar menu-bar-shell-commands-menu (let ((menu (make-sparse-keymap "Shell Commands"))) - (bindings--define-key menu [project-interactive-shell] + (define-key menu [project-interactive-shell] '(menu-item "Run Shell In Project" project-shell :help "Run a subshell interactively, in the current project's root directory")) - (bindings--define-key menu [interactive-shell] + (define-key menu [interactive-shell] '(menu-item "Run Shell" shell :help "Run a subshell interactively")) - (bindings--define-key menu [async-shell-command] + (define-key menu [async-shell-command] '(menu-item "Async Shell Command..." async-shell-command :help "Invoke a shell command asynchronously in background")) - (bindings--define-key menu [shell-on-region] + (define-key menu [shell-on-region] '(menu-item "Shell Command on Region..." shell-command-on-region :enable mark-active :help "Pass marked region to a shell command")) - (bindings--define-key menu [shell] + (define-key menu [shell] '(menu-item "Shell Command..." shell-command :help "Invoke a shell command and catch its output")) @@ -1814,27 +1814,27 @@ mail status in mode line")) (defvar menu-bar-project-menu (let ((menu (make-sparse-keymap "Project"))) - (bindings--define-key menu [project-execute-extended-command] '(menu-item "Execute Extended Command..." project-execute-extended-command :help "Execute an extended command in project root directory")) - (bindings--define-key menu [project-query-replace-regexp] '(menu-item "Query Replace Regexp..." project-query-replace-regexp :help "Interactively replace a regexp in files belonging to current project")) - (bindings--define-key menu [project-or-external-find-regexp] '(menu-item "Find Regexp Including External Roots..." project-or-external-find-regexp :help "Search for a regexp in files belonging to current project or external files")) - (bindings--define-key menu [project-find-regexp] '(menu-item "Find Regexp..." project-find-regexp :help "Search for a regexp in files belonging to current project")) - (bindings--define-key menu [separator-project-search] menu-bar-separator) - (bindings--define-key menu [project-kill-buffers] '(menu-item "Kill Buffers..." project-kill-buffers :help "Kill the buffers belonging to the current project")) - (bindings--define-key menu [project-list-buffers] '(menu-item "List Buffers" project-list-buffers :help "Pop up a window listing all Emacs buffers belonging to current project")) - (bindings--define-key menu [project-switch-to-buffer] '(menu-item "Switch To Buffer..." project-switch-to-buffer :help "Prompt for a buffer belonging to current project, and switch to it")) - (bindings--define-key menu [separator-project-buffers] menu-bar-separator) - (bindings--define-key menu [project-async-shell-command] '(menu-item "Async Shell Command..." project-async-shell-command :help "Invoke a shell command in project root asynchronously in background")) - (bindings--define-key menu [project-shell-command] '(menu-item "Shell Command..." project-shell-command :help "Invoke a shell command in project root and catch its output")) - (bindings--define-key menu [project-eshell] '(menu-item "Run Eshell" project-eshell :help "Run eshell for the current project")) - (bindings--define-key menu [project-shell] '(menu-item "Run Shell" project-shell :help "Run a subshell interactively, in the current project's root directory")) - (bindings--define-key menu [project-compile] '(menu-item "Compile..." project-compile :help "Invoke compiler or Make for current project, view errors")) - (bindings--define-key menu [separator-project-programs] menu-bar-separator) - (bindings--define-key menu [project-switch-project] '(menu-item "Switch Project..." project-switch-project :help "Switch to another project and then run a command")) - (bindings--define-key menu [project-vc-dir] '(menu-item "VC Dir" project-vc-dir :help "Show the VC status of the project repository")) - (bindings--define-key menu [project-dired] '(menu-item "Open Project Root" project-dired :help "Read the root directory of the current project, to operate on its files")) - (bindings--define-key menu [project-find-dir] '(menu-item "Open Directory..." project-find-dir :help "Open existing directory that belongs to current project")) - (bindings--define-key menu [project-or-external-find-file] '(menu-item "Open File Including External Roots..." project-or-external-find-file :help "Open existing file that belongs to current project or its external roots")) - (bindings--define-key menu [project-open-file] '(menu-item "Open File..." project-find-file :help "Open an existing file that belongs to current project")) + (define-key menu [project-execute-extended-command] '(menu-item "Execute Extended Command..." project-execute-extended-command :help "Execute an extended command in project root directory")) + (define-key menu [project-query-replace-regexp] '(menu-item "Query Replace Regexp..." project-query-replace-regexp :help "Interactively replace a regexp in files belonging to current project")) + (define-key menu [project-or-external-find-regexp] '(menu-item "Find Regexp Including External Roots..." project-or-external-find-regexp :help "Search for a regexp in files belonging to current project or external files")) + (define-key menu [project-find-regexp] '(menu-item "Find Regexp..." project-find-regexp :help "Search for a regexp in files belonging to current project")) + (define-key menu [separator-project-search] menu-bar-separator) + (define-key menu [project-kill-buffers] '(menu-item "Kill Buffers..." project-kill-buffers :help "Kill the buffers belonging to the current project")) + (define-key menu [project-list-buffers] '(menu-item "List Buffers" project-list-buffers :help "Pop up a window listing all Emacs buffers belonging to current project")) + (define-key menu [project-switch-to-buffer] '(menu-item "Switch To Buffer..." project-switch-to-buffer :help "Prompt for a buffer belonging to current project, and switch to it")) + (define-key menu [separator-project-buffers] menu-bar-separator) + (define-key menu [project-async-shell-command] '(menu-item "Async Shell Command..." project-async-shell-command :help "Invoke a shell command in project root asynchronously in background")) + (define-key menu [project-shell-command] '(menu-item "Shell Command..." project-shell-command :help "Invoke a shell command in project root and catch its output")) + (define-key menu [project-eshell] '(menu-item "Run Eshell" project-eshell :help "Run eshell for the current project")) + (define-key menu [project-shell] '(menu-item "Run Shell" project-shell :help "Run a subshell interactively, in the current project's root directory")) + (define-key menu [project-compile] '(menu-item "Compile..." project-compile :help "Invoke compiler or Make for current project, view errors")) + (define-key menu [separator-project-programs] menu-bar-separator) + (define-key menu [project-switch-project] '(menu-item "Switch Project..." project-switch-project :help "Switch to another project and then run a command")) + (define-key menu [project-vc-dir] '(menu-item "VC Dir" project-vc-dir :help "Show the VC status of the project repository")) + (define-key menu [project-dired] '(menu-item "Open Project Root" project-dired :help "Read the root directory of the current project, to operate on its files")) + (define-key menu [project-find-dir] '(menu-item "Open Directory..." project-find-dir :help "Open existing directory that belongs to current project")) + (define-key menu [project-or-external-find-file] '(menu-item "Open File Including External Roots..." project-or-external-find-file :help "Open existing file that belongs to current project or its external roots")) + (define-key menu [project-open-file] '(menu-item "Open File..." project-find-file :help "Open an existing file that belongs to current project")) menu)) (defvar menu-bar-project-item @@ -1848,112 +1848,112 @@ mail status in mode line")) (defvar menu-bar-tools-menu (let ((menu (make-sparse-keymap "Tools"))) - (bindings--define-key menu [games] + (define-key menu [games] `(menu-item "Games" ,menu-bar-games-menu)) - (bindings--define-key menu [separator-games] + (define-key menu [separator-games] menu-bar-separator) - (bindings--define-key menu [encryption-decryption] + (define-key menu [encryption-decryption] `(menu-item "Encryption/Decryption" ,menu-bar-encryption-decryption-menu)) - (bindings--define-key menu [separator-encryption-decryption] + (define-key menu [separator-encryption-decryption] menu-bar-separator) - (bindings--define-key menu [simple-calculator] + (define-key menu [simple-calculator] '(menu-item "Simple Calculator" calculator :help "Invoke the Emacs built-in quick calculator")) - (bindings--define-key menu [calc] + (define-key menu [calc] '(menu-item "Programmable Calculator" calc :help "Invoke the Emacs built-in full scientific calculator")) - (bindings--define-key menu [calendar] + (define-key menu [calendar] '(menu-item "Calendar" calendar :help "Invoke the Emacs built-in calendar")) - (bindings--define-key menu [separator-net] + (define-key menu [separator-net] menu-bar-separator) - (bindings--define-key menu [browse-web] + (define-key menu [browse-web] '(menu-item "Browse the Web..." browse-web)) - (bindings--define-key menu [directory-search] + (define-key menu [directory-search] '(menu-item "Directory Servers" eudc-tools-menu)) - (bindings--define-key menu [compose-mail] + (define-key menu [compose-mail] '(menu-item "Compose New Mail" compose-mail :visible (and mail-user-agent (not (eq mail-user-agent 'ignore))) :help "Start writing a new mail message")) - (bindings--define-key menu [rmail] + (define-key menu [rmail] '(menu-item "Read Mail" menu-bar-read-mail :visible (and read-mail-command (not (eq read-mail-command 'ignore))) :help "Read your mail")) - (bindings--define-key menu [gnus] + (define-key menu [gnus] '(menu-item "Read Net News" gnus :help "Read network news groups")) - (bindings--define-key menu [separator-vc] + (define-key menu [separator-vc] menu-bar-separator) - (bindings--define-key menu [vc] nil) ;Create the place for the VC menu. + (define-key menu [vc] nil) ;Create the place for the VC menu. - (bindings--define-key menu [separator-compare] + (define-key menu [separator-compare] menu-bar-separator) - (bindings--define-key menu [epatch] + (define-key menu [epatch] '(menu-item "Apply Patch" menu-bar-epatch-menu)) - (bindings--define-key menu [ediff-merge] + (define-key menu [ediff-merge] '(menu-item "Merge" menu-bar-ediff-merge-menu)) - (bindings--define-key menu [compare] + (define-key menu [compare] '(menu-item "Compare (Ediff)" menu-bar-ediff-menu)) - (bindings--define-key menu [separator-spell] + (define-key menu [separator-spell] menu-bar-separator) - (bindings--define-key menu [spell] + (define-key menu [spell] '(menu-item "Spell Checking" ispell-menu-map)) - (bindings--define-key menu [separator-prog] + (define-key menu [separator-prog] menu-bar-separator) - (bindings--define-key menu [semantic] + (define-key menu [semantic] '(menu-item "Source Code Parsers (Semantic)" semantic-mode :help "Toggle automatic parsing in source code buffers (Semantic mode)" :button (:toggle . (bound-and-true-p semantic-mode)))) - (bindings--define-key menu [eglot] + (define-key menu [eglot] '(menu-item "Language Server Support (Eglot)" eglot :help "Start language server suitable for this buffer's major-mode")) - (bindings--define-key menu [project] + (define-key menu [project] menu-bar-project-item) - (bindings--define-key menu [ede] + (define-key menu [ede] '(menu-item "Project Support (EDE)" global-ede-mode :help "Toggle the Emacs Development Environment (Global EDE mode)" :button (:toggle . (bound-and-true-p global-ede-mode)))) - (bindings--define-key menu [gdb] + (define-key menu [gdb] '(menu-item "Debugger (GDB)..." gdb :help "Debug a program from within Emacs with GDB")) - (bindings--define-key menu [project-compile] + (define-key menu [project-compile] '(menu-item "Compile Project..." project-compile :help "Invoke compiler or Make for current project, view errors")) - (bindings--define-key menu [compile] + (define-key menu [compile] '(menu-item "Compile..." compile :help "Invoke compiler or Make in current buffer's directory, view errors")) - (bindings--define-key menu [shell-commands] + (define-key menu [shell-commands] `(menu-item "Shell Commands" ,menu-bar-shell-commands-menu)) - (bindings--define-key menu [rgrep] + (define-key menu [rgrep] '(menu-item "Recursive Grep..." rgrep :help "Interactively ask for parameters and search recursively")) - (bindings--define-key menu [grep] + (define-key menu [grep] '(menu-item "Search Files (Grep)..." grep :help "Search files for strings or regexps (with Grep)")) menu)) @@ -1963,58 +1963,58 @@ mail status in mode line")) (defvar menu-bar-describe-menu (let ((menu (make-sparse-keymap "Describe"))) - (bindings--define-key menu [mule-diag] + (define-key menu [mule-diag] '(menu-item "Show All of Mule Status" mule-diag :help "Display multilingual environment settings")) - (bindings--define-key menu [describe-coding-system-briefly] + (define-key menu [describe-coding-system-briefly] '(menu-item "Describe Coding System (Briefly)" describe-current-coding-system-briefly)) - (bindings--define-key menu [describe-coding-system] + (define-key menu [describe-coding-system] '(menu-item "Describe Coding System..." describe-coding-system)) - (bindings--define-key menu [describe-input-method] + (define-key menu [describe-input-method] '(menu-item "Describe Input Method..." describe-input-method :help "Keyboard layout for specific input method")) - (bindings--define-key menu [describe-language-environment] + (define-key menu [describe-language-environment] `(menu-item "Describe Language Environment" ,describe-language-environment-map)) - (bindings--define-key menu [separator-desc-mule] + (define-key menu [separator-desc-mule] menu-bar-separator) - (bindings--define-key menu [list-keybindings] + (define-key menu [list-keybindings] '(menu-item "List Key Bindings" describe-bindings :help "Display all current key bindings (keyboard shortcuts)")) - (bindings--define-key menu [list-recent-keystrokes] + (define-key menu [list-recent-keystrokes] '(menu-item "Show Recent Inputs" view-lossage :help "Display last few input events and the commands \ they ran")) - (bindings--define-key menu [describe-current-display-table] + (define-key menu [describe-current-display-table] '(menu-item "Describe Display Table" describe-current-display-table :help "Describe the current display table")) - (bindings--define-key menu [describe-package] + (define-key menu [describe-package] '(menu-item "Describe Package..." describe-package :help "Display documentation of a Lisp package")) - (bindings--define-key menu [describe-face] + (define-key menu [describe-face] '(menu-item "Describe Face..." describe-face :help "Display the properties of a face")) - (bindings--define-key menu [describe-variable] + (define-key menu [describe-variable] '(menu-item "Describe Variable..." describe-variable :help "Display documentation of variable/option")) - (bindings--define-key menu [describe-function] + (define-key menu [describe-function] '(menu-item "Describe Function..." describe-function :help "Display documentation of function/command")) - (bindings--define-key menu [describe-command] + (define-key menu [describe-command] '(menu-item "Describe Command..." describe-command :help "Display documentation of command")) - (bindings--define-key menu [shortdoc-display-group] + (define-key menu [shortdoc-display-group] '(menu-item "Function Group Overview..." shortdoc-display-group :help "Display a function overview for a specific topic")) - (bindings--define-key menu [describe-key-1] + (define-key menu [describe-key-1] '(menu-item "Describe Key or Mouse Operation..." describe-key ;; Users typically don't identify keys and menu items... :help "Display documentation of command bound to a \ key, a click, or a menu-item")) - (bindings--define-key menu [describe-mode] + (define-key menu [describe-mode] '(menu-item "Describe Buffer Modes" describe-mode :help "Describe this buffer's major and minor mode")) menu)) @@ -2059,40 +2059,40 @@ key, a click, or a menu-item")) (defvar menu-bar-search-documentation-menu (let ((menu (make-sparse-keymap "Search Documentation"))) - (bindings--define-key menu [search-documentation-strings] + (define-key menu [search-documentation-strings] '(menu-item "Search Documentation Strings..." apropos-documentation :help "Find functions and variables whose doc strings match a regexp")) - (bindings--define-key menu [find-any-object-by-name] + (define-key menu [find-any-object-by-name] '(menu-item "Find Any Object by Name..." apropos :help "Find symbols of any kind whose names match a regexp")) - (bindings--define-key menu [find-option-by-value] + (define-key menu [find-option-by-value] '(menu-item "Find Options by Value..." apropos-value :help "Find variables whose values match a regexp")) - (bindings--define-key menu [find-options-by-name] + (define-key menu [find-options-by-name] '(menu-item "Find Options by Name..." apropos-user-option :help "Find user options whose names match a regexp")) - (bindings--define-key menu [find-commands-by-name] + (define-key menu [find-commands-by-name] '(menu-item "Find Commands by Name..." apropos-command :help "Find commands whose names match a regexp")) - (bindings--define-key menu [sep1] + (define-key menu [sep1] menu-bar-separator) - (bindings--define-key menu [lookup-symbol-in-manual] + (define-key menu [lookup-symbol-in-manual] '(menu-item "Look Up Symbol in Manual..." info-lookup-symbol :help "Display manual section that describes a symbol")) - (bindings--define-key menu [lookup-command-in-manual] + (define-key menu [lookup-command-in-manual] '(menu-item "Look Up Command in User Manual..." Info-goto-emacs-command-node :help "Display manual section that describes a command")) - (bindings--define-key menu [lookup-key-in-manual] + (define-key menu [lookup-key-in-manual] '(menu-item "Look Up Key in User Manual..." Info-goto-emacs-key-command-node :help "Display manual section that describes a key")) - (bindings--define-key menu [lookup-subject-in-elisp-manual] + (define-key menu [lookup-subject-in-elisp-manual] '(menu-item "Look Up Subject in ELisp Manual..." elisp-index-search :help "Find description of a subject in Emacs Lisp manual")) - (bindings--define-key menu [lookup-subject-in-emacs-manual] + (define-key menu [lookup-subject-in-emacs-manual] '(menu-item "Look Up Subject in User Manual..." emacs-index-search :help "Find description of a subject in Emacs User manual")) - (bindings--define-key menu [emacs-terminology] + (define-key menu [emacs-terminology] '(menu-item "Emacs Terminology" search-emacs-glossary :help "Display the Glossary section of the Emacs manual")) menu)) @@ -2100,24 +2100,24 @@ key, a click, or a menu-item")) (defvar menu-bar-manuals-menu (let ((menu (make-sparse-keymap "More Manuals"))) - (bindings--define-key menu [man] + (define-key menu [man] '(menu-item "Read Man Page..." manual-entry :help "Man-page docs for external commands and libraries")) - (bindings--define-key menu [sep2] + (define-key menu [sep2] menu-bar-separator) - (bindings--define-key menu [order-emacs-manuals] + (define-key menu [order-emacs-manuals] '(menu-item "Ordering Manuals" view-order-manuals :help "How to order manuals from the Free Software Foundation")) - (bindings--define-key menu [lookup-subject-in-all-manuals] + (define-key menu [lookup-subject-in-all-manuals] '(menu-item "Lookup Subject in all Manuals..." info-apropos :help "Find description of a subject in all installed manuals")) - (bindings--define-key menu [other-manuals] + (define-key menu [other-manuals] '(menu-item "All Other Manuals (Info)" Info-directory :help "Read any of the installed manuals")) - (bindings--define-key menu [emacs-lisp-reference] + (define-key menu [emacs-lisp-reference] '(menu-item "Emacs Lisp Reference" menu-bar-read-lispref :help "Read the Emacs Lisp Reference manual")) - (bindings--define-key menu [emacs-lisp-intro] + (define-key menu [emacs-lisp-intro] '(menu-item "Introduction to Emacs Lisp" menu-bar-read-lispintro :help "Read the Introduction to Emacs Lisp Programming")) menu)) @@ -2129,66 +2129,66 @@ key, a click, or a menu-item")) (defvar menu-bar-help-menu (let ((menu (make-sparse-keymap "Help"))) - (bindings--define-key menu [about-gnu-project] + (define-key menu [about-gnu-project] '(menu-item "About GNU" describe-gnu-project :help "About the GNU System, GNU Project, and GNU/Linux")) - (bindings--define-key menu [about-emacs] + (define-key menu [about-emacs] '(menu-item "About Emacs" about-emacs :help "Display version number, copyright info, and basic help")) - (bindings--define-key menu [sep4] + (define-key menu [sep4] menu-bar-separator) - (bindings--define-key menu [describe-no-warranty] + (define-key menu [describe-no-warranty] '(menu-item "(Non)Warranty" describe-no-warranty :help "Explain that Emacs has NO WARRANTY")) - (bindings--define-key menu [describe-copying] + (define-key menu [describe-copying] '(menu-item "Copying Conditions" describe-copying :help "Show the Emacs license (GPL)")) - (bindings--define-key menu [getting-new-versions] + (define-key menu [getting-new-versions] '(menu-item "Getting New Versions" describe-distribution :help "How to get the latest version of Emacs")) - (bindings--define-key menu [sep2] + (define-key menu [sep2] menu-bar-separator) - (bindings--define-key menu [external-packages] + (define-key menu [external-packages] '(menu-item "Finding Extra Packages" view-external-packages :help "How to get more Lisp packages for use in Emacs")) - (bindings--define-key menu [find-emacs-packages] + (define-key menu [find-emacs-packages] '(menu-item "Search Built-in Packages" finder-by-keyword :help "Find built-in packages and features by keyword")) - (bindings--define-key menu [more-manuals] + (define-key menu [more-manuals] `(menu-item "More Manuals" ,menu-bar-manuals-menu)) - (bindings--define-key menu [emacs-manual] + (define-key menu [emacs-manual] '(menu-item "Read the Emacs Manual" info-emacs-manual :help "Full documentation of Emacs features")) - (bindings--define-key menu [describe] + (define-key menu [describe] `(menu-item "Describe" ,menu-bar-describe-menu)) - (bindings--define-key menu [search-documentation] + (define-key menu [search-documentation] `(menu-item "Search Documentation" ,menu-bar-search-documentation-menu)) - (bindings--define-key menu [sep1] + (define-key menu [sep1] menu-bar-separator) - (bindings--define-key menu [emacs-psychotherapist] + (define-key menu [emacs-psychotherapist] '(menu-item "Emacs Psychotherapist" doctor :help "Our doctor will help you feel better")) - (bindings--define-key menu [send-emacs-bug-report] + (define-key menu [send-emacs-bug-report] '(menu-item "Send Bug Report..." report-emacs-bug :help "Send e-mail to Emacs maintainers")) - (bindings--define-key menu [emacs-manual-bug] + (define-key menu [emacs-manual-bug] '(menu-item "How to Report a Bug" info-emacs-bug :help "Read about how to report an Emacs bug")) - (bindings--define-key menu [emacs-known-problems] + (define-key menu [emacs-known-problems] '(menu-item "Emacs Known Problems" view-emacs-problems :help "Read about known problems with Emacs")) - (bindings--define-key menu [emacs-news] + (define-key menu [emacs-news] '(menu-item "Emacs News" view-emacs-news :help "New features of this version")) - (bindings--define-key menu [emacs-faq] + (define-key menu [emacs-faq] '(menu-item "Emacs FAQ" view-emacs-FAQ :help "Frequently asked (and answered) questions about Emacs")) - (bindings--define-key menu [emacs-tutorial-language-specific] + (define-key menu [emacs-tutorial-language-specific] '(menu-item "Emacs Tutorial (choose language)..." help-with-tutorial-spec-language :help "Learn how to use Emacs (choose a language)")) - (bindings--define-key menu [emacs-tutorial] + (define-key menu [emacs-tutorial] '(menu-item "Emacs Tutorial" help-with-tutorial :help "Learn how to use Emacs")) @@ -2196,22 +2196,22 @@ key, a click, or a menu-item")) ;; FIXME? There already is an "About Emacs" (sans ...) entry in the Help menu. (and (featurep 'ns) (not (eq system-type 'darwin)) - (bindings--define-key menu [info-panel] + (define-key menu [info-panel] '(menu-item "About Emacs..." ns-do-emacs-info-panel))) menu)) -(bindings--define-key global-map [menu-bar tools] +(define-key global-map [menu-bar tools] (cons "Tools" menu-bar-tools-menu)) -(bindings--define-key global-map [menu-bar buffer] +(define-key global-map [menu-bar buffer] (cons "Buffers" global-buffers-menu-map)) -(bindings--define-key global-map [menu-bar options] +(define-key global-map [menu-bar options] (cons "Options" menu-bar-options-menu)) -(bindings--define-key global-map [menu-bar edit] +(define-key global-map [menu-bar edit] (cons "Edit" menu-bar-edit-menu)) -(bindings--define-key global-map [menu-bar file] +(define-key global-map [menu-bar file] (cons "File" menu-bar-file-menu)) -(bindings--define-key global-map [menu-bar help-menu] - (cons (purecopy "Help") menu-bar-help-menu)) +(define-key global-map [menu-bar help-menu] + (cons "Help" menu-bar-help-menu)) (define-key global-map [menu-bar mouse-1] 'menu-bar-open-mouse) @@ -2576,38 +2576,38 @@ It must accept a buffer as its only required argument.") ;; This shouldn't be necessary, but there's a funny ;; bug in keymap.c that I don't understand yet. -stef minibuffer-local-completion-map)) - (bindings--define-key map [menu-bar minibuf] + (define-key map [menu-bar minibuf] (cons "Minibuf" (make-sparse-keymap "Minibuf")))) (let ((map minibuffer-local-completion-map)) - (bindings--define-key map [menu-bar minibuf ?\?] + (define-key map [menu-bar minibuf ?\?] '(menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions")) - (bindings--define-key map [menu-bar minibuf space] + (define-key map [menu-bar minibuf space] '(menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word")) - (bindings--define-key map [menu-bar minibuf tab] + (define-key map [menu-bar minibuf tab] '(menu-item "Complete" minibuffer-complete :help "Complete as far as possible"))) (let ((map minibuffer-local-map)) - (bindings--define-key map [menu-bar minibuf quit] + (define-key map [menu-bar minibuf quit] '(menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer")) - (bindings--define-key map [menu-bar minibuf return] + (define-key map [menu-bar minibuf return] '(menu-item "Enter" exit-minibuffer :key-sequence "\r" :help "Terminate input and exit minibuffer")) - (bindings--define-key map [menu-bar minibuf isearch-forward] + (define-key map [menu-bar minibuf isearch-forward] '(menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward")) - (bindings--define-key map [menu-bar minibuf isearch-backward] + (define-key map [menu-bar minibuf isearch-backward] '(menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward")) - (bindings--define-key map [menu-bar minibuf next] + (define-key map [menu-bar minibuf next] '(menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer")) - (bindings--define-key map [menu-bar minibuf previous] + (define-key map [menu-bar minibuf previous] '(menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer"))) diff --git a/lisp/mouse.el b/lisp/mouse.el index 6fe691693b4..b05115b237d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -666,7 +666,7 @@ Some context functions add menu items below the separator." menu) (defvar context-menu-entry - `(menu-item ,(purecopy "Context Menu") ,(make-sparse-keymap) + `(menu-item "Context Menu" ,(make-sparse-keymap) :filter ,(lambda (_) (context-menu-map))) "Menu item that creates the context menu and can be bound to a mouse key.") @@ -2676,7 +2676,6 @@ a large number if you prefer a mixed multitude. The default is 4." :version "20.3") (defvar mouse-buffer-menu-mode-groups - (mapcar (lambda (arg) (cons (purecopy (car arg)) (purecopy (cdr arg)))) '(("Info\\|Help\\|Apropos\\|Man" . "Help") ("\\bVM\\b\\|\\bMH\\b\\|Message\\b\\|Mail\\|Group\\|Score\\|Summary\\|Article" . "Mail/News") @@ -2688,7 +2687,7 @@ a large number if you prefer a mixed multitude. The default is 4." ("\\blog\\b\\|diff\\|\\bvc\\b\\|cvs\\|Git\\|Annotate" . "Version Control") ("Threads\\|Memory\\|Disassembly\\|Breakpoints\\|Frames\\|Locals\\|Registers\\|Inferior I/O\\|Debugger" . "GDB") - ("Lisp" . "Lisp"))) + ("Lisp" . "Lisp")) "How to group various major modes together in \\[mouse-buffer-menu]. Each element has the form (REGEXP . GROUPNAME). If the major mode's name string matches REGEXP, use GROUPNAME instead.") @@ -2853,81 +2852,77 @@ and selects that window." (defvar x-fixed-font-alist (list - (purecopy "Font Menu") + "Font Menu" (cons - (purecopy "Misc") - (mapcar - (lambda (arg) (cons (purecopy (car arg)) (purecopy (cdr arg)))) - ;; For these, we specify the pixel height and width. + "Misc" + ;; For these, we specify the pixel height and width. '(("fixed" "fixed") - ("6x10" "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso8859-1" "6x10") - ("6x12" - "-misc-fixed-medium-r-semicondensed--12-*-*-*-c-60-iso8859-1" "6x12") - ("6x13" - "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" "6x13") - ("7x13" "-misc-fixed-medium-r-normal--13-*-*-*-c-70-iso8859-1" "7x13") - ("7x14" "-misc-fixed-medium-r-normal--14-*-*-*-c-70-iso8859-1" "7x14") - ("8x13" "-misc-fixed-medium-r-normal--13-*-*-*-c-80-iso8859-1" "8x13") - ("9x15" "-misc-fixed-medium-r-normal--15-*-*-*-c-90-iso8859-1" "9x15") - ("10x20" "-misc-fixed-medium-r-normal--20-*-*-*-c-100-iso8859-1" "10x20") - ("11x18" "-misc-fixed-medium-r-normal--18-*-*-*-c-110-iso8859-1" "11x18") - ("12x24" "-misc-fixed-medium-r-normal--24-*-*-*-c-120-iso8859-1" "12x24") - ("") - ("clean 5x8" - "-schumacher-clean-medium-r-normal--8-*-*-*-c-50-iso8859-1") - ("clean 6x8" - "-schumacher-clean-medium-r-normal--8-*-*-*-c-60-iso8859-1") - ("clean 8x8" - "-schumacher-clean-medium-r-normal--8-*-*-*-c-80-iso8859-1") - ("clean 8x10" - "-schumacher-clean-medium-r-normal--10-*-*-*-c-80-iso8859-1") - ("clean 8x14" - "-schumacher-clean-medium-r-normal--14-*-*-*-c-80-iso8859-1") - ("clean 8x16" - "-schumacher-clean-medium-r-normal--16-*-*-*-c-80-iso8859-1") - ("") - ("sony 8x16" "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1") - ;; We don't seem to have these; who knows what they are. - ;; ("fg-18" "fg-18") - ;; ("fg-25" "fg-25") - ("lucidasanstypewriter-12" "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1") - ("lucidasanstypewriter-bold-14" "-b&h-lucidatypewriter-bold-r-normal-sans-*-140-*-*-*-*-iso8859-1") - ("lucidasanstypewriter-bold-24" - "-b&h-lucidatypewriter-bold-r-normal-sans-*-240-*-*-*-*-iso8859-1") - ;; ("lucidatypewriter-bold-r-24" "-b&h-lucidatypewriter-bold-r-normal-sans-24-240-75-75-m-140-iso8859-1") - ;; ("fixed-medium-20" "-misc-fixed-medium-*-*-*-20-*-*-*-*-*-*-*") - ))) + ("6x10" "-misc-fixed-medium-r-normal--10-*-*-*-c-60-iso8859-1" "6x10") + ("6x12" + "-misc-fixed-medium-r-semicondensed--12-*-*-*-c-60-iso8859-1" "6x12") + ("6x13" + "-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1" "6x13") + ("7x13" "-misc-fixed-medium-r-normal--13-*-*-*-c-70-iso8859-1" "7x13") + ("7x14" "-misc-fixed-medium-r-normal--14-*-*-*-c-70-iso8859-1" "7x14") + ("8x13" "-misc-fixed-medium-r-normal--13-*-*-*-c-80-iso8859-1" "8x13") + ("9x15" "-misc-fixed-medium-r-normal--15-*-*-*-c-90-iso8859-1" "9x15") + ("10x20" "-misc-fixed-medium-r-normal--20-*-*-*-c-100-iso8859-1" "10x20") + ("11x18" "-misc-fixed-medium-r-normal--18-*-*-*-c-110-iso8859-1" "11x18") + ("12x24" "-misc-fixed-medium-r-normal--24-*-*-*-c-120-iso8859-1" "12x24") + ("") + ("clean 5x8" + "-schumacher-clean-medium-r-normal--8-*-*-*-c-50-iso8859-1") + ("clean 6x8" + "-schumacher-clean-medium-r-normal--8-*-*-*-c-60-iso8859-1") + ("clean 8x8" + "-schumacher-clean-medium-r-normal--8-*-*-*-c-80-iso8859-1") + ("clean 8x10" + "-schumacher-clean-medium-r-normal--10-*-*-*-c-80-iso8859-1") + ("clean 8x14" + "-schumacher-clean-medium-r-normal--14-*-*-*-c-80-iso8859-1") + ("clean 8x16" + "-schumacher-clean-medium-r-normal--16-*-*-*-c-80-iso8859-1") + ("") + ("sony 8x16" "-sony-fixed-medium-r-normal--16-*-*-*-c-80-iso8859-1") + ;; We don't seem to have these; who knows what they are. + ;; ("fg-18" "fg-18") + ;; ("fg-25" "fg-25") + ("lucidasanstypewriter-12" "-b&h-lucidatypewriter-medium-r-normal-sans-*-120-*-*-*-*-iso8859-1") + ("lucidasanstypewriter-bold-14" "-b&h-lucidatypewriter-bold-r-normal-sans-*-140-*-*-*-*-iso8859-1") + ("lucidasanstypewriter-bold-24" + "-b&h-lucidatypewriter-bold-r-normal-sans-*-240-*-*-*-*-iso8859-1") + ;; ("lucidatypewriter-bold-r-24" "-b&h-lucidatypewriter-bold-r-normal-sans-24-240-75-75-m-140-iso8859-1") + ;; ("fixed-medium-20" "-misc-fixed-medium-*-*-*-20-*-*-*-*-*-*-*") + )) (cons - (purecopy "Courier") - (mapcar - (lambda (arg) (cons (purecopy (car arg)) (purecopy (cdr arg)))) - ;; For these, we specify the point height. - '(("8" "-adobe-courier-medium-r-normal--*-80-*-*-m-*-iso8859-1") - ("10" "-adobe-courier-medium-r-normal--*-100-*-*-m-*-iso8859-1") - ("12" "-adobe-courier-medium-r-normal--*-120-*-*-m-*-iso8859-1") - ("14" "-adobe-courier-medium-r-normal--*-140-*-*-m-*-iso8859-1") - ("18" "-adobe-courier-medium-r-normal--*-180-*-*-m-*-iso8859-1") - ("24" "-adobe-courier-medium-r-normal--*-240-*-*-m-*-iso8859-1") - ("8 bold" "-adobe-courier-bold-r-normal--*-80-*-*-m-*-iso8859-1") - ("10 bold" "-adobe-courier-bold-r-normal--*-100-*-*-m-*-iso8859-1") - ("12 bold" "-adobe-courier-bold-r-normal--*-120-*-*-m-*-iso8859-1") - ("14 bold" "-adobe-courier-bold-r-normal--*-140-*-*-m-*-iso8859-1") - ("18 bold" "-adobe-courier-bold-r-normal--*-180-*-*-m-*-iso8859-1") - ("24 bold" "-adobe-courier-bold-r-normal--*-240-*-*-m-*-iso8859-1") - ("8 slant" "-adobe-courier-medium-o-normal--*-80-*-*-m-*-iso8859-1") - ("10 slant" "-adobe-courier-medium-o-normal--*-100-*-*-m-*-iso8859-1") - ("12 slant" "-adobe-courier-medium-o-normal--*-120-*-*-m-*-iso8859-1") - ("14 slant" "-adobe-courier-medium-o-normal--*-140-*-*-m-*-iso8859-1") - ("18 slant" "-adobe-courier-medium-o-normal--*-180-*-*-m-*-iso8859-1") - ("24 slant" "-adobe-courier-medium-o-normal--*-240-*-*-m-*-iso8859-1") - ("8 bold slant" "-adobe-courier-bold-o-normal--*-80-*-*-m-*-iso8859-1") - ("10 bold slant" "-adobe-courier-bold-o-normal--*-100-*-*-m-*-iso8859-1") - ("12 bold slant" "-adobe-courier-bold-o-normal--*-120-*-*-m-*-iso8859-1") - ("14 bold slant" "-adobe-courier-bold-o-normal--*-140-*-*-m-*-iso8859-1") - ("18 bold slant" "-adobe-courier-bold-o-normal--*-180-*-*-m-*-iso8859-1") - ("24 bold slant" "-adobe-courier-bold-o-normal--*-240-*-*-m-*-iso8859-1") - )))) + "Courier" + ;; For these, we specify the point height. + '(("8" "-adobe-courier-medium-r-normal--*-80-*-*-m-*-iso8859-1") + ("10" "-adobe-courier-medium-r-normal--*-100-*-*-m-*-iso8859-1") + ("12" "-adobe-courier-medium-r-normal--*-120-*-*-m-*-iso8859-1") + ("14" "-adobe-courier-medium-r-normal--*-140-*-*-m-*-iso8859-1") + ("18" "-adobe-courier-medium-r-normal--*-180-*-*-m-*-iso8859-1") + ("24" "-adobe-courier-medium-r-normal--*-240-*-*-m-*-iso8859-1") + ("8 bold" "-adobe-courier-bold-r-normal--*-80-*-*-m-*-iso8859-1") + ("10 bold" "-adobe-courier-bold-r-normal--*-100-*-*-m-*-iso8859-1") + ("12 bold" "-adobe-courier-bold-r-normal--*-120-*-*-m-*-iso8859-1") + ("14 bold" "-adobe-courier-bold-r-normal--*-140-*-*-m-*-iso8859-1") + ("18 bold" "-adobe-courier-bold-r-normal--*-180-*-*-m-*-iso8859-1") + ("24 bold" "-adobe-courier-bold-r-normal--*-240-*-*-m-*-iso8859-1") + ("8 slant" "-adobe-courier-medium-o-normal--*-80-*-*-m-*-iso8859-1") + ("10 slant" "-adobe-courier-medium-o-normal--*-100-*-*-m-*-iso8859-1") + ("12 slant" "-adobe-courier-medium-o-normal--*-120-*-*-m-*-iso8859-1") + ("14 slant" "-adobe-courier-medium-o-normal--*-140-*-*-m-*-iso8859-1") + ("18 slant" "-adobe-courier-medium-o-normal--*-180-*-*-m-*-iso8859-1") + ("24 slant" "-adobe-courier-medium-o-normal--*-240-*-*-m-*-iso8859-1") + ("8 bold slant" "-adobe-courier-bold-o-normal--*-80-*-*-m-*-iso8859-1") + ("10 bold slant" "-adobe-courier-bold-o-normal--*-100-*-*-m-*-iso8859-1") + ("12 bold slant" "-adobe-courier-bold-o-normal--*-120-*-*-m-*-iso8859-1") + ("14 bold slant" "-adobe-courier-bold-o-normal--*-140-*-*-m-*-iso8859-1") + ("18 bold slant" "-adobe-courier-bold-o-normal--*-180-*-*-m-*-iso8859-1") + ("24 bold slant" "-adobe-courier-bold-o-normal--*-240-*-*-m-*-iso8859-1") + ))) "X fonts suitable for use in Emacs.") (declare-function generate-fontset-menu "fontset" ()) @@ -3653,7 +3648,7 @@ is copied instead of being cut." (global-set-key [S-down-mouse-1] #'mouse-appearance-menu)) ;; C-down-mouse-2 is bound in facemenu.el. (global-set-key [C-down-mouse-3] - `(menu-item ,(purecopy "Menu Bar") ignore + `(menu-item "Menu Bar" ignore :filter ,(lambda (_) (if (zerop (or (frame-parameter nil 'menu-bar-lines) 0)) (mouse-menu-bar-map) diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 29cc62cbcd6..1852bd137da 100644 --- a/lisp/net/eudc.el +++ b/lisp/net/eudc.el @@ -1319,25 +1319,25 @@ This does nothing except loading eudc by autoload side-effect." (defvar eudc-tools-menu (let ((map (make-sparse-keymap "Directory Servers"))) (define-key map [phone] - `(menu-item ,(purecopy "Get Phone") eudc-get-phone - :help ,(purecopy "Get the phone field of name from the directory server"))) + '(menu-item "Get Phone" eudc-get-phone + :help "Get the phone field of name from the directory server")) (define-key map [email] - `(menu-item ,(purecopy "Get Email") eudc-get-email - :help ,(purecopy "Get the email field of NAME from the directory server"))) + '(menu-item "Get Email" eudc-get-email + :help "Get the email field of NAME from the directory server")) (define-key map [separator-eudc-email] menu-bar-separator) (define-key map [expand-inline] - `(menu-item ,(purecopy "Expand Inline Query") eudc-expand-inline - :help ,(purecopy "Query the directory server, and expand the query string before point"))) + '(menu-item "Expand Inline Query" eudc-expand-inline + :help "Query the directory server, and expand the query string before point")) (define-key map [query] - `(menu-item ,(purecopy "Query with Form") eudc-query-form - :help ,(purecopy "Display a form to query the directory server"))) + '(menu-item "Query with Form" eudc-query-form + :help "Display a form to query the directory server")) (define-key map [separator-eudc-query] menu-bar-separator) (define-key map [new] - `(menu-item ,(purecopy "New Server") eudc-set-server - :help ,(purecopy "Set the directory server to SERVER using PROTOCOL"))) + '(menu-item "New Server" eudc-set-server + :help "Set the directory server to SERVER using PROTOCOL")) (define-key map [load] - `(menu-item ,(purecopy "Load Hotlist of Servers") eudc-load-eudc - :help ,(purecopy "Load the Emacs Unified Directory Client"))) + '(menu-item "Load Hotlist of Servers" eudc-load-eudc + :help "Load the Emacs Unified Directory Client")) map)) (fset 'eudc-tools-menu (symbol-value 'eudc-tools-menu))) diff --git a/lisp/newcomment.el b/lisp/newcomment.el index c4d46000f15..10cf51cdd6c 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -136,7 +136,7 @@ by the close of the first pair.") (put 'comment-end-skip 'safe-local-variable 'stringp) ;;;###autoload -(defvar comment-end (purecopy "") +(defvar comment-end "" "String to insert to end a new comment. Should be an empty string if comments are terminated by end-of-line.") ;;;###autoload @@ -288,7 +288,7 @@ See `comment-styles' for a list of available styles." :group 'comment) ;;;###autoload -(defcustom comment-padding (purecopy " ") +(defcustom comment-padding " " "Padding string that `comment-region' puts between comment chars and text. Can also be an integer which will be automatically turned into a string of the corresponding number of spaces. diff --git a/lisp/obsolete/autoload.el b/lisp/obsolete/autoload.el index 51a4d91a7f3..e4ebbcb01a7 100644 --- a/lisp/obsolete/autoload.el +++ b/lisp/obsolete/autoload.el @@ -415,8 +415,7 @@ FILE's modification time." load-name outfile)) (let ((standard-output (marker-buffer output-start)) (print-quoted t)) - (princ `(push (purecopy - ',(cons (intern package) version)) + (princ `(push ',(cons (intern package) version) package--builtin-versions)) (princ "\n"))))) diff --git a/lisp/pgtk-dnd.el b/lisp/pgtk-dnd.el index e0d68d9d8b8..1b349595a1d 100644 --- a/lisp/pgtk-dnd.el +++ b/lisp/pgtk-dnd.el @@ -55,15 +55,15 @@ The default value for this variable is `pgtk-dnd-default-test-function'." :group 'pgtk) (defcustom pgtk-dnd-types-alist - `((,(purecopy "text/uri-list") . pgtk-dnd-handle-uri-list) - (,(purecopy "FILE_NAME") . pgtk-dnd-handle-file-name) - (,(purecopy "UTF8_STRING") . pgtk-dnd-insert-utf8-text) - (,(purecopy "text/plain;charset=UTF-8") . pgtk-dnd-insert-utf8-text) - (,(purecopy "text/plain;charset=utf-8") . pgtk-dnd-insert-utf8-text) - (,(purecopy "text/plain") . dnd-insert-text) - (,(purecopy "COMPOUND_TEXT") . pgtk-dnd-insert-ctext) - (,(purecopy "STRING") . dnd-insert-text) - (,(purecopy "TEXT") . dnd-insert-text)) + `(("text/uri-list" . pgtk-dnd-handle-uri-list) + ("FILE_NAME" . pgtk-dnd-handle-file-name) + ("UTF8_STRING" . pgtk-dnd-insert-utf8-text) + ("text/plain;charset=UTF-8" . pgtk-dnd-insert-utf8-text) + ("text/plain;charset=utf-8" . pgtk-dnd-insert-utf8-text) + ("text/plain" . dnd-insert-text) + ("COMPOUND_TEXT" . pgtk-dnd-insert-ctext) + ("STRING" . dnd-insert-text) + ("TEXT" . dnd-insert-text)) "Which function to call to handle a drop of that type. If the type for the drop is not present, or the function is nil, the drop is rejected. The function takes three arguments, WINDOW, ACTION @@ -77,15 +77,15 @@ if drop is successful, nil if not." :group 'pgtk) (defcustom pgtk-dnd-known-types - (mapcar 'purecopy '("text/uri-list" - "FILE_NAME" - "UTF8_STRING" - "text/plain;charset=UTF-8" - "text/plain;charset=utf-8" - "text/plain" - "COMPOUND_TEXT" - "STRING" - "TEXT")) + '("text/uri-list" + "FILE_NAME" + "UTF8_STRING" + "text/plain;charset=UTF-8" + "text/plain;charset=utf-8" + "text/plain" + "COMPOUND_TEXT" + "STRING" + "TEXT") "The types accepted by default for dropped data. The types are chosen in the order they appear in the list." :version "22.1" diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 1a3f2f21c4b..3d6ffd1fbe4 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -937,7 +937,7 @@ The value nil as an element means to try the default directory." (string :tag "Directory")))) ;;;###autoload -(defcustom compile-command (purecopy "make -k ") +(defcustom compile-command "make -k " "Last shell command used to do a compilation; default for next compilation. Sometimes it is useful for files to supply local values for this variable. diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index c50303695f0..078563a123c 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -503,11 +503,7 @@ use of `macroexpand-all' as a way to find the \"underlying raw code\".") var)) vars)))))) -(defvar elisp--local-variables-completion-table - ;; Use `defvar' rather than `defconst' since defconst would purecopy this - ;; value, which would doubly fail: it would fail because purecopy can't - ;; handle the recursive bytecode object, and it would fail because it would - ;; move `lastpos' and `lastvars' to pure space where they'd be immutable! +(defconst elisp--local-variables-completion-table (let ((lastpos nil) (lastvars nil)) (letrec ((hookfun (lambda () (setq lastpos nil) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 352356ddbc5..b322b35ed63 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -44,7 +44,7 @@ invoke `visit-tags-table', which is the only reliable way of setting the value of this variable, whether buffer-local or global. Use the `etags' program to make a tags table file.") ;; Make M-x set-variable tags-file-name like M-x visit-tags-table. -;;;###autoload (put 'tags-file-name 'variable-interactive (purecopy "fVisit tags table: ")) +;;;###autoload (put 'tags-file-name 'variable-interactive "fVisit tags table: ") ;;;###autoload (put 'tags-file-name 'safe-local-variable 'stringp) (defgroup etags nil "Tags tables." @@ -73,7 +73,7 @@ Use the `etags' program to make a tags table file." ;;;###autoload (defcustom tags-compression-info-list - (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) + '("" ".Z" ".bz2" ".gz" ".xz" ".tgz") "List of extensions tried by etags when `auto-compression-mode' is on. An empty string means search the non-compressed file." :version "24.1" ; added xz diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 72c0f871e0b..d04e9945b0d 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -543,18 +543,18 @@ redundant).") This gets tacked on the end of the generated expressions.") ;;;###autoload -(defvar grep-program (purecopy "grep") +(defvar grep-program "grep" "The default grep program for `grep-command' and `grep-find-command'. This variable's value takes effect when `grep-compute-defaults' is called.") ;;;###autoload -(defvar find-program (purecopy "find") +(defvar find-program "find" "The default find program. This is used by commands like `grep-find-command', `find-dired' and others.") ;;;###autoload -(defvar xargs-program (purecopy "xargs") +(defvar xargs-program "xargs" "The default xargs program for `grep-find-command'. See `grep-find-use-xargs'. This variable's value takes effect when `grep-compute-defaults' is called.") diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el index 157a8473631..c9b43fe8e16 100644 --- a/lisp/progmodes/hideshow.el +++ b/lisp/progmodes/hideshow.el @@ -257,7 +257,6 @@ This has effect only if `search-invisible' is set to `open'." ;; FIXME: Currently the check is made via ;; (assoc major-mode hs-special-modes-alist) so it doesn't pay attention ;; to the mode hierarchy. - (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) @@ -270,7 +269,7 @@ This has effect only if `search-invisible' is set to `open'." (lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "