Compare commits
217 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2f6338330a | ||
|
24d65d087d | ||
|
29b8e9dec8 | ||
|
8f058b1c85 | ||
|
615534bee5 | ||
|
e79d2e526a | ||
|
d092d213ec | ||
|
0263a47ced | ||
|
65f0c06e4b | ||
|
36be3d61d5 | ||
|
c4a21caf59 | ||
|
e4c235604e | ||
|
2c49d5d892 | ||
|
cee12ef43a | ||
|
bf1d5e8e1b | ||
|
fe829acf27 | ||
|
a3d22a1ee0 | ||
|
e6597871cb | ||
|
f8859c95d0 | ||
|
8fbb0fc07e | ||
|
49615aad35 | ||
|
6cb8c47e98 | ||
|
b9da2a30d8 | ||
|
9e413dee60 | ||
|
181aafcdb7 | ||
|
14924f48f8 | ||
|
746bf11c12 | ||
|
87fd254a44 | ||
|
1cedb94027 | ||
|
fc196308db | ||
|
ac07724a18 | ||
|
c669fb8f4d | ||
|
3485b794fc | ||
|
662bd4a9f9 | ||
|
6f367bc62e | ||
|
2a95cfd148 | ||
|
0a3be2953e | ||
|
94c9e43efe | ||
|
9f11e11b96 | ||
|
f6258eb59a | ||
|
3db109a18a | ||
|
4e7b9f195e | ||
|
b0e50ecf8b | ||
|
8e555a7028 | ||
|
ae52ac8149 | ||
|
b30910b353 | ||
|
c54edbb096 | ||
|
4331f4bc1a | ||
|
0a11a46a01 | ||
|
2d38b7a376 | ||
|
43b6a67131 | ||
|
0588f11f70 | ||
|
f71d70bf31 | ||
|
037321c00b | ||
|
3ff82ca0e7 | ||
|
fcfcb1d79c | ||
|
9e6823b900 | ||
|
fe17289e8a | ||
|
41da3cc65c | ||
|
6d0b8cdb85 | ||
|
eb340f7901 | ||
|
433a36c248 | ||
|
de26e2cf83 | ||
|
a8cca11cb9 | ||
|
74e09af8a6 | ||
|
cda0f6323b | ||
|
2715f7ef90 | ||
|
39bc5c84e3 | ||
|
fb95c223b0 | ||
|
fea1ed0e76 | ||
|
ad2e040d6c | ||
|
5feaf4c3f4 | ||
|
3abc8dcd69 | ||
|
42fa24ab12 | ||
|
ce2d0a5250 | ||
|
1116d1bc15 | ||
|
54f4bcd0bd | ||
|
12a7e9af6d | ||
|
430d29bb0b | ||
|
6a092add34 | ||
|
a25652176b | ||
|
cebd69e081 | ||
|
cfa9dcce49 | ||
|
70a5b99c4b | ||
|
7443f94638 | ||
|
bb698e3fae | ||
|
2c98bded86 | ||
|
7f81767e62 | ||
|
47162ef150 | ||
|
eeaeaa9284 | ||
|
56ce41a00d | ||
|
6381ddb4f0 | ||
|
07d978b05b | ||
|
4ec8c3b4b6 | ||
|
27d3963a4b | ||
|
373defb75c | ||
|
90456874e2 | ||
|
e76854c18d | ||
|
36c99ab41e | ||
|
abc097541b | ||
|
357c7df734 | ||
|
7d282de4eb | ||
|
0dafdeebbc | ||
|
1b003d3a54 | ||
|
046bcbfc15 | ||
|
e150be51c0 | ||
|
87f4a8186d | ||
|
ec3c8de479 | ||
|
61c3d58e03 | ||
|
8ca4761fda | ||
|
989184d6d6 | ||
|
4b0f206291 | ||
|
d8d465e820 | ||
|
5e82f73ff7 | ||
|
da86ace68d | ||
|
832068b18c | ||
|
b165e689c6 | ||
|
f547812840 | ||
|
3f3934c563 | ||
|
7d937a2b4d | ||
|
f679b62f61 | ||
|
1ac9d3ffd2 | ||
|
2347e61590 | ||
|
a716bbeaac | ||
|
d0892b3e1e | ||
|
7cb7416252 | ||
|
92271d20b5 | ||
|
7b3c0608d8 | ||
|
f86fe1b16f | ||
|
fd77835c53 | ||
|
81d89b946e | ||
|
9ec93c528a | ||
|
503309baac | ||
|
512b41cdf5 | ||
|
2ec330eae4 | ||
|
c88b79f163 | ||
|
c6ebceb62c | ||
|
6a841ce092 | ||
|
ff52e7a9e8 | ||
|
50c7e79e14 | ||
|
e70c486134 | ||
|
11626df7df | ||
|
0f95db33dd | ||
|
59351f8e4d | ||
|
bbd9bd31e5 | ||
|
392f470b0d | ||
|
6530f9798d | ||
|
c6017fd7f4 | ||
|
b1c2ab7a99 | ||
|
602552d774 | ||
|
a50699a537 | ||
|
9d699accf8 | ||
|
401881e618 | ||
|
6f69302c6b | ||
|
844eea3f14 | ||
|
71cef0e6ea | ||
|
ab7521bc2f | ||
|
a8163b3c90 | ||
|
1a3424dfef | ||
|
ce9b28f7d7 | ||
|
a4dde079fe | ||
|
66891062cd | ||
|
85101b1449 | ||
|
9e4c22a790 | ||
|
77f87c9c32 | ||
|
7764e17e5d | ||
|
3ded109f64 | ||
|
dc2a08a312 | ||
|
4e102e7897 | ||
|
ad2b01fd98 | ||
|
68a9eb0779 | ||
|
6f7b9b056b | ||
|
e8a2c6d168 | ||
|
4b2c39e943 | ||
|
88d07e40d1 | ||
|
b12114a7c7 | ||
|
bfdd6c4d1e | ||
|
1b3fef9741 | ||
|
74a143e1dc | ||
|
c4e0752fd7 | ||
|
064dd3225f | ||
|
13d4c0147b | ||
|
885cb07a80 | ||
|
700dea5d29 | ||
|
fc76b95cb7 | ||
|
3d00f3e120 | ||
|
b9a3b97420 | ||
|
f74aea1756 | ||
|
7bc14ea600 | ||
|
a540b54fa3 | ||
|
d68addef90 | ||
|
2103d3090e | ||
|
9d4dcad814 | ||
|
a221ea143c | ||
|
b601b78883 | ||
|
46a1f9e50a | ||
|
58bd34da03 | ||
|
c54cb650b1 | ||
|
f4c146555a | ||
|
a539ff3235 | ||
|
d8d8ccabf9 | ||
|
5f7c01eb2b | ||
|
f11dc1412d | ||
|
2d7f921087 | ||
|
198f28a4fa | ||
|
bb940a5c28 | ||
|
4d08961b29 | ||
|
a2302b156d | ||
|
782803e7d3 | ||
|
26f5a25719 | ||
|
24eae4d152 | ||
|
8ad6a42c04 | ||
|
95d80cf0cf | ||
|
3e282839a6 | ||
|
1a9e60f06c | ||
|
ea565559e9 | ||
|
665d09f2a1 |
35
.gitignore
vendored
35
.gitignore
vendored
@ -1,2 +1,33 @@
|
||||
emacs-23.2.tar.bz2
|
||||
/emacs-23.3.tar.bz2
|
||||
/emacs-23.3a.tar.bz2
|
||||
/php-mode.el
|
||||
/emacs-24.0.92.tar.gz
|
||||
/emacs-24.0.93.tar.gz
|
||||
/emacs-24.0.94.tar.gz
|
||||
/emacs-24.0.95.tar.gz
|
||||
/emacs-24.0.97.tar.gz
|
||||
/emacs-24.1-rc.tar.gz
|
||||
/emacs-24.1.tar.bz2
|
||||
/emacs-24.2.tar.xz
|
||||
/emacs-24.3.tar.xz
|
||||
/emacs-24.4.tar.xz
|
||||
/emacs-24.5.tar.xz
|
||||
/emacs-25.0.92.tar.xz
|
||||
/emacs-25.0.93.tar.xz
|
||||
/emacs-25.0.94.tar.xz
|
||||
/emacs-25.0.95.tar.xz
|
||||
/emacs-25.1-rc1.tar.xz
|
||||
/emacs-25.1-rc2.tar.xz
|
||||
/emacs-25.1.tar.xz
|
||||
/emacs-25.2-rc2.tar.xz
|
||||
/emacs-25.2.tar.xz
|
||||
/emacs-25.3.tar.xz
|
||||
/emacs-26.1.tar.xz
|
||||
/emacs-26.2.tar.xz
|
||||
/emacs-26.3.tar.xz
|
||||
/emacs-26.3.tar.xz.sig
|
||||
/emacs-27.1.tar.xz
|
||||
/emacs-27.1.tar.xz.sig
|
||||
/emacs-27.2.tar.xz
|
||||
/emacs-27.2.tar.xz.sig
|
||||
/emacs-28.1.tar.xz
|
||||
/emacs-28.1.tar.xz.sig
|
707
cdefs.h
Normal file
707
cdefs.h
Normal file
@ -0,0 +1,707 @@
|
||||
/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
|
||||
Copyright The GNU Toolchain Authors.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _SYS_CDEFS_H
|
||||
#define _SYS_CDEFS_H 1
|
||||
|
||||
/* We are almost always included from features.h. */
|
||||
#ifndef _FEATURES_H
|
||||
# include <features.h>
|
||||
#endif
|
||||
|
||||
/* The GNU libc does not support any K&R compilers or the traditional mode
|
||||
of ISO C compilers anymore. Check for some of the combinations not
|
||||
supported anymore. */
|
||||
#if defined __GNUC__ && !defined __STDC__
|
||||
# error "You need a ISO C conforming compiler to use the glibc headers"
|
||||
#endif
|
||||
|
||||
/* Some user header file might have defined this before. */
|
||||
#undef __P
|
||||
#undef __PMT
|
||||
|
||||
/* Compilers that lack __has_attribute may object to
|
||||
#if defined __has_attribute && __has_attribute (...)
|
||||
even though they do not need to evaluate the right-hand side of the &&.
|
||||
Similarly for __has_builtin, etc. */
|
||||
#if (defined __has_attribute \
|
||||
&& (!defined __clang_minor__ \
|
||||
|| (defined __apple_build_version__ \
|
||||
? 6000000 <= __apple_build_version__ \
|
||||
: 3 < __clang_major__ + (5 <= __clang_minor__))))
|
||||
# define __glibc_has_attribute(attr) __has_attribute (attr)
|
||||
#else
|
||||
# define __glibc_has_attribute(attr) 0
|
||||
#endif
|
||||
#ifdef __has_builtin
|
||||
# define __glibc_has_builtin(name) __has_builtin (name)
|
||||
#else
|
||||
# define __glibc_has_builtin(name) 0
|
||||
#endif
|
||||
#ifdef __has_extension
|
||||
# define __glibc_has_extension(ext) __has_extension (ext)
|
||||
#else
|
||||
# define __glibc_has_extension(ext) 0
|
||||
#endif
|
||||
|
||||
#if defined __GNUC__ || defined __clang__
|
||||
|
||||
/* All functions, except those with callbacks or those that
|
||||
synchronize memory, are leaf functions. */
|
||||
# if __GNUC_PREREQ (4, 6) && !defined _LIBC
|
||||
# define __LEAF , __leaf__
|
||||
# define __LEAF_ATTR __attribute__ ((__leaf__))
|
||||
# else
|
||||
# define __LEAF
|
||||
# define __LEAF_ATTR
|
||||
# endif
|
||||
|
||||
/* GCC can always grok prototypes. For C++ programs we add throw()
|
||||
to help it optimize the function calls. But this only works with
|
||||
gcc 2.8.x and egcs. For gcc 3.4 and up we even mark C functions
|
||||
as non-throwing using a function attribute since programs can use
|
||||
the -fexceptions options for C code as well. */
|
||||
# if !defined __cplusplus \
|
||||
&& (__GNUC_PREREQ (3, 4) || __glibc_has_attribute (__nothrow__))
|
||||
# define __THROW __attribute__ ((__nothrow__ __LEAF))
|
||||
# define __THROWNL __attribute__ ((__nothrow__))
|
||||
# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
|
||||
# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
|
||||
# else
|
||||
# if defined __cplusplus && (__GNUC_PREREQ (2,8) || __clang_major >= 4)
|
||||
# if __cplusplus >= 201103L
|
||||
# define __THROW noexcept (true)
|
||||
# else
|
||||
# define __THROW throw ()
|
||||
# endif
|
||||
# define __THROWNL __THROW
|
||||
# define __NTH(fct) __LEAF_ATTR fct __THROW
|
||||
# define __NTHNL(fct) fct __THROW
|
||||
# else
|
||||
# define __THROW
|
||||
# define __THROWNL
|
||||
# define __NTH(fct) fct
|
||||
# define __NTHNL(fct) fct
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#else /* Not GCC or clang. */
|
||||
|
||||
# if (defined __cplusplus \
|
||||
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
|
||||
# define __inline inline
|
||||
# else
|
||||
# define __inline /* No inline functions. */
|
||||
# endif
|
||||
|
||||
# define __THROW
|
||||
# define __THROWNL
|
||||
# define __NTH(fct) fct
|
||||
|
||||
#endif /* GCC || clang. */
|
||||
|
||||
/* These two macros are not used in glibc anymore. They are kept here
|
||||
only because some other projects expect the macros to be defined. */
|
||||
#define __P(args) args
|
||||
#define __PMT(args) args
|
||||
|
||||
/* For these things, GCC behaves the ANSI way normally,
|
||||
and the non-ANSI way under -traditional. */
|
||||
|
||||
#define __CONCAT(x,y) x ## y
|
||||
#define __STRING(x) #x
|
||||
|
||||
/* This is not a typedef so `const __ptr_t' does the right thing. */
|
||||
#define __ptr_t void *
|
||||
|
||||
|
||||
/* C++ needs to know that types and declarations are C, not C++. */
|
||||
#ifdef __cplusplus
|
||||
# define __BEGIN_DECLS extern "C" {
|
||||
# define __END_DECLS }
|
||||
#else
|
||||
# define __BEGIN_DECLS
|
||||
# define __END_DECLS
|
||||
#endif
|
||||
|
||||
|
||||
/* Fortify support. */
|
||||
#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
|
||||
#define __bos0(ptr) __builtin_object_size (ptr, 0)
|
||||
|
||||
/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
|
||||
#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
|
||||
|| __GNUC_PREREQ (12, 0))
|
||||
# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
|
||||
# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
|
||||
#else
|
||||
# define __glibc_objsize0(__o) __bos0 (__o)
|
||||
# define __glibc_objsize(__o) __bos (__o)
|
||||
#endif
|
||||
|
||||
/* Compile time conditions to choose between the regular, _chk and _chk_warn
|
||||
variants. These conditions should get evaluated to constant and optimized
|
||||
away. */
|
||||
|
||||
#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
|
||||
#define __glibc_unsigned_or_positive(__l) \
|
||||
((__typeof (__l)) 0 < (__typeof (__l)) -1 \
|
||||
|| (__builtin_constant_p (__l) && (__l) > 0))
|
||||
|
||||
/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
|
||||
condition can be folded to a constant and if it is true. The -1 check is
|
||||
redundant because since it implies that __glibc_safe_len_cond is true. */
|
||||
#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
|
||||
(__glibc_unsigned_or_positive (__l) \
|
||||
&& __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
|
||||
__s, __osz)) \
|
||||
&& __glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
|
||||
|
||||
/* Conversely, we know at compile time that the length is unsafe if the
|
||||
__L * __S <= __OBJSZ condition can be folded to a constant and if it is
|
||||
false. */
|
||||
#define __glibc_unsafe_len(__l, __s, __osz) \
|
||||
(__glibc_unsigned_or_positive (__l) \
|
||||
&& __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
|
||||
__s, __osz)) \
|
||||
&& !__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), __s, __osz))
|
||||
|
||||
/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
|
||||
declared. */
|
||||
|
||||
#define __glibc_fortify(f, __l, __s, __osz, ...) \
|
||||
(__glibc_safe_or_unknown_len (__l, __s, __osz) \
|
||||
? __ ## f ## _alias (__VA_ARGS__) \
|
||||
: (__glibc_unsafe_len (__l, __s, __osz) \
|
||||
? __ ## f ## _chk_warn (__VA_ARGS__, __osz) \
|
||||
: __ ## f ## _chk (__VA_ARGS__, __osz))) \
|
||||
|
||||
/* Fortify function f, where object size argument passed to f is the number of
|
||||
elements and not total size. */
|
||||
|
||||
#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
|
||||
(__glibc_safe_or_unknown_len (__l, __s, __osz) \
|
||||
? __ ## f ## _alias (__VA_ARGS__) \
|
||||
: (__glibc_unsafe_len (__l, __s, __osz) \
|
||||
? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
|
||||
: __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) \
|
||||
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
# define __warnattr(msg) __attribute__((__warning__ (msg)))
|
||||
# define __errordecl(name, msg) \
|
||||
extern void name (void) __attribute__((__error__ (msg)))
|
||||
#else
|
||||
# define __warnattr(msg)
|
||||
# define __errordecl(name, msg) extern void name (void)
|
||||
#endif
|
||||
|
||||
/* Support for flexible arrays.
|
||||
Headers that should use flexible arrays only if they're "real"
|
||||
(e.g. only if they won't affect sizeof()) should test
|
||||
#if __glibc_c99_flexarr_available. */
|
||||
#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L && !defined __HP_cc
|
||||
# define __flexarr []
|
||||
# define __glibc_c99_flexarr_available 1
|
||||
#elif __GNUC_PREREQ (2,97) || defined __clang__
|
||||
/* GCC 2.97 and clang support C99 flexible array members as an extension,
|
||||
even when in C89 mode or compiling C++ (any version). */
|
||||
# define __flexarr []
|
||||
# define __glibc_c99_flexarr_available 1
|
||||
#elif defined __GNUC__
|
||||
/* Pre-2.97 GCC did not support C99 flexible arrays but did have
|
||||
an equivalent extension with slightly different notation. */
|
||||
# define __flexarr [0]
|
||||
# define __glibc_c99_flexarr_available 1
|
||||
#else
|
||||
/* Some other non-C99 compiler. Approximate with [1]. */
|
||||
# define __flexarr [1]
|
||||
# define __glibc_c99_flexarr_available 0
|
||||
#endif
|
||||
|
||||
|
||||
/* __asm__ ("xyz") is used throughout the headers to rename functions
|
||||
at the assembly language level. This is wrapped by the __REDIRECT
|
||||
macro, in order to support compilers that can do this some other
|
||||
way. When compilers don't support asm-names at all, we have to do
|
||||
preprocessor tricks instead (which don't have exactly the right
|
||||
semantics, but it's the best we can do).
|
||||
|
||||
Example:
|
||||
int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */
|
||||
|
||||
#if (defined __GNUC__ && __GNUC__ >= 2) || (__clang_major__ >= 4)
|
||||
|
||||
# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias))
|
||||
# ifdef __cplusplus
|
||||
# define __REDIRECT_NTH(name, proto, alias) \
|
||||
name proto __THROW __asm__ (__ASMNAME (#alias))
|
||||
# define __REDIRECT_NTHNL(name, proto, alias) \
|
||||
name proto __THROWNL __asm__ (__ASMNAME (#alias))
|
||||
# else
|
||||
# define __REDIRECT_NTH(name, proto, alias) \
|
||||
name proto __asm__ (__ASMNAME (#alias)) __THROW
|
||||
# define __REDIRECT_NTHNL(name, proto, alias) \
|
||||
name proto __asm__ (__ASMNAME (#alias)) __THROWNL
|
||||
# endif
|
||||
# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
|
||||
# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
|
||||
|
||||
/*
|
||||
#elif __SOME_OTHER_COMPILER__
|
||||
|
||||
# define __REDIRECT(name, proto, alias) name proto; \
|
||||
_Pragma("let " #name " = " #alias)
|
||||
*/
|
||||
#endif
|
||||
|
||||
/* GCC and clang have various useful declarations that can be made with
|
||||
the '__attribute__' syntax. All of the ways we use this do fine if
|
||||
they are omitted for compilers that don't understand it. */
|
||||
#if !(defined __GNUC__ || defined __clang__)
|
||||
# define __attribute__(xyz) /* Ignore */
|
||||
#endif
|
||||
|
||||
/* At some point during the gcc 2.96 development the `malloc' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__malloc__)
|
||||
# define __attribute_malloc__ __attribute__ ((__malloc__))
|
||||
#else
|
||||
# define __attribute_malloc__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* Tell the compiler which arguments to an allocation function
|
||||
indicate the size of the allocation. */
|
||||
#if __GNUC_PREREQ (4, 3)
|
||||
# define __attribute_alloc_size__(params) \
|
||||
__attribute__ ((__alloc_size__ params))
|
||||
#else
|
||||
# define __attribute_alloc_size__(params) /* Ignore. */
|
||||
#endif
|
||||
|
||||
/* Tell the compiler which argument to an allocation function
|
||||
indicates the alignment of the allocation. */
|
||||
#if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__alloc_align__)
|
||||
# define __attribute_alloc_align__(param) \
|
||||
__attribute__ ((__alloc_align__ param))
|
||||
#else
|
||||
# define __attribute_alloc_align__(param) /* Ignore. */
|
||||
#endif
|
||||
|
||||
/* At some point during the gcc 2.96 development the `pure' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
#if __GNUC_PREREQ (2,96) || __glibc_has_attribute (__pure__)
|
||||
# define __attribute_pure__ __attribute__ ((__pure__))
|
||||
#else
|
||||
# define __attribute_pure__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* This declaration tells the compiler that the value is constant. */
|
||||
#if __GNUC_PREREQ (2,5) || __glibc_has_attribute (__const__)
|
||||
# define __attribute_const__ __attribute__ ((__const__))
|
||||
#else
|
||||
# define __attribute_const__ /* Ignore */
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__)
|
||||
# define __attribute_maybe_unused__ __attribute__ ((__unused__))
|
||||
#else
|
||||
# define __attribute_maybe_unused__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* At some point during the gcc 3.1 development the `used' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings. */
|
||||
#if __GNUC_PREREQ (3,1) || __glibc_has_attribute (__used__)
|
||||
# define __attribute_used__ __attribute__ ((__used__))
|
||||
# define __attribute_noinline__ __attribute__ ((__noinline__))
|
||||
#else
|
||||
# define __attribute_used__ __attribute__ ((__unused__))
|
||||
# define __attribute_noinline__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* Since version 3.2, gcc allows marking deprecated functions. */
|
||||
#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__deprecated__)
|
||||
# define __attribute_deprecated__ __attribute__ ((__deprecated__))
|
||||
#else
|
||||
# define __attribute_deprecated__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* Since version 4.5, gcc also allows one to specify the message printed
|
||||
when a deprecated function is used. clang claims to be gcc 4.2, but
|
||||
may also support this feature. */
|
||||
#if __GNUC_PREREQ (4,5) \
|
||||
|| __glibc_has_extension (__attribute_deprecated_with_message__)
|
||||
# define __attribute_deprecated_msg__(msg) \
|
||||
__attribute__ ((__deprecated__ (msg)))
|
||||
#else
|
||||
# define __attribute_deprecated_msg__(msg) __attribute_deprecated__
|
||||
#endif
|
||||
|
||||
/* At some point during the gcc 2.8 development the `format_arg' attribute
|
||||
for functions was introduced. We don't want to use it unconditionally
|
||||
(although this would be possible) since it generates warnings.
|
||||
If several `format_arg' attributes are given for the same function, in
|
||||
gcc-3.0 and older, all but the last one are ignored. In newer gccs,
|
||||
all designated arguments are considered. */
|
||||
#if __GNUC_PREREQ (2,8) || __glibc_has_attribute (__format_arg__)
|
||||
# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
|
||||
#else
|
||||
# define __attribute_format_arg__(x) /* Ignore */
|
||||
#endif
|
||||
|
||||
/* At some point during the gcc 2.97 development the `strfmon' format
|
||||
attribute for functions was introduced. We don't want to use it
|
||||
unconditionally (although this would be possible) since it
|
||||
generates warnings. */
|
||||
#if __GNUC_PREREQ (2,97) || __glibc_has_attribute (__format__)
|
||||
# define __attribute_format_strfmon__(a,b) \
|
||||
__attribute__ ((__format__ (__strfmon__, a, b)))
|
||||
#else
|
||||
# define __attribute_format_strfmon__(a,b) /* Ignore */
|
||||
#endif
|
||||
|
||||
/* The nonnull function attribute marks pointer parameters that
|
||||
must not be NULL. This has the name __nonnull in glibc,
|
||||
and __attribute_nonnull__ in files shared with Gnulib to avoid
|
||||
collision with a different __nonnull in DragonFlyBSD 5.9. */
|
||||
#ifndef __attribute_nonnull__
|
||||
# if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__)
|
||||
# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ params))
|
||||
# else
|
||||
# define __attribute_nonnull__(params)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef __nonnull
|
||||
# define __nonnull(params) __attribute_nonnull__ (params)
|
||||
#endif
|
||||
|
||||
/* The returns_nonnull function attribute marks the return type of the function
|
||||
as always being non-null. */
|
||||
#ifndef __returns_nonnull
|
||||
# if __GNUC_PREREQ (4, 9) || __glibc_has_attribute (__returns_nonnull__)
|
||||
# define __returns_nonnull __attribute__ ((__returns_nonnull__))
|
||||
# else
|
||||
# define __returns_nonnull
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If fortification mode, we warn about unused results of certain
|
||||
function calls which can lead to problems. */
|
||||
#if __GNUC_PREREQ (3,4) || __glibc_has_attribute (__warn_unused_result__)
|
||||
# define __attribute_warn_unused_result__ \
|
||||
__attribute__ ((__warn_unused_result__))
|
||||
# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
|
||||
# define __wur __attribute_warn_unused_result__
|
||||
# endif
|
||||
#else
|
||||
# define __attribute_warn_unused_result__ /* empty */
|
||||
#endif
|
||||
#ifndef __wur
|
||||
# define __wur /* Ignore */
|
||||
#endif
|
||||
|
||||
/* Forces a function to be always inlined. */
|
||||
#if __GNUC_PREREQ (3,2) || __glibc_has_attribute (__always_inline__)
|
||||
/* The Linux kernel defines __always_inline in stddef.h (283d7573), and
|
||||
it conflicts with this definition. Therefore undefine it first to
|
||||
allow either header to be included first. */
|
||||
# undef __always_inline
|
||||
# define __always_inline __inline __attribute__ ((__always_inline__))
|
||||
#else
|
||||
# undef __always_inline
|
||||
# define __always_inline __inline
|
||||
#endif
|
||||
|
||||
/* Associate error messages with the source location of the call site rather
|
||||
than with the source location inside the function. */
|
||||
#if __GNUC_PREREQ (4,3) || __glibc_has_attribute (__artificial__)
|
||||
# define __attribute_artificial__ __attribute__ ((__artificial__))
|
||||
#else
|
||||
# define __attribute_artificial__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
|
||||
inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__
|
||||
or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions
|
||||
older than 4.3 may define these macros and still not guarantee GNU inlining
|
||||
semantics.
|
||||
|
||||
clang++ identifies itself as gcc-4.2, but has support for GNU inlining
|
||||
semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
|
||||
__GNUC_GNU_INLINE__ macro definitions. */
|
||||
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
|
||||
|| (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
|
||||
|| defined __GNUC_GNU_INLINE__)))
|
||||
# if defined __GNUC_STDC_INLINE__ || defined __cplusplus
|
||||
# define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
|
||||
# define __extern_always_inline \
|
||||
extern __always_inline __attribute__ ((__gnu_inline__))
|
||||
# else
|
||||
# define __extern_inline extern __inline
|
||||
# define __extern_always_inline extern __always_inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __extern_always_inline
|
||||
# define __fortify_function __extern_always_inline __attribute_artificial__
|
||||
#endif
|
||||
|
||||
/* GCC 4.3 and above allow passing all anonymous arguments of an
|
||||
__extern_always_inline function to some other vararg function. */
|
||||
#if __GNUC_PREREQ (4,3)
|
||||
# define __va_arg_pack() __builtin_va_arg_pack ()
|
||||
# define __va_arg_pack_len() __builtin_va_arg_pack_len ()
|
||||
#endif
|
||||
|
||||
/* It is possible to compile containing GCC extensions even if GCC is
|
||||
run in pedantic mode if the uses are carefully marked using the
|
||||
`__extension__' keyword. But this is not generally available before
|
||||
version 2.8. */
|
||||
#if !(__GNUC_PREREQ (2,8) || defined __clang__)
|
||||
# define __extension__ /* Ignore */
|
||||
#endif
|
||||
|
||||
/* __restrict is known in EGCS 1.2 and above, and in clang.
|
||||
It works also in C++ mode (outside of arrays), but only when spelled
|
||||
as '__restrict', not 'restrict'. */
|
||||
#if !(__GNUC_PREREQ (2,92) || __clang_major__ >= 3)
|
||||
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
# define __restrict restrict
|
||||
# else
|
||||
# define __restrict /* Ignore */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is
|
||||
array_name[restrict]
|
||||
GCC 3.1 and clang support this.
|
||||
This syntax is not usable in C++ mode. */
|
||||
#if (__GNUC_PREREQ (3,1) || __clang_major__ >= 3) && !defined __cplusplus
|
||||
# define __restrict_arr __restrict
|
||||
#else
|
||||
# ifdef __GNUC__
|
||||
# define __restrict_arr /* Not supported in old GCC. */
|
||||
# else
|
||||
# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
|
||||
# define __restrict_arr restrict
|
||||
# else
|
||||
/* Some other non-C99 compiler. */
|
||||
# define __restrict_arr /* Not supported. */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (__GNUC__ >= 3) || __glibc_has_builtin (__builtin_expect)
|
||||
# define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
|
||||
# define __glibc_likely(cond) __builtin_expect ((cond), 1)
|
||||
#else
|
||||
# define __glibc_unlikely(cond) (cond)
|
||||
# define __glibc_likely(cond) (cond)
|
||||
#endif
|
||||
|
||||
#if (!defined _Noreturn \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& !(__GNUC_PREREQ (4,7) \
|
||||
|| (3 < __clang_major__ + (5 <= __clang_minor__))))
|
||||
# if __GNUC_PREREQ (2,8)
|
||||
# define _Noreturn __attribute__ ((__noreturn__))
|
||||
# else
|
||||
# define _Noreturn
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ (8, 0)
|
||||
/* Describes a char array whose address can safely be passed as the first
|
||||
argument to strncpy and strncat, as the char array is not necessarily
|
||||
a NUL-terminated string. */
|
||||
# define __attribute_nonstring__ __attribute__ ((__nonstring__))
|
||||
#else
|
||||
# define __attribute_nonstring__
|
||||
#endif
|
||||
|
||||
/* Undefine (also defined in libc-symbols.h). */
|
||||
#undef __attribute_copy__
|
||||
#if __GNUC_PREREQ (9, 0)
|
||||
/* Copies attributes from the declaration or type referenced by
|
||||
the argument. */
|
||||
# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
|
||||
#else
|
||||
# define __attribute_copy__(arg)
|
||||
#endif
|
||||
|
||||
#if (!defined _Static_assert && !defined __cplusplus \
|
||||
&& (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
|
||||
&& (!(__GNUC_PREREQ (4, 6) || __clang_major__ >= 4) \
|
||||
|| defined __STRICT_ANSI__))
|
||||
# define _Static_assert(expr, diagnostic) \
|
||||
extern int (*__Static_assert_function (void)) \
|
||||
[!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
|
||||
#endif
|
||||
|
||||
/* Gnulib avoids including these, as they don't work on non-glibc or
|
||||
older glibc platforms. */
|
||||
#ifndef __GNULIB_CDEFS
|
||||
# include <bits/wordsize.h>
|
||||
# include <bits/long-double.h>
|
||||
#endif
|
||||
|
||||
#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
|
||||
# ifdef __REDIRECT
|
||||
|
||||
/* Alias name defined automatically. */
|
||||
# define __LDBL_REDIR(name, proto) ... unused__ldbl_redir
|
||||
# define __LDBL_REDIR_DECL(name) \
|
||||
extern __typeof (name) name __asm (__ASMNAME ("__" #name "ieee128"));
|
||||
|
||||
/* Alias name defined automatically, with leading underscores. */
|
||||
# define __LDBL_REDIR2_DECL(name) \
|
||||
extern __typeof (__##name) __##name \
|
||||
__asm (__ASMNAME ("__" #name "ieee128"));
|
||||
|
||||
/* Alias name defined manually. */
|
||||
# define __LDBL_REDIR1(name, proto, alias) ... unused__ldbl_redir1
|
||||
# define __LDBL_REDIR1_DECL(name, alias) \
|
||||
extern __typeof (name) name __asm (__ASMNAME (#alias));
|
||||
|
||||
# define __LDBL_REDIR1_NTH(name, proto, alias) \
|
||||
__REDIRECT_NTH (name, proto, alias)
|
||||
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
|
||||
__LDBL_REDIR1_NTH (name, proto, __##alias##ieee128)
|
||||
|
||||
/* Unused. */
|
||||
# define __REDIRECT_LDBL(name, proto, alias) ... unused__redirect_ldbl
|
||||
# define __LDBL_REDIR_NTH(name, proto) ... unused__ldbl_redir_nth
|
||||
|
||||
# else
|
||||
_Static_assert (0, "IEEE 128-bits long double requires redirection on this platform");
|
||||
# endif
|
||||
#elif defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH
|
||||
# define __LDBL_COMPAT 1
|
||||
# ifdef __REDIRECT
|
||||
# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias)
|
||||
# define __LDBL_REDIR(name, proto) \
|
||||
__LDBL_REDIR1 (name, proto, __nldbl_##name)
|
||||
# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias)
|
||||
# define __LDBL_REDIR_NTH(name, proto) \
|
||||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##name)
|
||||
# define __LDBL_REDIR2_DECL(name) \
|
||||
extern __typeof (__##name) __##name __asm (__ASMNAME ("__nldbl___" #name));
|
||||
# define __LDBL_REDIR1_DECL(name, alias) \
|
||||
extern __typeof (name) name __asm (__ASMNAME (#alias));
|
||||
# define __LDBL_REDIR_DECL(name) \
|
||||
extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name));
|
||||
# define __REDIRECT_LDBL(name, proto, alias) \
|
||||
__LDBL_REDIR1 (name, proto, __nldbl_##alias)
|
||||
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
|
||||
__LDBL_REDIR1_NTH (name, proto, __nldbl_##alias)
|
||||
# endif
|
||||
#endif
|
||||
#if (!defined __LDBL_COMPAT && __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0) \
|
||||
|| !defined __REDIRECT
|
||||
# define __LDBL_REDIR1(name, proto, alias) name proto
|
||||
# define __LDBL_REDIR(name, proto) name proto
|
||||
# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW
|
||||
# define __LDBL_REDIR_NTH(name, proto) name proto __THROW
|
||||
# define __LDBL_REDIR2_DECL(name)
|
||||
# define __LDBL_REDIR_DECL(name)
|
||||
# ifdef __REDIRECT
|
||||
# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias)
|
||||
# define __REDIRECT_NTH_LDBL(name, proto, alias) \
|
||||
__REDIRECT_NTH (name, proto, alias)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is
|
||||
intended for use in preprocessor macros.
|
||||
|
||||
Note: MESSAGE must be a _single_ string; concatenation of string
|
||||
literals is not supported. */
|
||||
#if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5)
|
||||
# define __glibc_macro_warning1(message) _Pragma (#message)
|
||||
# define __glibc_macro_warning(message) \
|
||||
__glibc_macro_warning1 (GCC warning message)
|
||||
#else
|
||||
# define __glibc_macro_warning(msg)
|
||||
#endif
|
||||
|
||||
/* Generic selection (ISO C11) is a C-only feature, available in GCC
|
||||
since version 4.9. Previous versions do not provide generic
|
||||
selection, even though they might set __STDC_VERSION__ to 201112L,
|
||||
when in -std=c11 mode. Thus, we must check for !defined __GNUC__
|
||||
when testing __STDC_VERSION__ for generic selection support.
|
||||
On the other hand, Clang also defines __GNUC__, so a clang-specific
|
||||
check is required to enable the use of generic selection. */
|
||||
#if !defined __cplusplus \
|
||||
&& (__GNUC_PREREQ (4, 9) \
|
||||
|| __glibc_has_extension (c_generic_selections) \
|
||||
|| (!defined __GNUC__ && defined __STDC_VERSION__ \
|
||||
&& __STDC_VERSION__ >= 201112L))
|
||||
# define __HAVE_GENERIC_SELECTION 1
|
||||
#else
|
||||
# define __HAVE_GENERIC_SELECTION 0
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ (10, 0)
|
||||
/* Designates a 1-based positional argument ref-index of pointer type
|
||||
that can be used to access size-index elements of the pointed-to
|
||||
array according to access mode, or at least one element when
|
||||
size-index is not provided:
|
||||
access (access-mode, <ref-index> [, <size-index>]) */
|
||||
# define __attr_access(x) __attribute__ ((__access__ x))
|
||||
/* For _FORTIFY_SOURCE == 3 we use __builtin_dynamic_object_size, which may
|
||||
use the access attribute to get object sizes from function definition
|
||||
arguments, so we can't use them on functions we fortify. Drop the object
|
||||
size hints for such functions. */
|
||||
# if __USE_FORTIFY_LEVEL == 3
|
||||
# define __fortified_attr_access(a, o, s) __attribute__ ((__access__ (a, o)))
|
||||
# else
|
||||
# define __fortified_attr_access(a, o, s) __attr_access ((a, o, s))
|
||||
# endif
|
||||
# if __GNUC_PREREQ (11, 0)
|
||||
# define __attr_access_none(argno) __attribute__ ((__access__ (__none__, argno)))
|
||||
# else
|
||||
# define __attr_access_none(argno)
|
||||
# endif
|
||||
#else
|
||||
# define __fortified_attr_access(a, o, s)
|
||||
# define __attr_access(x)
|
||||
# define __attr_access_none(argno)
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ (11, 0)
|
||||
/* Designates dealloc as a function to call to deallocate objects
|
||||
allocated by the declared function. */
|
||||
# define __attr_dealloc(dealloc, argno) \
|
||||
__attribute__ ((__malloc__ (dealloc, argno)))
|
||||
# define __attr_dealloc_free __attr_dealloc (__builtin_free, 1)
|
||||
#else
|
||||
# define __attr_dealloc(dealloc, argno)
|
||||
# define __attr_dealloc_free
|
||||
#endif
|
||||
|
||||
/* Specify that a function such as setjmp or vfork may return
|
||||
twice. */
|
||||
#if __GNUC_PREREQ (4, 1)
|
||||
# define __attribute_returns_twice__ __attribute__ ((__returns_twice__))
|
||||
#else
|
||||
# define __attribute_returns_twice__ /* Ignore. */
|
||||
#endif
|
||||
|
||||
#endif /* sys/cdefs.h */
|
@ -4,5 +4,4 @@
|
||||
;;; prevents loading of this file. Also the "-q" option to emacs
|
||||
;;; prevents both "~/.emacs" and this file from being loaded at startup.
|
||||
|
||||
;; default to better frame titles
|
||||
(setq-default frame-title-format (concat "%b - emacs@" (system-name)))
|
||||
(setq-default smime-CA-directory "/etc/ssl/certs")
|
||||
|
@ -1,49 +0,0 @@
|
||||
diff -u emacs-23.2/lisp/net/browse-url.el.xdg emacs-23.2/lisp/net/browse-url.el
|
||||
--- emacs-23.2/lisp/net/browse-url.el.xdg 2010-04-04 08:26:06.000000000 +1000
|
||||
+++ emacs-23.2/lisp/net/browse-url.el 2010-08-16 16:49:33.000000000 +1000
|
||||
@@ -234,6 +234,7 @@
|
||||
function is passed the URL and any other args of `browse-url'. The last
|
||||
regexp should probably be \".\" to specify a default browser."
|
||||
:type '(choice
|
||||
+ (function-item :tag "Default freedesktop.org browser" :value browse-url-default-xdg-browser)
|
||||
(function-item :tag "Emacs W3" :value browse-url-w3)
|
||||
(function-item :tag "W3 in another Emacs via `gnudoit'"
|
||||
:value browse-url-w3-gnudoit)
|
||||
@@ -266,6 +267,23 @@
|
||||
:version "21.1"
|
||||
:group 'browse-url)
|
||||
|
||||
+;;;###autoload
|
||||
+(defcustom browse-url-xdg-open-program "xdg-open"
|
||||
+ "*The name by which to invoke xdg-open."
|
||||
+ :type 'string
|
||||
+ :group 'browse-url)
|
||||
+
|
||||
+
|
||||
+;;;###autoload
|
||||
+(defun browse-url-default-xdg-browser (url &optional new-window)
|
||||
+ (interactive (browse-url-interactive-arg "URL: "))
|
||||
+ (let ((process-environment (browse-url-process-environment))
|
||||
+ (process-connection-type nil))
|
||||
+ (start-process (concat browse-url-xdg-open-program " " url) nil
|
||||
+ browse-url-xdg-open-program url)))
|
||||
+
|
||||
+
|
||||
+
|
||||
(defcustom browse-url-netscape-program "netscape"
|
||||
;; Info about netscape-remote from Karl Berry.
|
||||
"The name by which to invoke Netscape.
|
||||
@@ -885,10 +903,12 @@
|
||||
When called non-interactively, optional second argument NEW-WINDOW is
|
||||
used instead of `browse-url-new-window-flag'.
|
||||
|
||||
-The order attempted is gnome-moz-remote, Mozilla, Firefox,
|
||||
+The order attempted is xdg-open, gnome-moz-remote, Mozilla, Firefox,
|
||||
Galeon, Konqueror, Netscape, Mosaic, Lynx in an xterm, and then W3."
|
||||
(apply
|
||||
(cond
|
||||
+ ((executable-find browse-url-xdg-open-program)
|
||||
+ 'browse-url-default-xdg-browser)
|
||||
((executable-find browse-url-gnome-moz-program) 'browse-url-gnome-moz)
|
||||
((executable-find browse-url-mozilla-program) 'browse-url-mozilla)
|
||||
((executable-find browse-url-firefox-program) 'browse-url-firefox)
|
@ -1,17 +0,0 @@
|
||||
--- lisp/progmodes/hideshow.el.orig 2010-05-12 18:28:06.543936429 +0200
|
||||
+++ lisp/progmodes/hideshow.el 2010-05-12 18:27:40.212936751 +0200
|
||||
@@ -691,9 +691,11 @@ Return point, or nil if original point w
|
||||
;; look backward for the start of a block that contains the cursor
|
||||
(while (and (re-search-backward hs-block-start-regexp nil t)
|
||||
(not (setq done
|
||||
- (< here (save-excursion
|
||||
- (hs-forward-sexp (match-data t) 1)
|
||||
- (point)))))))
|
||||
+ (and (< here
|
||||
+ (save-excursion
|
||||
+ (hs-forward-sexp (match-data t) 1)
|
||||
+ (point)))
|
||||
+ (eq (hs-inside-comment-p) nil))))))
|
||||
(if done
|
||||
(point)
|
||||
(goto-char here)
|
@ -1,47 +0,0 @@
|
||||
From: Sergio Durigan Junior <sergiodj@riseup.net>
|
||||
Date: Tue, 02 Oct 2012 05:10:16 +0000
|
||||
Subject: Bugfix for EUDCB-BBDB queries.
|
||||
|
||||
* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
|
||||
querying BBDB for entries without a last name.
|
||||
|
||||
2012-10-02 Sergio Durigan Junior <sergiodj@riseup.net>
|
||||
|
||||
* net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result): Fix
|
||||
querying BBDB for entries without a last name (Bug#11580).
|
||||
|
||||
Index: emacs-23.3/lisp/net/eudcb-bbdb.el
|
||||
===================================================================
|
||||
--- emacs-23.3.orig/lisp/net/eudcb-bbdb.el
|
||||
+++ emacs-23.3/lisp/net/eudcb-bbdb.el
|
||||
@@ -169,18 +169,18 @@ The record is filtered according to `eud
|
||||
(symbol-name attr)))
|
||||
'record))))
|
||||
(t
|
||||
- (setq val "Unknown BBDB attribute")))
|
||||
- (if val
|
||||
- (cond
|
||||
- ((memq attr '(phones addresses))
|
||||
- (setq eudc-rec (append val eudc-rec)))
|
||||
- ((and (listp val)
|
||||
- (= 1 (length val)))
|
||||
- (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
|
||||
- ((> (length val) 0)
|
||||
- (setq eudc-rec (cons (cons attr val) eudc-rec)))
|
||||
- (t
|
||||
- (error "Unexpected attribute value")))))
|
||||
+ (error "Unknown BBDB attribute")))
|
||||
+ (cond
|
||||
+ ((or (not val) (equal val ""))) ; do nothing
|
||||
+ ((memq attr '(phones addresses))
|
||||
+ (setq eudc-rec (append val eudc-rec)))
|
||||
+ ((and (listp val)
|
||||
+ (= 1 (length val)))
|
||||
+ (setq eudc-rec (cons (cons attr (car val)) eudc-rec)))
|
||||
+ ((> (length val) 0)
|
||||
+ (setq eudc-rec (cons (cons attr val) eudc-rec)))
|
||||
+ (t
|
||||
+ (error "Unexpected attribute value"))))
|
||||
(nreverse eudc-rec)))
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
|
||||
*** emacs-23.4/lisp/files.el~ 2012-08-13 10:50:42.340171173 +0800
|
||||
--- emacs-23.4/lisp/files.el 2012-08-13 10:51:12.528172450 +0800
|
||||
***************
|
||||
*** 2986,2996 ****
|
||||
;; Obey `enable-local-eval'.
|
||||
((eq var 'eval)
|
||||
(when enable-local-eval
|
||||
! (push elt all-vars)
|
||||
! (or (eq enable-local-eval t)
|
||||
! (hack-one-local-variable-eval-safep (eval (quote val)))
|
||||
! (safe-local-variable-p var val)
|
||||
! (push elt unsafe-vars))))
|
||||
;; Ignore duplicates (except `mode') in the present list.
|
||||
((and (assq var all-vars) (not (eq var 'mode))) nil)
|
||||
;; Accept known-safe variables.
|
||||
--- 2986,3001 ----
|
||||
;; Obey `enable-local-eval'.
|
||||
((eq var 'eval)
|
||||
(when enable-local-eval
|
||||
! (let ((safe (or (hack-one-local-variable-eval-safep
|
||||
! (eval (quote val)))
|
||||
! ;; In case previously marked safe (bug#5636).
|
||||
! (safe-local-variable-p var val))))
|
||||
! ;; If not safe and e-l-v = :safe, ignore totally.
|
||||
! (when (or safe (not (eq enable-local-variables :safe)))
|
||||
! (push elt all-vars)
|
||||
! (or (eq enable-local-eval t)
|
||||
! safe
|
||||
! (push elt unsafe-vars))))))
|
||||
;; Ignore duplicates (except `mode') in the present list.
|
||||
((and (assq var all-vars) (not (eq var 'mode))) nil)
|
||||
;; Accept known-safe variables.
|
@ -1,483 +0,0 @@
|
||||
diff -r -c emacs-23.3-old/lisp/cedet/ede/auto.el emacs-23.3/lisp/cedet/ede/auto.el
|
||||
*** emacs-23.3-old/lisp/cedet/ede/auto.el 2011-01-09 01:45:14.000000000 +0800
|
||||
--- emacs-23.3/lisp/cedet/ede/auto.el 2012-01-09 13:20:12.410502713 +0800
|
||||
***************
|
||||
*** 58,63 ****
|
||||
--- 58,70 ----
|
||||
:initform t
|
||||
:documentation
|
||||
"Non-nil if this is an option when a user creates a project.")
|
||||
+ (safe-p :initarg :safe-p
|
||||
+ :initform t
|
||||
+ :documentation
|
||||
+ "Non-nil if the project load files are \"safe\".
|
||||
+ An unsafe project is one that loads project variables via Emacs
|
||||
+ Lisp code. A safe project is one that loads project variables by
|
||||
+ scanning files without loading Lisp code from them.")
|
||||
)
|
||||
"Class representing minimal knowledge set to run preliminary EDE functions.
|
||||
When more advanced functionality is needed from a project type, that projects
|
||||
***************
|
||||
*** 69,81 ****
|
||||
:name "Make" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:load-type 'ede-proj-load
|
||||
! :class-sym 'ede-proj-project)
|
||||
(ede-project-autoload "edeproject-automake"
|
||||
:name "Automake" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:initializers '(:makefile-type Makefile.am)
|
||||
:load-type 'ede-proj-load
|
||||
! :class-sym 'ede-proj-project)
|
||||
(ede-project-autoload "automake"
|
||||
:name "automake" :file 'ede/project-am
|
||||
:proj-file "Makefile.am"
|
||||
--- 76,90 ----
|
||||
:name "Make" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:load-type 'ede-proj-load
|
||||
! :class-sym 'ede-proj-project
|
||||
! :safe-p nil)
|
||||
(ede-project-autoload "edeproject-automake"
|
||||
:name "Automake" :file 'ede/proj
|
||||
:proj-file "Project.ede"
|
||||
:initializers '(:makefile-type Makefile.am)
|
||||
:load-type 'ede-proj-load
|
||||
! :class-sym 'ede-proj-project
|
||||
! :safe-p nil)
|
||||
(ede-project-autoload "automake"
|
||||
:name "automake" :file 'ede/project-am
|
||||
:proj-file "Makefile.am"
|
||||
***************
|
||||
*** 84,89 ****
|
||||
--- 93,100 ----
|
||||
:new-p nil))
|
||||
"List of vectors defining how to determine what type of projects exist.")
|
||||
|
||||
+ (put 'ede-project-class-files 'risky-local-variable t)
|
||||
+
|
||||
;;; EDE project-autoload methods
|
||||
;;
|
||||
(defmethod ede-project-root ((this ede-project-autoload))
|
||||
***************
|
||||
*** 122,127 ****
|
||||
--- 133,151 ----
|
||||
(when (and f (file-exists-p f))
|
||||
f)))
|
||||
|
||||
+ (defmethod ede-auto-load-project ((this ede-project-autoload) dir)
|
||||
+ "Load in the project associated with THIS project autoload description.
|
||||
+ THIS project description should be valid for DIR, where the project will
|
||||
+ be loaded."
|
||||
+ ;; Last line of defense: don't load unsafe projects.
|
||||
+ (when (not (or (oref this :safe-p)
|
||||
+ (ede-directory-safe-p dir)))
|
||||
+ (error "Attempt to load an unsafe project (bug elsewhere in EDE)"))
|
||||
+ ;; Things are good - so load the project.
|
||||
+ (let ((o (funcall (oref this load-type) dir)))
|
||||
+ (when (not o)
|
||||
+ (error "Project type error: :load-type failed to create a project"))
|
||||
+ (ede-add-project-to-global-list o)))
|
||||
|
||||
(provide 'ede/auto)
|
||||
|
||||
diff -r -c emacs-23.3-old/lisp/cedet/ede/simple.el emacs-23.3/lisp/cedet/ede/simple.el
|
||||
*** emacs-23.3-old/lisp/cedet/ede/simple.el 2011-01-09 01:45:14.000000000 +0800
|
||||
--- emacs-23.3/lisp/cedet/ede/simple.el 2012-01-09 13:17:20.010502312 +0800
|
||||
***************
|
||||
*** 50,56 ****
|
||||
:name "Simple" :file 'ede/simple
|
||||
:proj-file 'ede-simple-projectfile-for-dir
|
||||
:load-type 'ede-simple-load
|
||||
! :class-sym 'ede-simple-project)
|
||||
t)
|
||||
|
||||
(defcustom ede-simple-save-directory "~/.ede"
|
||||
--- 50,57 ----
|
||||
:name "Simple" :file 'ede/simple
|
||||
:proj-file 'ede-simple-projectfile-for-dir
|
||||
:load-type 'ede-simple-load
|
||||
! :class-sym 'ede-simple-project
|
||||
! :safe-p nil)
|
||||
t)
|
||||
|
||||
(defcustom ede-simple-save-directory "~/.ede"
|
||||
diff -r -c emacs-23.3-old/lisp/cedet/ede.el emacs-23.3/lisp/cedet/ede.el
|
||||
*** emacs-23.3-old/lisp/cedet/ede.el 2011-01-09 01:45:14.000000000 +0800
|
||||
--- emacs-23.3/lisp/cedet/ede.el 2012-01-09 13:24:44.854503349 +0800
|
||||
***************
|
||||
*** 94,99 ****
|
||||
--- 94,135 ----
|
||||
:group 'ede
|
||||
:type 'sexp) ; make this be a list of options some day
|
||||
|
||||
+ (defcustom ede-project-directories nil
|
||||
+ "Directories in which EDE may search for project files.
|
||||
+ If the value is t, EDE may search in any directory.
|
||||
+
|
||||
+ If the value is a function, EDE calls that function with one
|
||||
+ argument, the directory name; the function should return t iff
|
||||
+ EDE should look for project files in the directory.
|
||||
+
|
||||
+ Otherwise, the value should be a list of fully-expanded directory
|
||||
+ names. EDE searches for project files only in those directories.
|
||||
+ If you invoke the commands \\[ede] or \\[ede-new] on a directory
|
||||
+ that is not listed, Emacs will offer to add it to the list.
|
||||
+
|
||||
+ Any other value disables searching for EDE project files."
|
||||
+ :group 'ede
|
||||
+ :type '(choice (const :tag "Any directory" t)
|
||||
+ (repeat :tag "List of directories"
|
||||
+ (directory))
|
||||
+ (function :tag "Predicate"))
|
||||
+ :version "23.4"
|
||||
+ :risky t)
|
||||
+
|
||||
+ (defun ede-directory-safe-p (dir)
|
||||
+ "Return non-nil if DIR is a safe directory to load projects from.
|
||||
+ Projects that do not load a project definition as Emacs Lisp code
|
||||
+ are safe, and can be loaded automatically. Other project types,
|
||||
+ such as those created with Project.ede files, are safe only if
|
||||
+ specified by `ede-project-directories'."
|
||||
+ (setq dir (directory-file-name (expand-file-name dir)))
|
||||
+ ;; Load only if allowed by `ede-project-directories'.
|
||||
+ (or (eq ede-project-directories t)
|
||||
+ (and (functionp ede-project-directories)
|
||||
+ (funcall ede-project-directories dir))
|
||||
+ (and (listp ede-project-directories)
|
||||
+ (member dir ede-project-directories))))
|
||||
+
|
||||
|
||||
;;; Management variables
|
||||
|
||||
***************
|
||||
*** 419,442 ****
|
||||
Sets buffer local variables for EDE."
|
||||
(let* ((ROOT nil)
|
||||
(proj (ede-directory-get-open-project default-directory
|
||||
! 'ROOT)))
|
||||
(when (or proj ROOT
|
||||
! (ede-directory-project-p default-directory t))
|
||||
|
||||
! (when (not proj)
|
||||
! ;; @todo - this could be wasteful.
|
||||
! (setq proj (ede-load-project-file default-directory 'ROOT)))
|
||||
|
||||
! (setq ede-object (ede-buffer-object (current-buffer)
|
||||
'ede-object-project))
|
||||
|
||||
! (setq ede-object-root-project
|
||||
! (or ROOT (ede-project-root ede-object-project)))
|
||||
|
||||
! (if (and (not ede-object) ede-object-project)
|
||||
! (ede-auto-add-to-target))
|
||||
|
||||
! (ede-apply-target-options))))
|
||||
|
||||
(defun ede-reset-all-buffers (onoff)
|
||||
"Reset all the buffers due to change in EDE.
|
||||
--- 455,496 ----
|
||||
Sets buffer local variables for EDE."
|
||||
(let* ((ROOT nil)
|
||||
(proj (ede-directory-get-open-project default-directory
|
||||
! 'ROOT))
|
||||
! (projauto nil))
|
||||
!
|
||||
(when (or proj ROOT
|
||||
! ;; If there is no open project, look up the project
|
||||
! ;; autoloader to see if we should initialize.
|
||||
! (setq projauto (ede-directory-project-p default-directory t)))
|
||||
!
|
||||
! (when (and (not proj) projauto)
|
||||
!
|
||||
! ;; No project was loaded, but we have a project description
|
||||
! ;; object. This means that we can check if it is a safe
|
||||
! ;; project to load before requesting it to be loaded.
|
||||
!
|
||||
! (when (or (oref projauto safe-p)
|
||||
! ;; The project style is not safe, so check if it is
|
||||
! ;; in `ede-project-directories'.
|
||||
! (let ((top (ede-toplevel-project default-directory)))
|
||||
! (ede-directory-safe-p top)))
|
||||
|
||||
! ;; The project is safe, so load it in.
|
||||
! (setq proj (ede-load-project-file default-directory 'ROOT))))
|
||||
|
||||
! ;; Only initialize EDE state in this buffer if we found a project.
|
||||
! (when proj
|
||||
!
|
||||
! (setq ede-object (ede-buffer-object (current-buffer)
|
||||
'ede-object-project))
|
||||
|
||||
! (setq ede-object-root-project
|
||||
! (or ROOT (ede-project-root ede-object-project)))
|
||||
|
||||
! (if (and (not ede-object) ede-object-project)
|
||||
! (ede-auto-add-to-target))
|
||||
|
||||
! (ede-apply-target-options)))))
|
||||
|
||||
(defun ede-reset-all-buffers (onoff)
|
||||
"Reset all the buffers due to change in EDE.
|
||||
***************
|
||||
*** 555,567 ****
|
||||
|
||||
;;; Interactive method invocations
|
||||
;;
|
||||
! (defun ede (file)
|
||||
! "Start up EDE on something.
|
||||
! Argument FILE is the file or directory to load a project from."
|
||||
! (interactive "fProject File: ")
|
||||
! (if (not (file-exists-p file))
|
||||
! (ede-new file)
|
||||
! (ede-load-project-file (file-name-directory file))))
|
||||
|
||||
(defun ede-new (type &optional name)
|
||||
"Create a new project starting of project type TYPE.
|
||||
--- 609,681 ----
|
||||
|
||||
;;; Interactive method invocations
|
||||
;;
|
||||
! (defun ede (dir)
|
||||
! "Start up EDE for directory DIR.
|
||||
! If DIR has an existing project file, load it.
|
||||
! Otherwise, create a new project for DIR."
|
||||
! (interactive
|
||||
! ;; When choosing a directory to turn on, and we see some directory here,
|
||||
! ;; provide that as the default.
|
||||
! (let* ((top (ede-toplevel-project default-directory))
|
||||
! (promptdflt (or top default-directory)))
|
||||
! (list (read-directory-name "Project directory: "
|
||||
! promptdflt promptdflt t))))
|
||||
! (unless (file-directory-p dir)
|
||||
! (error "%s is not a directory" dir))
|
||||
! (when (ede-directory-get-open-project dir)
|
||||
! (error "%s already has an open project associated with it" dir))
|
||||
!
|
||||
! ;; Check if the directory has been added to the list of safe
|
||||
! ;; directories. It can also add the directory to the safe list if
|
||||
! ;; the user chooses.
|
||||
! (if (ede-check-project-directory dir)
|
||||
! (progn
|
||||
! ;; If there is a project in DIR, load it, otherwise do
|
||||
! ;; nothing.
|
||||
! (ede-load-project-file dir)
|
||||
!
|
||||
! ;; Check if we loaded anything on the previous line.
|
||||
! (if (ede-current-project dir)
|
||||
!
|
||||
! ;; We successfully opened an existing project. Some open
|
||||
! ;; buffers may also be referring to this project.
|
||||
! ;; Resetting all the buffers will get them to also point
|
||||
! ;; at this new open project.
|
||||
! (ede-reset-all-buffers 1)
|
||||
!
|
||||
! ;; ELSE
|
||||
! ;; There was no project, so switch to `ede-new' which is how
|
||||
! ;; a user can select a new kind of project to create.
|
||||
! (let ((default-directory (expand-file-name dir)))
|
||||
! (call-interactively 'ede-new))))
|
||||
!
|
||||
! ;; If the proposed directory isn't safe, then say so.
|
||||
! (error "%s is not an allowed project directory in `ede-project-directories'"
|
||||
! dir)))
|
||||
!
|
||||
! (defun ede-check-project-directory (dir)
|
||||
! "Check if DIR should be in `ede-project-directories'.
|
||||
! If it is not, try asking the user if it should be added; if so,
|
||||
! add it and save `ede-project-directories' via Customize.
|
||||
! Return nil iff DIR should not be in `ede-project-directories'."
|
||||
! (setq dir (directory-file-name (expand-file-name dir))) ; strip trailing /
|
||||
! (or (eq ede-project-directories t)
|
||||
! (and (functionp ede-project-directories)
|
||||
! (funcall ede-project-directories dir))
|
||||
! ;; If `ede-project-directories' is a list, maybe add it.
|
||||
! (when (listp ede-project-directories)
|
||||
! (or (member dir ede-project-directories)
|
||||
! (when (y-or-n-p (format "`%s' is not listed in `ede-project-directories'.
|
||||
! Add it to the list of allowed project directories? "
|
||||
! dir))
|
||||
! (push dir ede-project-directories)
|
||||
! ;; If possible, save `ede-project-directories'.
|
||||
! (if (or custom-file user-init-file)
|
||||
! (let ((coding-system-for-read nil))
|
||||
! (customize-save-variable
|
||||
! 'ede-project-directories
|
||||
! ede-project-directories)))
|
||||
! t)))))
|
||||
|
||||
(defun ede-new (type &optional name)
|
||||
"Create a new project starting of project type TYPE.
|
||||
***************
|
||||
*** 596,601 ****
|
||||
--- 710,720 ----
|
||||
(error "Cannot create project in non-existent directory %s" default-directory))
|
||||
(when (not (file-writable-p default-directory))
|
||||
(error "No write permissions for %s" default-directory))
|
||||
+ (unless (ede-check-project-directory default-directory)
|
||||
+ (error "%s is not an allowed project directory in `ede-project-directories'"
|
||||
+ default-directory))
|
||||
+ ;; Make sure the project directory is loadable in the future.
|
||||
+ (ede-check-project-directory default-directory)
|
||||
;; Create the project
|
||||
(let* ((obj (object-assoc type 'name ede-project-class-files))
|
||||
(nobj (let ((f (oref obj file))
|
||||
***************
|
||||
*** 629,634 ****
|
||||
--- 748,757 ----
|
||||
(ede-add-subproject pp nobj)
|
||||
(ede-commit-project pp)))
|
||||
(ede-commit-project nobj))
|
||||
+ ;; Once the project is created, load it again. This used to happen
|
||||
+ ;; lazily, but with project loading occurring less often and with
|
||||
+ ;; security in mind, this is now the safe time to reload.
|
||||
+ (ede-load-project-file default-directory)
|
||||
;; Have the menu appear
|
||||
(setq ede-minor-mode t)
|
||||
;; Allert the user
|
||||
***************
|
||||
*** 651,661 ****
|
||||
(defun ede-rescan-toplevel ()
|
||||
"Rescan all project files."
|
||||
(interactive)
|
||||
! (let ((toppath (ede-toplevel-project default-directory))
|
||||
! (ede-deep-rescan t))
|
||||
! (project-rescan (ede-load-project-file toppath))
|
||||
! (ede-reset-all-buffers 1)
|
||||
! ))
|
||||
|
||||
(defun ede-new-target (&rest args)
|
||||
"Create a new target specific to this type of project file.
|
||||
--- 774,789 ----
|
||||
(defun ede-rescan-toplevel ()
|
||||
"Rescan all project files."
|
||||
(interactive)
|
||||
! (if (not (ede-directory-get-open-project default-directory))
|
||||
! ;; This directory isn't open. Can't rescan.
|
||||
! (error "Attempt to rescan a project that isn't open")
|
||||
!
|
||||
! ;; Continue
|
||||
! (let ((toppath (ede-toplevel-project default-directory))
|
||||
! (ede-deep-rescan t))
|
||||
!
|
||||
! (project-rescan (ede-load-project-file toppath))
|
||||
! (ede-reset-all-buffers 1))))
|
||||
|
||||
(defun ede-new-target (&rest args)
|
||||
"Create a new target specific to this type of project file.
|
||||
***************
|
||||
*** 891,897 ****
|
||||
;; Do the load
|
||||
;;(message "EDE LOAD : %S" file)
|
||||
(let* ((file dir)
|
||||
! (path (expand-file-name (file-name-directory file)))
|
||||
(pfc (ede-directory-project-p path))
|
||||
(toppath nil)
|
||||
(o nil))
|
||||
--- 1019,1025 ----
|
||||
;; Do the load
|
||||
;;(message "EDE LOAD : %S" file)
|
||||
(let* ((file dir)
|
||||
! (path (file-name-as-directory (expand-file-name dir)))
|
||||
(pfc (ede-directory-project-p path))
|
||||
(toppath nil)
|
||||
(o nil))
|
||||
***************
|
||||
*** 920,932 ****
|
||||
;; See if it's been loaded before
|
||||
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
|
||||
ede-projects))
|
||||
! (if (not o)
|
||||
! ;; If not, get it now.
|
||||
! (let ((ede-constructing pfc))
|
||||
! (setq o (funcall (oref pfc load-type) toppath))
|
||||
! (when (not o)
|
||||
! (error "Project type error: :load-type failed to create a project"))
|
||||
! (ede-add-project-to-global-list o)))
|
||||
|
||||
;; Return the found root project.
|
||||
(when rootreturn (set rootreturn o))
|
||||
--- 1048,1058 ----
|
||||
;; See if it's been loaded before
|
||||
(setq o (object-assoc (ede-dir-to-projectfile pfc toppath) 'file
|
||||
ede-projects))
|
||||
!
|
||||
! ;; If not open yet, load it.
|
||||
! (unless o
|
||||
! (let ((ede-constructing pfc))
|
||||
! (setq o (ede-auto-load-project pfc toppath))))
|
||||
|
||||
;; Return the found root project.
|
||||
(when rootreturn (set rootreturn o))
|
||||
***************
|
||||
*** 980,992 ****
|
||||
(and root
|
||||
(ede-find-subproject-for-directory root updir))
|
||||
;; Try the all structure based search.
|
||||
! (ede-directory-get-open-project updir)
|
||||
! ;; Load up the project file as a last resort.
|
||||
! ;; Last resort since it uses file-truename, and other
|
||||
! ;; slow features.
|
||||
! (and (ede-directory-project-p updir)
|
||||
! (ede-load-project-file
|
||||
! (file-name-as-directory updir))))))))))
|
||||
|
||||
(defun ede-current-project (&optional dir)
|
||||
"Return the current project file.
|
||||
--- 1106,1112 ----
|
||||
(and root
|
||||
(ede-find-subproject-for-directory root updir))
|
||||
;; Try the all structure based search.
|
||||
! (ede-directory-get-open-project updir))))))))
|
||||
|
||||
(defun ede-current-project (&optional dir)
|
||||
"Return the current project file.
|
||||
***************
|
||||
*** 1000,1010 ****
|
||||
;; No current project.
|
||||
(when (not ans)
|
||||
(let* ((ldir (or dir default-directory)))
|
||||
! (setq ans (ede-directory-get-open-project ldir))
|
||||
! (or ans
|
||||
! ;; No open project, if this dir pass project-p, then load.
|
||||
! (when (ede-directory-project-p ldir)
|
||||
! (setq ans (ede-load-project-file ldir))))))
|
||||
;; Return what we found.
|
||||
ans))
|
||||
|
||||
--- 1120,1126 ----
|
||||
;; No current project.
|
||||
(when (not ans)
|
||||
(let* ((ldir (or dir default-directory)))
|
||||
! (setq ans (ede-directory-get-open-project ldir))))
|
||||
;; Return what we found.
|
||||
ans))
|
||||
|
||||
***************
|
||||
*** 1059,1070 ****
|
||||
"Return the project which is the parent of TARGET.
|
||||
It is recommended you track the project a different way as this function
|
||||
could become slow in time."
|
||||
! ;; @todo - use ede-object-project as a starting point.
|
||||
! (let ((ans nil) (projs ede-projects))
|
||||
! (while (and (not ans) projs)
|
||||
! (setq ans (ede-target-in-project-p (car projs) target)
|
||||
! projs (cdr projs)))
|
||||
! ans))
|
||||
|
||||
(defmethod ede-find-target ((proj ede-project) buffer)
|
||||
"Fetch the target in PROJ belonging to BUFFER or nil."
|
||||
--- 1175,1187 ----
|
||||
"Return the project which is the parent of TARGET.
|
||||
It is recommended you track the project a different way as this function
|
||||
could become slow in time."
|
||||
! (or ede-object-project
|
||||
! ;; If not cached, derive it from the current directory of the target.
|
||||
! (let ((ans nil) (projs ede-projects))
|
||||
! (while (and (not ans) projs)
|
||||
! (setq ans (ede-target-in-project-p (car projs) target)
|
||||
! projs (cdr projs)))
|
||||
! ans)))
|
||||
|
||||
(defmethod ede-find-target ((proj ede-project) buffer)
|
||||
"Fetch the target in PROJ belonging to BUFFER or nil."
|
31
emacs-libdir-vs-systemd.patch
Normal file
31
emacs-libdir-vs-systemd.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From a56539c1d7ef7aa56e575685bdfe1406aebb518d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Oliver <git@mavit.org.uk>
|
||||
Date: Wed, 5 Feb 2020 12:42:04 +0000
|
||||
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20assemble=20systemdunitdir=20fro?=
|
||||
=?UTF-8?q?m=20`libdir`?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
On 64 bit Fedora, `libdir` is `/usr/lib64`, whereas systemd services
|
||||
live under `/usr/lib/systemd`.
|
||||
---
|
||||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 2c82c49fba..b2468eb824 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -208,7 +208,7 @@ appdatadir=
|
||||
# Other options include ~/.config/systemd/user/,
|
||||
# $XDG_RUNTIME_DIR/systemd/user/
|
||||
# It seems the user may end up having to make a manual link...
|
||||
-systemdunitdir=$(libdir)/systemd/user
|
||||
+systemdunitdir=$(shell pkg-config --variable=systemduserunitdir systemd)
|
||||
|
||||
# Where the etc/images/icons/hicolor directory is to be installed.
|
||||
icondir=$(datarootdir)/icons
|
||||
--
|
||||
2.24.1
|
||||
|
171
emacs-pdmp-fingerprint.patch
Normal file
171
emacs-pdmp-fingerprint.patch
Normal file
@ -0,0 +1,171 @@
|
||||
From e81f1faca4382ed5c8f15fec84fb7c900a5468f9 Mon Sep 17 00:00:00 2001
|
||||
From: Glenn Morris <rgm@gnu.org>
|
||||
Date: Mon, 11 Oct 2021 14:03:26 +0200
|
||||
Subject: Make the installed pmdp file use a fingerprint
|
||||
|
||||
* Makefile.in (EMACS_PDMP): Use --fingerprint.
|
||||
|
||||
* doc/emacs/cmdargs.texi (Action Arguments): Document --fingerprint.
|
||||
|
||||
* src/emacs.c (load_pdump): Load the fingerprinted version of the
|
||||
pdmp file (bug#42790).
|
||||
(main): Support --fingerprint.
|
||||
|
||||
* src/pdumper.c (dump_fingerprint): Make non-static.
|
||||
|
||||
* src/pdumper.h: Declare dump_fingerprint.
|
||||
---
|
||||
Makefile.in | 3 ++-
|
||||
doc/emacs/cmdargs.texi | 5 +++++
|
||||
src/emacs.c | 31 +++++++++++++++++++++++++++++--
|
||||
src/pdumper.c | 2 +-
|
||||
src/pdumper.h | 3 +++
|
||||
5 files changed, 40 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 5fc1edc..c6c507f 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -313,6 +313,7 @@ TRANSFORM = @program_transform_name@
|
||||
EMACS_NAME = `echo emacs | sed '$(TRANSFORM)'`
|
||||
EMACS = ${EMACS_NAME}${EXEEXT}
|
||||
EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT}
|
||||
+EMACS_PDMP = `./src/emacs${EXEEXT} --fingerprint 2>&1 | sed 's/.* //'`.pdmp
|
||||
|
||||
# Subdirectories to make recursively.
|
||||
SUBDIR = $(NTDIR) lib lib-src src lisp
|
||||
@@ -521,7 +522,7 @@ install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
|
||||
ifeq (${ns_self_contained},no)
|
||||
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)"
|
||||
ifeq (${DUMPING},pdumper)
|
||||
- ${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs.pdmp
|
||||
+ ${INSTALL_DATA} src/emacs.pdmp "$(DESTDIR)${libexecdir}/emacs/${version}/${configuration}"/emacs-${EMACS_PDMP}
|
||||
endif
|
||||
-chmod 755 "$(DESTDIR)${bindir}/$(EMACSFULL)"
|
||||
ifndef NO_BIN_LINK
|
||||
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
|
||||
index d5177fa..313682b 100644
|
||||
--- a/doc/emacs/cmdargs.texi
|
||||
+++ b/doc/emacs/cmdargs.texi
|
||||
@@ -185,6 +185,11 @@ successfully.
|
||||
@item --version
|
||||
@opindex --version
|
||||
Print Emacs version, then exit successfully.
|
||||
+
|
||||
+@item --fingerprint
|
||||
+@opindex --fingerprint
|
||||
+Print the Emacs ``fingerprint'', which is used to uniquely identify
|
||||
+the compiled version of Emacs.
|
||||
@end table
|
||||
|
||||
@node Initial Options
|
||||
diff --git a/src/emacs.c b/src/emacs.c
|
||||
index 866e43f..cda7a9b 100644
|
||||
--- a/src/emacs.c
|
||||
+++ b/src/emacs.c
|
||||
@@ -133,6 +133,7 @@ extern char etext;
|
||||
#endif
|
||||
|
||||
#include "pdumper.h"
|
||||
+#include "fingerprint.h"
|
||||
#include "epaths.h"
|
||||
|
||||
static const char emacs_version[] = PACKAGE_VERSION;
|
||||
@@ -255,6 +256,7 @@ Initialization options:\n\
|
||||
#ifdef HAVE_PDUMPER
|
||||
"\
|
||||
--dump-file FILE read dumped state from FILE\n\
|
||||
+--fingerprint output fingerprint and exit\n\
|
||||
",
|
||||
#endif
|
||||
#if SECCOMP_USABLE
|
||||
@@ -830,6 +832,8 @@ load_pdump (int argc, char **argv)
|
||||
const char *const suffix = ".pdmp";
|
||||
int result;
|
||||
char *emacs_executable = argv[0];
|
||||
+ ptrdiff_t hexbuf_size;
|
||||
+ char *hexbuf;
|
||||
const char *strip_suffix =
|
||||
#if defined DOS_NT || defined CYGWIN
|
||||
".exe"
|
||||
@@ -927,9 +931,15 @@ load_pdump (int argc, char **argv)
|
||||
/* Look for "emacs.pdmp" in PATH_EXEC. We hardcode "emacs" in
|
||||
"emacs.pdmp" so that the Emacs binary still works if the user
|
||||
copies and renames it. */
|
||||
+ hexbuf_size = 2 * sizeof fingerprint;
|
||||
+ hexbuf = xmalloc (hexbuf_size + 1);
|
||||
+ hexbuf_digest (hexbuf, (char *)fingerprint, sizeof fingerprint);
|
||||
+ hexbuf[hexbuf_size] = '\0';
|
||||
needed = (strlen (path_exec)
|
||||
+ 1
|
||||
+ strlen (argv0_base)
|
||||
+ + 1
|
||||
+ + strlen (hexbuf)
|
||||
+ strlen (suffix)
|
||||
+ 1);
|
||||
if (bufsize < needed)
|
||||
@@ -937,8 +947,8 @@ load_pdump (int argc, char **argv)
|
||||
xfree (dump_file);
|
||||
dump_file = xpalloc (NULL, &bufsize, needed - bufsize, -1, 1);
|
||||
}
|
||||
- sprintf (dump_file, "%s%c%s%s",
|
||||
- path_exec, DIRECTORY_SEP, argv0_base, suffix);
|
||||
+ sprintf (dump_file, "%s%c%s-%s%s",
|
||||
+ path_exec, DIRECTORY_SEP, argv0_base, hexbuf, suffix);
|
||||
#if !defined (NS_SELF_CONTAINED)
|
||||
/* Assume the Emacs binary lives in a sibling directory as set up by
|
||||
the default installation configuration. */
|
||||
@@ -1387,6 +1397,23 @@ main (int argc, char **argv)
|
||||
exit (0);
|
||||
}
|
||||
|
||||
+#ifdef HAVE_PDUMPER
|
||||
+ if (argmatch (argv, argc, "-fingerprint", "--fingerprint", 4,
|
||||
+ NULL, &skip_args))
|
||||
+ {
|
||||
+ if (initialized)
|
||||
+ {
|
||||
+ dump_fingerprint ("fingerprint", (unsigned char *)fingerprint);
|
||||
+ exit (0);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ fputs ("Not initialized\n", stderr);
|
||||
+ exit (1);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
emacs_wd = emacs_get_current_dir_name ();
|
||||
#ifdef HAVE_PDUMPER
|
||||
if (dumped_with_pdumper_p ())
|
||||
diff --git a/src/pdumper.c b/src/pdumper.c
|
||||
index 11c680d..977f4fb 100644
|
||||
--- a/src/pdumper.c
|
||||
+++ b/src/pdumper.c
|
||||
@@ -312,7 +312,7 @@ dump_reloc_set_offset (struct dump_reloc *reloc, dump_off offset)
|
||||
error ("dump relocation out of range");
|
||||
}
|
||||
|
||||
-static void
|
||||
+void
|
||||
dump_fingerprint (char const *label,
|
||||
unsigned char const xfingerprint[sizeof fingerprint])
|
||||
{
|
||||
diff --git a/src/pdumper.h b/src/pdumper.h
|
||||
index deec9af..bc339c4 100644
|
||||
--- a/src/pdumper.h
|
||||
+++ b/src/pdumper.h
|
||||
@@ -50,6 +50,9 @@ enum { PDUMPER_NO_OBJECT = -1 };
|
||||
#define PDUMPER_REMEMBER_SCALAR(thing) \
|
||||
pdumper_remember_scalar (&(thing), sizeof (thing))
|
||||
|
||||
+extern void dump_fingerprint (const char *label,
|
||||
+ const unsigned char *xfingerprint);
|
||||
+
|
||||
extern void pdumper_remember_scalar_impl (void *data, ptrdiff_t nbytes);
|
||||
|
||||
INLINE void
|
||||
--
|
||||
cgit v1.1
|
||||
|
22
emacs-spellchecker.patch
Normal file
22
emacs-spellchecker.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
|
||||
index 0a3a49d868..b6c0975857 100644
|
||||
--- a/lisp/textmodes/ispell.el
|
||||
+++ b/lisp/textmodes/ispell.el
|
||||
@@ -191,12 +191,12 @@ Must be greater than 1."
|
||||
:type 'integer)
|
||||
|
||||
(defcustom ispell-program-name
|
||||
- (or (executable-find "aspell")
|
||||
- (executable-find "ispell")
|
||||
+ ;; Enchant is commonly installed as `enchant-2', so use this
|
||||
+ ;; name and avoid old versions of `enchant'.
|
||||
+ (or (executable-find "enchant-2")
|
||||
(executable-find "hunspell")
|
||||
- ;; Enchant is commonly installed as `enchant-2', so use this
|
||||
- ;; name and avoid old versions of `enchant'.
|
||||
- (executable-find "enchant-2")
|
||||
+ (executable-find "aspell")
|
||||
+ (executable-find "ispell")
|
||||
"ispell")
|
||||
"Program invoked by \\[ispell-word] and \\[ispell-region] commands."
|
||||
:type 'string
|
11
emacs-system-crypto-policies.patch
Normal file
11
emacs-system-crypto-policies.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/gnutls.c 2016-01-24 10:29:58.000000000 +0100
|
||||
+++ b/src/gnutls.c 2016-02-02 09:32:28.477274274 +0100
|
||||
@@ -1557,7 +1557,7 @@
|
||||
gnutls_certificate_credentials_t x509_cred = NULL;
|
||||
gnutls_anon_client_credentials_t anon_cred = NULL;
|
||||
Lisp_Object global_init;
|
||||
- char const *priority_string_ptr = "NORMAL"; /* default priority string. */
|
||||
+ char const *priority_string_ptr = "@SYSTEM"; /* default priority string. */
|
||||
char *c_hostname;
|
||||
|
||||
/* Placeholders for the property list elements. */
|
@ -1,173 +0,0 @@
|
||||
diff -U0 emacs-23.3/src/ChangeLog.wm-state-hidden emacs-23.3/src/ChangeLog
|
||||
--- emacs-23.3/src/ChangeLog.wm-state-hidden 2011-03-07 06:08:03.000000000 +0100
|
||||
+++ emacs-23.3/src/ChangeLog 2011-11-23 11:49:57.053019839 +0100
|
||||
@@ -1,0 +2,13 @@
|
||||
+2011-10-30 Jan Djärv <jan.h.d@swipnet.se>
|
||||
+
|
||||
+ * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
|
||||
+
|
||||
+ * xterm.c: Declare x_handle_net_wm_state to return int.
|
||||
+ (handle_one_xevent): Check if we are iconified but don't have
|
||||
+ _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
|
||||
+ (get_current_wm_state): Return non-zero if not hidden,
|
||||
+ check for _NET_WM_STATE_HIDDEN (Bug#9893).
|
||||
+ (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
|
||||
+ (x_handle_net_wm_state): Return what get_current_wm_state returns.
|
||||
+ (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
|
||||
+
|
||||
diff -up emacs-23.3/src/xterm.c.wm-state-hidden emacs-23.3/src/xterm.c
|
||||
--- emacs-23.3/src/xterm.c.wm-state-hidden 2011-02-12 01:27:01.000000000 +0100
|
||||
+++ emacs-23.3/src/xterm.c 2011-11-23 11:55:10.867096378 +0100
|
||||
@@ -375,7 +375,7 @@ static void x_scroll_bar_report_motion P
|
||||
enum scroll_bar_part *,
|
||||
Lisp_Object *, Lisp_Object *,
|
||||
unsigned long *));
|
||||
-static void x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
|
||||
+static int x_handle_net_wm_state P_ ((struct frame *, XPropertyEvent *));
|
||||
static void x_check_fullscreen P_ ((struct frame *));
|
||||
static void x_check_expected_move P_ ((struct frame *, int, int));
|
||||
static void x_sync_with_move P_ ((struct frame *, int, int, int));
|
||||
@@ -6121,7 +6121,19 @@ handle_one_xevent (dpyinfo, eventp, fini
|
||||
last_user_time = event.xproperty.time;
|
||||
f = x_top_window_to_frame (dpyinfo, event.xproperty.window);
|
||||
if (f && event.xproperty.atom == dpyinfo->Xatom_net_wm_state)
|
||||
- x_handle_net_wm_state (f, &event.xproperty);
|
||||
+ if (x_handle_net_wm_state (f, &event.xproperty) && f->iconified)
|
||||
+ {
|
||||
+ /* Gnome shell does not iconify us when C-z is pressed. It hides
|
||||
+ the frame. So if our state says we aren't hidden anymore,
|
||||
+ treat is as deiconfied. */
|
||||
+ if (! f->async_iconified)
|
||||
+ SET_FRAME_GARBAGED (f);
|
||||
+ f->async_visible = 1;
|
||||
+ f->async_iconified = 0;
|
||||
+ f->output_data.x->has_been_visible = 1;
|
||||
+ inev.ie.kind = DEICONIFY_EVENT;
|
||||
+ XSETFRAME (inev.ie.frame_or_window, f);
|
||||
+ }
|
||||
|
||||
x_handle_property_notify (&event.xproperty);
|
||||
xft_settings_event (dpyinfo, &event);
|
||||
@@ -8573,9 +8585,10 @@ x_set_sticky (f, new_value, old_value)
|
||||
|
||||
/* Return the current _NET_WM_STATE.
|
||||
SIZE_STATE is set to one of the FULLSCREEN_* values.
|
||||
- STICKY is set to 1 if the sticky state is set, 0 if not. */
|
||||
+ STICKY is set to 1 if the sticky state is set, 0 if not.
|
||||
+ Return non-zero if we are not hidden, zero if we are. */
|
||||
|
||||
-static void
|
||||
+static int
|
||||
get_current_vm_state (struct frame *f,
|
||||
Window window,
|
||||
int *size_state,
|
||||
@@ -8583,7 +8596,7 @@ get_current_vm_state (struct frame *f,
|
||||
{
|
||||
Atom actual_type;
|
||||
unsigned long actual_size, bytes_remaining;
|
||||
- int i, rc, actual_format;
|
||||
+ int i, rc, actual_format, is_hidden = 0;
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
long max_len = 65536;
|
||||
Display *dpy = FRAME_X_DISPLAY (f);
|
||||
@@ -8605,7 +8618,7 @@ get_current_vm_state (struct frame *f,
|
||||
if (tmp_data) XFree (tmp_data);
|
||||
x_uncatch_errors ();
|
||||
UNBLOCK_INPUT;
|
||||
- return;
|
||||
+ return ! f->iconified;
|
||||
}
|
||||
|
||||
x_uncatch_errors ();
|
||||
@@ -8613,7 +8626,9 @@ get_current_vm_state (struct frame *f,
|
||||
for (i = 0; i < actual_size; ++i)
|
||||
{
|
||||
Atom a = ((Atom*)tmp_data)[i];
|
||||
- if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
|
||||
+ if (a == dpyinfo->Xatom_net_wm_state_hidden)
|
||||
+ is_hidden = 1;
|
||||
+ else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
|
||||
{
|
||||
if (*size_state == FULLSCREEN_HEIGHT)
|
||||
*size_state = FULLSCREEN_MAXIMIZED;
|
||||
@@ -8635,6 +8650,7 @@ get_current_vm_state (struct frame *f,
|
||||
|
||||
if (tmp_data) XFree (tmp_data);
|
||||
UNBLOCK_INPUT;
|
||||
+ return ! is_hidden;
|
||||
}
|
||||
|
||||
/* Do fullscreen as specified in extended window manager hints */
|
||||
@@ -8647,7 +8663,7 @@ do_ewmh_fullscreen (f)
|
||||
Lisp_Object lval = get_frame_param (f, Qfullscreen);
|
||||
int cur, dummy;
|
||||
|
||||
- get_current_vm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
|
||||
+ (void)get_current_vm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy);
|
||||
|
||||
/* Some window managers don't say they support _NET_WM_STATE, but they do say
|
||||
they support _NET_WM_STATE_FULLSCREEN. Try that also. */
|
||||
@@ -8721,7 +8737,7 @@ XTfullscreen_hook (f)
|
||||
}
|
||||
|
||||
|
||||
-static void
|
||||
+static int
|
||||
x_handle_net_wm_state (f, event)
|
||||
struct frame *f;
|
||||
XPropertyEvent *event;
|
||||
@@ -8729,10 +8745,10 @@ x_handle_net_wm_state (f, event)
|
||||
int value = FULLSCREEN_NONE;
|
||||
Lisp_Object lval;
|
||||
int sticky = 0;
|
||||
+ int not_hidden = get_current_vm_state (f, event->window, &value, &sticky);
|
||||
|
||||
- get_current_vm_state (f, event->window, &value, &sticky);
|
||||
lval = Qnil;
|
||||
- switch (value)
|
||||
+ switch (value)
|
||||
{
|
||||
case FULLSCREEN_WIDTH:
|
||||
lval = Qfullwidth;
|
||||
@@ -8747,9 +8763,10 @@ x_handle_net_wm_state (f, event)
|
||||
lval = Qmaximized;
|
||||
break;
|
||||
}
|
||||
-
|
||||
store_frame_param (f, Qfullscreen, lval);
|
||||
store_frame_param (f, Qsticky, sticky ? Qt : Qnil);
|
||||
+
|
||||
+ return not_hidden;
|
||||
}
|
||||
|
||||
/* Check if we need to resize the frame due to a fullscreen request.
|
||||
@@ -9487,7 +9504,7 @@ x_iconify_frame (f)
|
||||
if (!NILP (type))
|
||||
x_bitmap_icon (f, type);
|
||||
|
||||
-#ifdef USE_GTK
|
||||
+#if defined (USE_GTK)
|
||||
if (FRAME_GTK_OUTER_WIDGET (f))
|
||||
{
|
||||
if (! FRAME_VISIBLE_P (f))
|
||||
@@ -10518,6 +10535,8 @@ x_term_init (display_name, xrm_option, r
|
||||
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_MAXIMIZED_VERT", False);
|
||||
dpyinfo->Xatom_net_wm_state_sticky
|
||||
= XInternAtom (dpyinfo->display, "_NET_WM_STATE_STICKY", False);
|
||||
+ dpyinfo->Xatom_net_wm_state_hidden
|
||||
+ = XInternAtom (dpyinfo->display, "_NET_WM_STATE_HIDDEN", False);
|
||||
dpyinfo->Xatom_net_window_type
|
||||
= XInternAtom (dpyinfo->display, "_NET_WM_WINDOW_TYPE", False);
|
||||
dpyinfo->Xatom_net_window_type_tooltip
|
||||
diff -up emacs-23.3/src/xterm.h.wm-state-hidden emacs-23.3/src/xterm.h
|
||||
--- emacs-23.3/src/xterm.h.wm-state-hidden 2011-01-08 18:45:14.000000000 +0100
|
||||
+++ emacs-23.3/src/xterm.h 2011-11-23 11:56:01.219467181 +0100
|
||||
@@ -365,7 +365,7 @@ struct x_display_info
|
||||
/* Atoms dealing with EWMH (i.e. _NET_...) */
|
||||
Atom Xatom_net_wm_state, Xatom_net_wm_state_fullscreen_atom,
|
||||
Xatom_net_wm_state_maximized_horz, Xatom_net_wm_state_maximized_vert,
|
||||
- Xatom_net_wm_state_sticky, Xatom_net_frame_extents;
|
||||
+ Xatom_net_wm_state_sticky, Xatom_net_wm_state_hidden, Xatom_net_frame_extents;
|
||||
|
||||
/* XSettings atoms and windows. */
|
||||
Atom Xatom_xsettings_sel, Xatom_xsettings_prop, Xatom_xsettings_mgr;
|
@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Emacs
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
Comment[zh_TW]=編輯文字
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=emacs %f
|
||||
Icon=emacs
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Application;Utility;TextEditor;X-Red-Hat-Base;
|
||||
Encoding=UTF-8
|
||||
StartupWMClass=Emacs
|
1042
emacs.spec
1042
emacs.spec
File diff suppressed because it is too large
Load Diff
@ -1,12 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Emacs Client
|
||||
GenericName=Text Editor
|
||||
Comment=Edit text
|
||||
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
|
||||
Exec=emacsclient -c --alternate-editor="" %f
|
||||
Icon=emacs
|
||||
Type=Application
|
||||
Terminal=false
|
||||
Categories=Application;Utility;TextEditor;X-Red-Hat-Base;
|
||||
Encoding=UTF-8
|
||||
StartupWMClass=Emacs
|
@ -1,3 +0,0 @@
|
||||
(when window-system
|
||||
;; make switching frames works properly under the default click-to-focus
|
||||
(setq focus-follows-mouse nil))
|
@ -1,11 +0,0 @@
|
||||
--- emacs-22.1/src/sound.c~ 2007-03-06 07:14:14.000000000 -0500
|
||||
+++ emacs-22.1/src/sound.c 2007-08-09 15:54:52.117018000 -0400
|
||||
@@ -1469,7 +1469,7 @@ Internal use only, use `play-sound' inst
|
||||
error ("No usable sound device driver found");
|
||||
|
||||
/* Open the device. */
|
||||
- current_sound_device->open (current_sound_device);
|
||||
+ (current_sound_device->open) (current_sound_device);
|
||||
|
||||
/* Play the sound. */
|
||||
current_sound->play (current_sound, current_sound_device);
|
53
gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg
Normal file
53
gpgkey-17E90D521672C04631B1183EE78DAE0F3115E06B.gpg
Normal file
@ -0,0 +1,53 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Comment: 17E9 0D52 1672 C046 31B1 183E E78D AE0F 3115 E06B
|
||||
Comment: Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
xsFNBGIorlcBEADDfvr2wRY5BvUYDRelVXoyPg9kmufSw7M4mNRgjJ/ACzTL0DrT
|
||||
/MiItj/9hFYofCKvqbKNXoidD0K8yW3hg6C4EKEBdh7Tgd1owcn6R4QlxPyWd9a+
|
||||
bJBf/9TV4RtJDdgFSysxpg+q6IiKu91+RH6ioHMHHbMt1VHV8hRwrfr/z9NbWGKw
|
||||
Q5V3dyd+bJcxa2Jrq4Bai1JUj3CJFXmLq7tRqnJwXWURgmyG2R6hV0pGiscxcIAt
|
||||
+aP6iFPVIjOg7y8ttI2DoTA59pqpRD1kcQ3h9wgzRHIKKJwlEkhudeoGgwciGPyp
|
||||
GYKDC5gY02BFRcEr669DP24toJ9RiGA6YBg6ajZZ4k/qLBoBChN9HrbnG+Jh2/ZC
|
||||
ncXTpnwQpGOrdJ20kdUI816PoUISIVTrb2jXJbiYVsJ1PVXYKoSOBr4Zdk2KJLLB
|
||||
L69QCJLf3ERaV4t7lknpSVqyglSPnuQf42FmdXwsu4w4BoD+p2oKsqWaNVIWjCwH
|
||||
kBXCVxhs0lqpce8X60tQ3fo66QQ0UyznEg0wOYFxDqnMo2DF2YMTMW+GQ5W1gHEr
|
||||
+Ehtz4lV/PMlUaTc0bIPz05+b18WWNSZl7squblpJHvjsEjb01W20EZGIiXFwNpJ
|
||||
LepB3Pnvalhmyuq8lB7ISZH5C1dSUzxIr863I8kjVS74GFsi0sKF4mjpcwARAQAB
|
||||
zRxFbGkgWmFyZXRza2lpIDxlbGl6QGdudS5vcmc+wsGOBBMBCgA4FiEEF+kNUhZy
|
||||
wEYxsRg+542uDzEV4GsFAmIorlcCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA
|
||||
CgkQ542uDzEV4GvMPQ//XJOVwvXE0AWHt6XHBQa5vgpZlabRuQQ9C5Di/eC8zs2X
|
||||
TCvkUzGsuDwW0H/Ne+nFp8m97Ykd4Z/02HPf4YVFyF4EEM4q7ThSxbpVsagZ8YJl
|
||||
VckZauLxFE36M/Ask1WwJalMNLudPULJXKe8h7JciHPnO6axCzXkWrR7jr199rSo
|
||||
VdKwuvPcEe9Iu9nophxkaUO2Bls7UFDmA4SkGfeu9L2XJbaxkVooCRf7oazWrUaj
|
||||
ts3X7bQZDeiOvjJQsLUOQDb6b99Y9XFV0rpj2hIlIla0owmPw96kWaF7/m18Hqyt
|
||||
RcHBcscOrR1lZfG/mu+bd+kBccFF58d9XJiyzF8qNp5drXh0CvVSRPwtyXD19jF2
|
||||
mkPLR+sqYPcUavZJN+Zlx6OuhF6b969IRuo04QP82Z6uzoG6XUQdtvSvQuaumwiX
|
||||
QX4V8ZwLgDpjtGWK8s/fSBDOyedPDhLzjQ2Iz2uzWHPFSzisVuD0FBFLv/MzylGo
|
||||
XvkroFcM+o1phc9QELnfQie3mCDHmIxnDJvEKgdAVagN44DlD3/5NtVq0TbZDy+I
|
||||
qTBtX13eBrJ6f/31Mzvlw9C6orbFT9t8hlwg4kqLYCGKEYwW9LIKOcwrWiW5L+cI
|
||||
VoTQaqVvk7++9Qv4Hz/JfWsI7vsuXfrh6fo+oI0x1OhCjRLgmsrFyYiM8bS09ODO
|
||||
wU0EYiiuVwEQANRJHvhVcTBssEJiJW1RK/FrlS8SBrwQczM3UxBbnNsD4PjYQvEA
|
||||
oF9r6qTB5+rWuIYLqsIIdRMrbxsDXyrRI3rGhXAjZMNSuvt4ShmUzHMWXT5S2/xJ
|
||||
TvPVs4WSlUc6Z/His31JpM6Pw5vEg2KklcvYfCuO2CM6xjgS+uyNT7MnVYOZEkil
|
||||
GdjpEqoQ5SqE6iXlvcTujTrNt1cotpi5SKFT+eSV4QXbIpvIJvIpzDtT3SOTN4JD
|
||||
6dcrbYHiYOnBBcbYL/rPDObwCUlK01ed+UkiZU24ByJdpLRhBHeH0wS1OIhdeWEJ
|
||||
Iqae4JQ3L76ZBGorjQOlLy/KCKAifwi4pyjssnvcyYrRFwamRl4DVjNsbydzr+Em
|
||||
SSmxiLaBron9q8PYTaTBzDdSgHNEaJxTsYW0oxCf3iSAOtTNq99CJwd/xTQd+9Ou
|
||||
JAnyA9Km5zL8idFk9BaFpGGXf+kOB7Wd66E2ThdBuz7GiVd+2B9n70cOuMCrt58M
|
||||
lsD/yRVfABSspfIWd2yjOp4qvjX/xiv41s89l0bi6mmozauWkQIA+zaEdpUIA82m
|
||||
nhsTdgvRBxvubJbTDjXT7R26hk2bm7bQQWe4HZYfSTh1RvAokg4/ZoFu1EKWreuw
|
||||
uSzuJCW/KKyvfiabjNQE1n7z+Pqfnfke9xhSRZx3QHJlu6peAMAODJo5ABEBAAHC
|
||||
wXYEGAEKACAWIQQX6Q1SFnLARjGxGD7nja4PMRXgawUCYiiuVwIbDAAKCRDnja4P
|
||||
MRXga1AWD/0Z8yTCJR5oES4m+Yrarn7g6xIYaf2t94J+1qBXHdK5zpSXjt122+ys
|
||||
5bNGFS/R2qB1CxxjJURze9g1nv8n9Rh1xWxd7j0/oFAziluGeybkSJ4iReb1qfIF
|
||||
bn1HvLiD4Cz1RjGDaIScZiuLg1qXjXUcOr90EQ5O8hAnLAeb8kR8d5PeMDfPVfP2
|
||||
2pRM5Hwy3pxeK7zSidrYBSH8PcRuJogS3p3GnNxQoolEtf6qQoDm09Mqi83fvXHE
|
||||
kLh2accy3HuqTekRxL19/IS2lIRmI5CO9Z8gwOVJrJ+YQklqR0VEpgzGcZD85Haw
|
||||
BrmrKV8Eap62Pm8UPwFnOevJ6dj5nhFMc04gHeOjhUsQR7fKNspaYt1O6DiGXhf6
|
||||
yyeEyZu+38hpqqKJ8rMHF64ltbzwOyTiADgR9n8r6wIFBhIyVShhuKgeNpaTJaJ5
|
||||
kNuc3kYwPV8bliblKiYdkN/dSWEn8TDW5cAhKyxyRho0XoZoDO54/sfApSEHM/S1
|
||||
43PMSZp+0WpV/znm87mv68DhzMBby45MaIfcPFszbvtTyLDK/vcQKenTQIG/CFZ3
|
||||
cIrRlfOjtQf2abs/xxfQXknl38jD6IXG3g/kN9XVLRXVYPK58nNnjaU0b2Cb1gy8
|
||||
keZsV/4wEN1Mipv0SFLcd5zNzirfAlJMecPv8cCNHDkA8IOR7zp/VQ==
|
||||
=+3ql
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
@ -1,7 +0,0 @@
|
||||
;; Use php-mode for .php,.php3,.php4 and .phtml files
|
||||
|
||||
(autoload 'php-mode "php-mode" "Major mode for editing PHP code." t)
|
||||
|
||||
(add-to-list 'auto-mode-alist
|
||||
'("\\.php[34]\\'\\|\\.php\\'\\|\\.phtml\\'" . php-mode))
|
||||
|
1121
php-mode.el
1121
php-mode.el
File diff suppressed because it is too large
Load Diff
@ -1,5 +0,0 @@
|
||||
;; rpm-spec-mode for spec files
|
||||
|
||||
(autoload 'rpm-spec-mode "rpm-spec-mode" "RPM spec mode." t)
|
||||
(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
|
||||
(setq-default rpm-change-log-uses-utc t)
|
@ -1,31 +0,0 @@
|
||||
--- rpm-spec-mode.el~ 2009-06-11 11:01:53.000000000 +0200
|
||||
+++ rpm-spec-mode.el 2009-06-11 11:05:24.000000000 +0200
|
||||
@@ -708,6 +708,17 @@
|
||||
|
||||
;;------------------------------------------------------------
|
||||
|
||||
+(defvar rpm-change-log-uses-utc nil
|
||||
+ "*If non-nil, \\[rpm-add-change-log-entry] will use Universal time (UTC).
|
||||
+If this is nil, it uses local time as returned by `current-time'.
|
||||
+
|
||||
+This variable is global by default, but you can make it buffer-local.")
|
||||
+
|
||||
+(defsubst rpm-change-log-date-string ()
|
||||
+ "Return the date string for today, inserted by \\[rpm-add-change-log-entry].
|
||||
+If `rpm-change-log-uses-utc' is nil, \"today\" means the local time zone."
|
||||
+ (format-time-string "%a %b %e %Y" nil rpm-change-log-uses-utc))
|
||||
+
|
||||
(defun rpm-add-change-log-entry (&optional change-log-entry)
|
||||
"Find change log and add an entry for today."
|
||||
(interactive "sChange log entry: ")
|
||||
@@ -715,8 +726,8 @@
|
||||
(rpm-goto-section "changelog")
|
||||
(let* ((address (rpm-spec-user-mail-address))
|
||||
(fullname (or rpm-spec-user-full-name (user-full-name)))
|
||||
- (string (concat "* " (substring (current-time-string) 0 11)
|
||||
- (substring (current-time-string) -4) " "
|
||||
+ (system-time-locale "C")
|
||||
+ (string (concat "* " (rpm-change-log-date-string) " "
|
||||
fullname " <" address ">"
|
||||
(and rpm-spec-insert-changelog-version
|
||||
(concat " - " (rpm-find-spec-version t))))))
|
1413
rpm-spec-mode.el
1413
rpm-spec-mode.el
File diff suppressed because it is too large
Load Diff
@ -1,91 +0,0 @@
|
||||
--- rpm-spec-mode.el~ 2008-04-22 15:14:40.000000000 -0400
|
||||
+++ rpm-spec-mode.el 2008-04-22 16:19:09.000000000 -0400
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
-(defconst rpm-spec-mode-version "0.12.3x" "Version of `rpm-spec-mode'.")
|
||||
+(require 'compile)
|
||||
+
|
||||
+(defconst rpm-spec-mode-version "0.12.3x.rh1" "Version of `rpm-spec-mode'.")
|
||||
|
||||
(defgroup rpm-spec nil
|
||||
"RPM spec mode with Emacs/XEmacs enhancements."
|
||||
@@ -189,11 +191,6 @@
|
||||
:type 'boolean
|
||||
:group 'rpm-spec)
|
||||
|
||||
-(defcustom rpm-spec-use-compilation-mode t
|
||||
- "*If non-nil, build in `compilation-mode' if it's available."
|
||||
- :type 'boolean
|
||||
- :group 'rpm-spec)
|
||||
-
|
||||
(defcustom rpm-spec-default-release "1"
|
||||
"*Default value for the Release tag in new spec files."
|
||||
:type 'string
|
||||
@@ -225,6 +222,11 @@
|
||||
:type 'string
|
||||
:group 'rpm-spec)
|
||||
|
||||
+(defcustom rpm-spec-auto-topdir nil
|
||||
+ "*Automatically detect an rpm build directory tree and define _topdir."
|
||||
+ :type 'boolean
|
||||
+ :group 'rpm-spec)
|
||||
+
|
||||
(defgroup rpm-spec-faces nil
|
||||
"Font lock faces for `rpm-spec-mode'."
|
||||
:prefix "rpm-spec-"
|
||||
@@ -1025,20 +1027,30 @@
|
||||
(setq buildoptions (cons "--nodeps" buildoptions)))
|
||||
(if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
(setq buildoptions (cons "--sign" buildoptions)))
|
||||
- (save-excursion
|
||||
- (set-buffer (get-buffer rpm-buffer-name))
|
||||
- (and rpm-spec-use-compilation-mode
|
||||
- (fboundp 'compilation-mode)
|
||||
- (compilation-mode))
|
||||
- (goto-char (point-max)))
|
||||
- (let* ((process-environment (cons "EMACS=t" process-environment))
|
||||
- (process
|
||||
- (apply 'start-process rpm-spec-build-command rpm-buffer-name
|
||||
- rpm-spec-build-command buildoptions)))
|
||||
- (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
- (let ((rpm-passwd-cache (read-passwd "GPG passphrase: ")))
|
||||
- (process-send-string process (concat rpm-passwd-cache "\n"))))
|
||||
- (set-process-filter process 'rpm-command-filter)))
|
||||
+
|
||||
+ (if rpm-spec-auto-topdir
|
||||
+ (if (string-match ".*/SPECS/$" default-directory)
|
||||
+ (let ((topdir (expand-file-name default-directory)))
|
||||
+ (setq buildoptions
|
||||
+ (cons
|
||||
+ (concat "--define \"_topdir "
|
||||
+ (replace-regexp-in-string "/SPECS/$" "" topdir)
|
||||
+ "\"")
|
||||
+ buildoptions)))))
|
||||
+
|
||||
+ (progn
|
||||
+ (defun list->string (lst)
|
||||
+ (if (cdr lst)
|
||||
+ (concat (car lst) " " (list->string (cdr lst)))
|
||||
+ (car lst)))
|
||||
+ (compilation-start (list->string (cons rpm-spec-build-command buildoptions)) 'rpmbuild-mode))
|
||||
+
|
||||
+ (if (and rpm-spec-sign-gpg (not rpm-no-gpg))
|
||||
+ (let ((build-proc (get-buffer-process
|
||||
+ (get-buffer
|
||||
+ (compilation-buffer-name "rpmbuild" nil nil))))
|
||||
+ (rpm-passwd-cache (read-passwd "GPG passphrase: ")))
|
||||
+ (process-send-string build-proc (concat rpm-passwd-cache "\n")))))
|
||||
|
||||
(defun rpm-build-prepare (&optional arg)
|
||||
"Run a `rpmbuild -bp'."
|
||||
@@ -1409,5 +1421,8 @@
|
||||
;;;###autoload(add-to-list 'auto-mode-alist '("\\.spec\\(\\.in\\)?$" . rpm-spec-mode))
|
||||
|
||||
(provide 'rpm-spec-mode)
|
||||
+;;;###autoload
|
||||
+(define-compilation-mode rpmbuild-mode "RPM build" ""
|
||||
+ (set (make-local-variable 'compilation-disable-input) t))
|
||||
|
||||
;;; rpm-spec-mode.el ends here
|
3
sources
3
sources
@ -1 +1,2 @@
|
||||
a673c163b4714362b94ff6096e4d784a emacs-23.3.tar.bz2
|
||||
SHA512 (emacs-28.1.tar.xz) = c146ff7086aba49fa6c18adf4e485a59eb4c6525fddb9d385034446830b8bb0ac9e6fb76e7b6d94a9fddc41643415f36acad57a1ae16a841c97f61bc211459d9
|
||||
SHA512 (emacs-28.1.tar.xz.sig) = cc905fb3d75c2f03c491fb1e0edd883312147d65125a667dcf77e6a078a6381f0674e321feba24a205d819275b6f31282a54910b3fc1c1284421a0fd35a2882a
|
||||
|
201
ssl.el
201
ssl.el
@ -1,201 +0,0 @@
|
||||
;;; ssl.el,v --- ssl functions for emacsen without them builtin
|
||||
;; Author: wmperry
|
||||
;; Created: 1999/10/14 12:44:18
|
||||
;; Version: 1.2
|
||||
;; Keywords: comm
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Copyright (c) 1995, 1996 by William M. Perry <wmperry@cs.indiana.edu>
|
||||
;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
|
||||
;;;
|
||||
;;; This file is part of GNU Emacs.
|
||||
;;;
|
||||
;;; GNU Emacs is free software; you can redistribute it and/or modify
|
||||
;;; it under the terms of the GNU General Public License as published by
|
||||
;;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;;; any later version.
|
||||
;;;
|
||||
;;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with GNU Emacs; see the file COPYING. If not, write to the
|
||||
;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
;;; Boston, MA 02111-1307, USA.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(require 'cl)
|
||||
(require 'base64)
|
||||
|
||||
(eval-and-compile
|
||||
(condition-case ()
|
||||
(require 'custom)
|
||||
(error nil))
|
||||
(if (and (featurep 'custom) (fboundp 'custom-declare-variable))
|
||||
nil ;; We've got what we needed
|
||||
;; We have the old custom-library, hack around it!
|
||||
(defmacro defgroup (&rest args)
|
||||
nil)
|
||||
(defmacro defcustom (var value doc &rest args)
|
||||
(` (defvar (, var) (, value) (, doc))))))
|
||||
|
||||
(defgroup ssl nil
|
||||
"Support for `Secure Sockets Layer' encryption."
|
||||
:group 'comm)
|
||||
|
||||
(defcustom ssl-certificate-directory "~/.w3/certs/"
|
||||
"*Directory to store CA certificates in"
|
||||
:group 'ssl
|
||||
:type 'directory)
|
||||
|
||||
(defcustom ssl-rehash-program-name "c_rehash"
|
||||
"*Program to run after adding a cert to a directory .
|
||||
Run with one argument, the directory name."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-view-certificate-program-name "x509"
|
||||
"*The program to run to provide a human-readable view of a certificate."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-view-certificate-program-arguments '("-text" "-inform" "DER")
|
||||
"*Arguments that should be passed to the certificate viewing program.
|
||||
The certificate is piped to it.
|
||||
Maybe a way of passing a file should be implemented"
|
||||
:group 'ssl
|
||||
:type 'list)
|
||||
|
||||
(defcustom ssl-certificate-directory-style 'ssleay
|
||||
"*Style of cert database to use, the only valid value right now is `ssleay'.
|
||||
This means a directory of pem encoded certificates with hash symlinks."
|
||||
:group 'ssl
|
||||
:type '(choice (const :tag "SSLeay" :value ssleay)
|
||||
(const :tag "OpenSSL" :value openssl)))
|
||||
|
||||
(defcustom ssl-certificate-verification-policy 0
|
||||
"*How far up the certificate chain we should verify."
|
||||
:group 'ssl
|
||||
:type '(choice (const :tag "No verification" :value 0)
|
||||
(const :tag "Verification required" :value 1)
|
||||
(const :tag "Reject connection if verification fails" :value 3)
|
||||
(const :tag "SSL_VERIFY_CLIENT_ONCE" :value 5)))
|
||||
|
||||
(defcustom ssl-program-name "openssl"
|
||||
"*The program to run in a subprocess to open an SSL connection."
|
||||
:group 'ssl
|
||||
:type 'string)
|
||||
|
||||
(defcustom ssl-program-arguments
|
||||
'("s_client"
|
||||
"-quiet"
|
||||
"-host" host
|
||||
"-port" service
|
||||
"-verify" (int-to-string ssl-certificate-verification-policy)
|
||||
"-CApath" ssl-certificate-directory
|
||||
)
|
||||
"*Arguments that should be passed to the program `ssl-program-name'.
|
||||
This should be used if your SSL program needs command line switches to
|
||||
specify any behaviour (certificate file locations, etc).
|
||||
The special symbols 'host and 'port may be used in the list of arguments
|
||||
and will be replaced with the hostname and service/port that will be connected
|
||||
to."
|
||||
:group 'ssl
|
||||
:type 'list)
|
||||
|
||||
(defun ssl-certificate-information (der)
|
||||
"Return an assoc list of information about a certificate in DER format."
|
||||
(let ((certificate (concat "-----BEGIN CERTIFICATE-----\n"
|
||||
(base64-encode-string der)
|
||||
"\n-----END CERTIFICATE-----\n"))
|
||||
(exit-code 0))
|
||||
(save-excursion
|
||||
(set-buffer (get-buffer-create " *openssl*"))
|
||||
(erase-buffer)
|
||||
(insert certificate)
|
||||
(setq exit-code (condition-case ()
|
||||
(call-process-region (point-min) (point-max)
|
||||
ssl-program-name
|
||||
t (list (current-buffer) nil) t
|
||||
"x509"
|
||||
"-subject" ; Print the subject DN
|
||||
"-issuer" ; Print the issuer DN
|
||||
"-dates" ; Both before and after dates
|
||||
"-serial" ; print out serial number
|
||||
"-noout" ; Don't spit out the certificate
|
||||
)
|
||||
(error -1)))
|
||||
(if (/= exit-code 0)
|
||||
nil
|
||||
(let ((vals nil))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^\\([^=\n\r]+\\)\\s *=\\s *\\(.*\\)" nil t)
|
||||
(push (cons (match-string 1) (match-string 2)) vals))
|
||||
vals)))))
|
||||
|
||||
(defun ssl-accept-ca-certificate ()
|
||||
"Ask if the user is willing to accept a new CA certificate. The buffer-name
|
||||
should be the intended name of the certificate, and the buffer should probably
|
||||
be in DER encoding"
|
||||
;; TODO, check if it is really new or if we already know it
|
||||
(let* ((process-connection-type nil)
|
||||
(tmpbuf (generate-new-buffer "X509 CA Certificate Information"))
|
||||
(response (save-excursion
|
||||
(and (eq 0
|
||||
(apply 'call-process-region
|
||||
(point-min) (point-max)
|
||||
ssl-view-certificate-program-name
|
||||
nil tmpbuf t
|
||||
ssl-view-certificate-program-arguments))
|
||||
(switch-to-buffer tmpbuf)
|
||||
(goto-char (point-min))
|
||||
(or (recenter) t)
|
||||
(yes-or-no-p
|
||||
"Accept this CA to vouch for secure server identities? ")
|
||||
(kill-buffer tmpbuf)))))
|
||||
(if (not response)
|
||||
nil
|
||||
(if (not (file-directory-p ssl-certificate-directory))
|
||||
(make-directory ssl-certificate-directory))
|
||||
(case ssl-certificate-directory-style
|
||||
(ssleay
|
||||
(base64-encode-region (point-min) (point-max))
|
||||
(goto-char (point-min))
|
||||
(insert "-----BEGIN CERTIFICATE-----\n")
|
||||
(goto-char (point-max))
|
||||
(insert "-----END CERTIFICATE-----\n")
|
||||
(let ((f (expand-file-name
|
||||
(concat (file-name-sans-extension (buffer-name)) ".pem")
|
||||
ssl-certificate-directory)))
|
||||
(write-file f)
|
||||
(call-process ssl-rehash-program-name
|
||||
nil nil nil
|
||||
(expand-file-name ssl-certificate-directory))))))))
|
||||
|
||||
(defun open-ssl-stream (name buffer host service)
|
||||
"Open a SSL connection for a service to a host.
|
||||
Returns a subprocess-object to represent the connection.
|
||||
Input and output work as for subprocesses; `delete-process' closes it.
|
||||
Args are NAME BUFFER HOST SERVICE.
|
||||
NAME is name for process. It is modified if necessary to make it unique.
|
||||
BUFFER is the buffer (or buffer-name) to associate with the process.
|
||||
Process output goes at end of that buffer, unless you specify
|
||||
an output stream or filter function to handle the output.
|
||||
BUFFER may be also nil, meaning that this process is not associated
|
||||
with any buffer
|
||||
Third arg is name of the host to connect to, or its IP address.
|
||||
Fourth arg SERVICE is name of the service desired, or an integer
|
||||
specifying a port number to connect to."
|
||||
(if (integerp service) (setq service (int-to-string service)))
|
||||
(let* ((process-connection-type nil)
|
||||
(port service)
|
||||
(proc (eval
|
||||
(`
|
||||
(start-process name buffer ssl-program-name
|
||||
(,@ ssl-program-arguments))))))
|
||||
(process-kill-without-query proc)
|
||||
proc))
|
||||
|
||||
(provide 'ssl)
|
Loading…
Reference in New Issue
Block a user