-2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
+2011-07-09 Paul Eggert <eggert@cs.ucla.edu>
Assume freestanding C89 headers, string.h, stdlib.h.
Again, this simplifies the code, and all current platforms have these.
(AC_CHECK_FUNCS): No need to check for strchr, strrchr.
(strchr, strrchr): Remove fallback macros.
-2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
-
Assume support for memcmp, memcpy, memmove, memset.
This simplifies the code a bit. All current platforms have these,
as they are required for C89. If this turns into a problem we
can add the gnulib modules for these (a 1-line change to Makefile.in).
* configure.in: Don't check for memcmp, memcpy, memmove, memset.
+2011-07-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ Add gnulib's strtoimax module, needed on Solaris 8.
+ * Makefile.in (GNULIB_MODULES): Add strtoimax.
+ * lib/strtoll.c, m4/strtoimax.m4, m4/strtoll.m4: New files,
+ automatically imported from gnulib.
+ * lib/gnulib.mk, m4/gl-comp.m4: Regenerate.
+
+2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ Add gnulib support for pthread_sigmask (Bug#9010).
+ * Makefile.in (GNULIB_MODULES): Add pthread_sigmask.
+ * configure.in (AC_TYPE_UID_T): New dummy macro.
+ Configure gnulib after adjusting LIBS,
+ so that gnulib can assume the libraries in LIBS.
+ * lib/signal.in.h, m4/pthread_sigmask.m4, m4/signal_h.m4:
+ * lib/pthread_sigprocmask.c, lib/sigprocmask.c, m4/signalblocking.m4:
+ * lib/pthread_sigmask.c:
+ New files, automatically imported from gnulib.
+ * lib/gnulib.mk, m4/gl-comp.m4: Automatically-imported update
+ due to the above changes.
+ * .bzrignore: Add lib/signal.h.
+
+ * lib/getopt.c, lib/unistd.in.h, m4/getopt.m4: Merge from gnulib.
+
+2011-07-07 Andreas Schwab <schwab@linux-m68k.org>
+
+ * configure.in (maintainer-mode): Reflect default in help string.
+
+2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * configure.in: Remove reference to iris4d.h.
+
2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
* configure.in (HAVE_GCONF): Allow both HAVE_GCONF and HAVE_GSETTINGS.
alloca-opt \
careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
dup2 \
- filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink \
- socklen stdarg stdio strftime strtoumax symlink sys_stat
+ filemode getloadavg getopt-gnu ignore-value intprops lstat \
+ mktime pthread_sigmask readlink \
+ socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
GNULIB_TOOL_FLAGS = \
--conditional-dependencies --import --no-changelog --no-vc-files \
--makefile-name=gnulib.mk
+2011-07-07 Juanma Barranquero <lekktu@gmail.com>
+
+ * unidata/makefile.w32-in (charprop-SH, charprop-CMD):
+ Duplicate change in Makefile.in (2011-07-06T22:43:48Z!handa@m17n.org).
+
+2011-07-06 Kenichi Handa <handa@m17n.org>
+
+ * unidata/unidata-gen.el (unidata-dir): New variable.
+ (unidata-setup-list): Expand unidata-text-file in unidata-dir.
+ (unidata-prop-alist): INDEX element may be a function. New
+ optional element VAL-LIST (for general-category and bidi-class).
+ New entry `mirroring'.
+ (unidata-prop-default, unidata-prop-val-list): New subst.
+ (unidata-get-character, unidata-put-character): Delete them.
+ (unidata-gen-table-character): New arg IGNORE. Adjusted for the
+ above changes.
+ (unidata-get-symbol, unidata-get-integer, unidata-get-numeric)
+ (unidata-put-symbol, unidata-put-integer, unidata-put-numeric):
+ Delete them.
+ (unidata-encode-val): Assume that the first element of VAL-LIST is
+ a cons (nil . 0).
+ (unidata-gen-table): Change argument DEFAULT-VALUE to VAL-LIST.
+ Always store the encoded value.
+ (unidata-gen-table-symbol): New args DEFAULT-VALUE and VAL-LIST.
+ Set the 1st and the 2nd extra slots to index numbers for C
+ functions.
+ (unidata-gen-table-integer): Likewise.
+ (unidata-gen-table-numeric): Likewise.
+ (unidata-gen-table-name): New arg IGNORE.
+ (unidata-gen-table-decomposition): Likewise.
+ (unidata-describe-general-category): Add the case nil to the
+ description alist.
+ (unidata-gen-mirroring-list): New function.
+ (unidata-gen-files): New arg DATA-DIR. Adjusted for the change of
+ unidata-prop-alist. Handle the case of storing multiple
+ char-tables in a file.
+
+ * unidata/Makefile.in (${DSTDIR}/charprop.el): New arg to
+ unidata-gen-files.
+
2011-05-21 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-resolve): Suppress prompts about file-locals.
* unidata/BidiMirroring.txt: New file from
http://www.unicode.org/Public/6.0.0/ucd/BidiMirroring-6.0.0d1.txt.
- * unidata/Makefile.in: (../../src/bidimirror.h): New target.
+ * unidata/Makefile.in (../../src/bidimirror.h): New target.
(all): Depend on ../../src/biditype.h and ../../src/bidimirror.h.
* unidata/makefile.w32-in (../../src/bidimirror.h): New target.
* quick-install-emacs: Use more portable shell syntax.
- * quick-install-emacs: (AVOID): Be more picky about files we avoid
+ * quick-install-emacs (AVOID): Be more picky about files we avoid
installing.
2010-02-14 Juanma Barranquero <lekktu@gmail.com>
${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt
ELC=`/bin/pwd`/unidata-gen.elc; \
- DATA=`/bin/pwd`/unidata.txt; \
+ DATADIR=`/bin/pwd`; \
+ DATA=unidata.txt; \
cd ${DSTDIR}; \
- ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATA}
+ ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
../../src/biditype.h: UnicodeData.txt
gawk -F";" -f biditype.awk $< > $@
charprop-SH: unidata-gen.elc unidata.txt
ELC=$(CURDIR)/unidata-gen.elc; \
- DATA=$(CURDIR)/unidata.txt; \
+ DATADIR=$(CURDIR); \
+ DATA=unidata.txt; \
cd $(DSTDIR); \
- $(RUNEMACS) --load $${ELC} -f unidata-gen-files $${DATA}
+ $(RUNEMACS) --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA}
charprop-CMD: unidata-gen.elc unidata.txt
- $(RUNEMACS) --eval $(ARGQUOTE)(cd $(DQUOTE)$(DSTDIR)$(DQUOTE))$(ARGQUOTE) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR)/unidata.txt
+ $(RUNEMACS) --eval $(ARGQUOTE)(cd $(DQUOTE)$(DSTDIR)$(DQUOTE))$(ARGQUOTE) --load $(CURDIR)/unidata-gen.elc -f unidata-gen-files $(CURDIR) unidata.txt
${DSTDIR}/charprop.el: charprop-$(SHELLTYPE)
;;
;; charprop.el
;; It contains a series of forms of this format:
-;; (char-code-property-register PROP FILE)
+;; (define-char-code-property PROP FILE)
;; where PROP is a symbol representing a character property
-;; (name, generic-category, etc), and FILE is a name of one of
+;; (name, general-category, etc), and FILE is a name of one of
;; the following files.
;;
;; uni-name.el, uni-category.el, uni-combining.el, uni-bidi.el,
;; uni-decomposition.el, uni-decimal.el, uni-digit.el, uni-numeric.el,
;; uni-mirrored.el, uni-old-name.el, uni-comment.el, uni-uppercase.el,
;; uni-lowercase.el, uni-titlecase.el
-;; They each contain a single form of this format:
-;; (char-code-property-register PROP CHAR-TABLE)
+;; They contain one or more forms of this format:
+;; (define-char-code-property PROP CHAR-TABLE)
;; where PROP is the same as above, and CHAR-TABLE is a
;; char-table containing property values in a compressed format.
;;
;; When they are installed in .../lisp/international/, the file
;; "charprop.el" is preloaded in loadup.el. The other files are
-;; automatically loaded when the functions `get-char-code-property'
-;; and `put-char-code-property' are called.
+;; automatically loaded when the Lisp functions
+;; `get-char-code-property' and `put-char-code-property', and C
+;; function uniprop_table are called.
;;
;; FORMAT OF A CHAR TABLE
;;
;; data in a char-table as below.
;;
;; If succeeding 128*N characters have the same property value, we
-;; store that value for them. Otherwise, compress values for
-;; succeeding 128 characters into a single string and store it as a
-;; value for those characters. The way of compression depends on a
-;; property. See the section "SIMPLE TABLE", "RUN-LENGTH TABLE",
-;; and "WORD-LIST TABLE".
-
-;; The char table has four extra slots:
+;; store that value (or the encoded one) for them. Otherwise,
+;; compress values (or the encoded ones) for succeeding 128
+;; characters into a single string and store it for those
+;; characters. The way of compression depends on a property. See
+;; the section "SIMPLE TABLE", "RUN-LENGTH TABLE", and "WORD-LIST
+;; TABLE".
+
+;; The char table has five extra slots:
;; 1st: property symbol
-;; 2nd: function to call to get a property value
-;; 3nd: function to call to put a property value
-;; 4th: function to call to get a description of a property value
+;; 2nd: function to call to get a property value,
+;; or an index number of C function to decode the value,
+;; or nil if the value can be directly got from the table.
+;; 3nd: function to call to put a property value,
+;; or an index number of C function to encode the value,
+;; or nil if the value can be directly stored in the table.
+;; 4th: function to call to get a description of a property value, or nil
;; 5th: data referred by the above functions
;; List of elements of this form:
(defvar unidata-list nil)
+;; Name of the directory containing files of Unicode Character
+;; Database.
+
+(defvar unidata-dir nil)
+
(defun unidata-setup-list (unidata-text-file)
(let* ((table (list nil))
(tail table)
("^<.*Surrogate" . nil)
("^<.*Private Use" . PRIVATE\ USE)))
val char name)
+ (setq unidata-text-file (expand-file-name unidata-text-file unidata-dir))
(or (file-readable-p unidata-text-file)
(error "File not readable: %s" unidata-text-file))
(with-temp-buffer
(setq unidata-list (cdr table))))
;; Alist of this form:
-;; (PROP INDEX GENERATOR FILENAME)
+;; (PROP INDEX GENERATOR FILENAME DOCSTRING DESCRIBER VAL-LIST)
;; PROP: character property
-;; INDEX: index to each element of unidata-list for PROP
+;; INDEX: index to each element of unidata-list for PROP.
+;; It may be a function that generates an alist of character codes
+;; vs. the corresponding property values.
;; GENERATOR: function to generate a char-table
;; FILENAME: filename to store the char-table
+;; DOCSTRING: docstring for the property
;; DESCRIBER: function to call to get a description string of property value
+;; DEFAULT: the default value of the property
+;; VAL-LIST: list of specially ordered property values
(defconst unidata-prop-alist
'((name
Property value is one of the following symbols:
Lu, Ll, Lt, Lm, Lo, Mn, Mc, Me, Nd, Nl, No, Pc, Pd, Ps, Pe, Pi, Pf, Po,
Sm, Sc, Sk, So, Zs, Zl, Zp, Cc, Cf, Cs, Co, Cn"
- unidata-describe-general-category)
+ unidata-describe-general-category
+ nil
+ ;; The order of elements must be in sync with unicode_category_t
+ ;; in src/character.h.
+ (Lu Ll Lt Lm Lo Mn Mc Me Nd Nl No Pc Pd Ps Pe Pi Pf Po
+ Sm Sc Sk So Zs Zl Zp Cc Cf Cs Co Cn))
(canonical-combining-class
3 unidata-gen-table-integer "uni-combining.el"
"Unicode canonical combining class.
Property value is one of the following symbols:
L, LRE, LRO, R, AL, RLE, RLO, PDF, EN, ES, ET,
AN, CS, NSM, BN, B, S, WS, ON"
- unidata-describe-bidi-class)
+ unidata-describe-bidi-class
+ L
+ ;; The order of elements must be in sync with bidi_type_t in
+ ;; src/dispextern.h.
+ (L R EN AN BN B AL LRE LRO RLE RLO PDF ES ET CS NSM S WS ON))
(decomposition
5 unidata-gen-table-decomposition "uni-decomposition.el"
"Unicode decomposition mapping.
(mirrored
9 unidata-gen-table-symbol "uni-mirrored.el"
"Unicode bidi mirrored flag.
-Property value is a symbol `Y' or `N'.")
+Property value is a symbol `Y' or `N'. See also the property `mirroring'.")
(old-name
10 unidata-gen-table-name "uni-old-name.el"
"Unicode old names as published in Unicode 1.0.
14 unidata-gen-table-character "uni-titlecase.el"
"Unicode simple titlecase mapping.
Property value is a character."
- string)))
+ string)
+ (mirroring
+ unidata-gen-mirroring-list unidata-gen-table-character "uni-mirrored.el"
+ "Unicode bidi-mirroring characters.
+Property value is a character that has the corresponding mirroring image,
+or nil for non-mirrored character.")))
;; Functions to access the above data.
(defsubst unidata-prop-index (prop) (nth 1 (assq prop unidata-prop-alist)))
(defsubst unidata-prop-file (prop) (nth 3 (assq prop unidata-prop-alist)))
(defsubst unidata-prop-docstring (prop) (nth 4 (assq prop unidata-prop-alist)))
(defsubst unidata-prop-describer (prop) (nth 5 (assq prop unidata-prop-alist)))
+(defsubst unidata-prop-default (prop) (nth 6 (assq prop unidata-prop-alist)))
+(defsubst unidata-prop-val-list (prop) (nth 7 (assq prop unidata-prop-alist)))
\f
;; SIMPLE TABLE
;; values of succeeding character codes are usually different, we use
;; a char-table described here to store such values.
;;
-;; If succeeding 128 characters has no property, a char-table has the
-;; symbol t for them. Otherwise a char-table has a string of the
-;; following format for them.
+;; A char-table divides character code space (#x0..#x3FFFFF) into
+;; #x8000 blocks (each block contains 128 characters).
+
+;; If all characters of a block have no property, a char-table has the
+;; symbol nil for that block. Otherwise a char-table has a string of
+;; the following format for it.
;;
-;; The first character of the string is FIRST-INDEX.
-;; The Nth (N > 0) character of the string is a property value of the
-;; character (BLOCK-HEAD + FIRST-INDEX + N - 1), where BLOCK-HEAD is
-;; the first of the characters in the block.
+;; The first character of the string is ?\001.
+;; The second character of the string is FIRST-INDEX.
+;; The Nth (N > 1) character of the string is a property value of the
+;; character (BLOCK-HEAD + FIRST-INDEX + N - 2), where BLOCK-HEAD is
+;; the first character of the block.
;;
-;; The 4th extra slot of a char-table is nil.
-
-(defun unidata-get-character (char val table)
- (cond
- ((characterp val)
- val)
+;; This kind of char-table has these extra slots:
+;; 1st: the property symbol
+;; 2nd: nil
+;; 3rd: 0 (corresponding to uniprop_encode_character in chartab.c)
+;; 4th to 5th: nil
- ((stringp val)
- (let* ((len (length val))
- (block-head (lsh (lsh char -7) 7))
- (vec (make-vector 128 nil))
- (first-index (aref val 0)))
- (dotimes (i (1- len))
- (let ((elt (aref val (1+ i))))
- (if (> elt 0)
- (aset vec (+ first-index i) elt))))
- (dotimes (i 128)
- (aset table (+ block-head i) (aref vec i)))
- (aref vec (- char block-head))))))
-
-(defun unidata-put-character (char val table)
- (or (characterp val)
- (not val)
- (error "Not a character nor nil: %S" val))
- (let ((current-val (aref table char)))
- (unless (eq current-val val)
- (if (stringp current-val)
- (funcall (char-table-extra-slot table 1) char current-val table))
- (aset table char val))))
-
-(defun unidata-gen-table-character (prop)
+(defun unidata-gen-table-character (prop &rest ignore)
(let ((table (make-char-table 'char-code-property-table))
(prop-idx (unidata-prop-index prop))
(vec (make-vector 128 0))
(tail unidata-list)
elt range val idx slot)
- (set-char-table-range table (cons 0 (max-char)) t)
+ (if (functionp prop-idx)
+ (setq tail (funcall prop-idx)
+ prop-idx 1))
(while tail
(setq elt (car tail) tail (cdr tail))
(setq range (car elt)
(setq first-index last-index)))
(setq tail (cdr tail)))
(when first-index
- (let ((str (string first-index))
+ (let ((str (string 1 first-index))
c)
(while (<= first-index last-index)
(setq str (format "%s%c" str (or (aref vec first-index) 0))
(set-char-table-range table (cons start limit) str))))))
(set-char-table-extra-slot table 0 prop)
- (byte-compile 'unidata-get-character)
- (byte-compile 'unidata-put-character)
- (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-character))
- (set-char-table-extra-slot table 2 (symbol-function 'unidata-put-character))
-
+ (set-char-table-extra-slot table 2 0)
table))
\f
;; RUN-LENGTH TABLE
;;
-;; If the type of character property value is symbol, integer,
-;; boolean, or character, we use a char-table described here to store
-;; the values.
+;; If many characters of successive character codes have the same
+;; property value, we use a char-table described here to store the
+;; values.
;;
-;; The 4th extra slot is a vector of property values (VAL-TABLE), and
-;; values for succeeding 128 characters are encoded into this
-;; character sequence:
+;; At first, instead of a value itself, we store an index number to
+;; the VAL-TABLE (5th extra slot) in the table. We call that index
+;; number as VAL-CODE here after.
+;;
+;; A char-table divides character code space (#x0..#x3FFFFF) into
+;; #x8000 blocks (each block contains 128 characters).
+;;
+;; If all characters of a block have the same value, a char-table has
+;; VAL-CODE for that block. Otherwise a char-table has a string of
+;; the following format for that block.
+;;
+;; The first character of the string is ?\002.
+;; The following characters has this form:
;; ( VAL-CODE RUN-LENGTH ? ) +
;; where:
-;; VAL-CODE (0..127):
-;; (VAL-CODE - 1) is an index into VAL-TABLE.
-;; The value 0 means no-value.
+;; VAL-CODE (0..127): index into VAL-TABLE.
;; RUN-LENGTH (130..255):
;; (RUN-LENGTH - 128) specifies how many characters have the same
;; value. If omitted, it means 1.
-
-
-;; Return a symbol-type character property value of CHAR. VAL is the
-;; current value of (aref TABLE CHAR).
-
-(defun unidata-get-symbol (char val table)
- (let ((val-table (char-table-extra-slot table 4)))
- (cond ((symbolp val)
- val)
- ((stringp val)
- (let ((first-char (lsh (lsh char -7) 7))
- (str val)
- (len (length val))
- (idx 0)
- this-val count)
- (set-char-table-range table (cons first-char (+ first-char 127))
- nil)
- (while (< idx len)
- (setq val (aref str idx) idx (1+ idx)
- count (if (< idx len) (aref str idx) 1))
- (setq val (and (> val 0) (aref val-table (1- val)))
- count (if (< count 128)
- 1
- (prog1 (- count 128) (setq idx (1+ idx)))))
- (dotimes (i count)
- (if val
- (aset table first-char val))
- (if (= first-char char)
- (setq this-val val))
- (setq first-char (1+ first-char))))
- this-val))
- ((> val 0)
- (aref val-table (1- val))))))
-
-;; Return a integer-type character property value of CHAR. VAL is the
-;; current value of (aref TABLE CHAR).
-
-(defun unidata-get-integer (char val table)
- (let ((val-table (char-table-extra-slot table 4)))
- (cond ((integerp val)
- val)
- ((stringp val)
- (let ((first-char (lsh (lsh char -7) 7))
- (str val)
- (len (length val))
- (idx 0)
- this-val count)
- (while (< idx len)
- (setq val (aref str idx) idx (1+ idx)
- count (if (< idx len) (aref str idx) 1))
- (setq val (and (> val 0) (aref val-table (1- val)))
- count (if (< count 128)
- 1
- (prog1 (- count 128) (setq idx (1+ idx)))))
- (dotimes (i count)
- (aset table first-char val)
- (if (= first-char char)
- (setq this-val val))
- (setq first-char (1+ first-char))))
- this-val)))))
-
-;; Return a numeric-type (integer or float) character property value
-;; of CHAR. VAL is the current value of (aref TABLE CHAR).
-
-(defun unidata-get-numeric (char val table)
- (cond
- ((numberp val)
- val)
- ((stringp val)
- (let ((val-table (char-table-extra-slot table 4))
- (first-char (lsh (lsh char -7) 7))
- (str val)
- (len (length val))
- (idx 0)
- this-val count)
- (while (< idx len)
- (setq val (aref str idx) idx (1+ idx)
- count (if (< idx len) (aref str idx) 1))
- (setq val (and (> val 0) (aref val-table (1- val)))
- count (if (< count 128)
- 1
- (prog1 (- count 128) (setq idx (1+ idx)))))
- (dotimes (i count)
- (aset table first-char val)
- (if (= first-char char)
- (setq this-val val))
- (setq first-char (1+ first-char))))
- this-val))))
-
-;; Store VAL (symbol) as a character property value of CHAR in TABLE.
-
-(defun unidata-put-symbol (char val table)
- (or (symbolp val)
- (error "Not a symbol: %S" val))
- (let ((current-val (aref table char)))
- (unless (eq current-val val)
- (if (stringp current-val)
- (funcall (char-table-extra-slot table 1) char current-val table))
- (aset table char val))))
-
-;; Store VAL (integer) as a character property value of CHAR in TABLE.
-
-(defun unidata-put-integer (char val table)
- (or (integerp val)
- (not val)
- (error "Not an integer nor nil: %S" val))
- (let ((current-val (aref table char)))
- (unless (eq current-val val)
- (if (stringp current-val)
- (funcall (char-table-extra-slot table 1) char current-val table))
- (aset table char val))))
-
-;; Store VAL (integer or float) as a character property value of CHAR
-;; in TABLE.
-
-(defun unidata-put-numeric (char val table)
- (or (numberp val)
- (not val)
- (error "Not a number nor nil: %S" val))
- (let ((current-val (aref table char)))
- (unless (equal current-val val)
- (if (stringp current-val)
- (funcall (char-table-extra-slot table 1) char current-val table))
- (aset table char val))))
+;;
+;; This kind of char-table has these extra slots:
+;; 1st: the property symbol
+;; 2nd: 0 (corresponding to uniprop_decode_value in chartab.c)
+;; 3rd: 1..3 (corresponding to uniprop_encode_xxx in chartab.c)
+;; 4th: function or nil
+;; 5th: VAL-TABLE
;; Encode the character property value VAL into an integer value by
;; VAL-LIST. By side effect, VAL-LIST is modified.
;; VAL-LIST has this form:
-;; (t (VAL1 . VAL-CODE1) (VAL2 . VAL-CODE2) ...)
-;; If VAL is one of VALn, just return VAL-CODEn. Otherwise,
-;; VAL-LIST is modified to this:
-;; (t (VAL . (1+ VAL-CODE1)) (VAL1 . VAL-CODE1) (VAL2 . VAL-CODE2) ...)
+;; ((nil . 0) (VAL1 . 1) (VAL2 . 2) ...)
+;; If VAL is one of VALn, just return n.
+;; Otherwise, VAL-LIST is modified to this:
+;; ((nil . 0) (VAL1 . 1) (VAL2 . 2) ... (VAL . n+1))
(defun unidata-encode-val (val-list val)
(let ((slot (assoc val val-list))
val-code)
(if slot
(cdr slot)
- (setq val-code (if (cdr val-list) (1+ (cdr (nth 1 val-list))) 1))
- (setcdr val-list (cons (cons val val-code) (cdr val-list)))
+ (setq val-code (length val-list))
+ (nconc val-list (list (cons val val-code)))
val-code)))
;; Generate a char-table for the character property PROP.
-(defun unidata-gen-table (prop val-func default-value)
+(defun unidata-gen-table (prop val-func default-value val-list)
(let ((table (make-char-table 'char-code-property-table))
(prop-idx (unidata-prop-index prop))
- (val-list (list t))
(vec (make-vector 128 0))
tail elt range val val-code idx slot
prev-range-data)
- (set-char-table-range table (cons 0 (max-char)) default-value)
+ (setq val-list (cons nil (copy-sequence val-list)))
+ (setq tail val-list val-code 0)
+ ;; Convert (nil A B ...) to ((nil . 0) (A . 1) (B . 2) ...)
+ (while tail
+ (setcar tail (cons (car tail) val-code))
+ (setq tail (cdr tail) val-code (1+ val-code)))
+ (setq default-value (unidata-encode-val val-list default-value))
+ (set-char-table-range table t default-value)
+ (set-char-table-range table nil default-value)
(setq tail unidata-list)
(while tail
(setq elt (car tail) tail (cdr tail))
(setq val-code (if val (unidata-encode-val val-list val)))
(if (consp range)
(when val-code
- (set-char-table-range table range val)
+ (set-char-table-range table range val-code)
(let ((from (car range)) (to (cdr range)))
;; If RANGE doesn't end at the char-table boundary (each
;; 128 characters), we may have to carry over the data
(if val-code
(aset vec (- range start) val-code))
(setq tail (cdr tail)))
- (setq str "" val-code -1 count 0)
+ (setq str "\002" val-code -1 count 0)
(mapc #'(lambda (x)
(if (= val-code x)
(setq count (1+ count))
vec)
(if (= count 128)
(if val
- (set-char-table-range table (cons start limit) val))
+ (set-char-table-range table (cons start limit) val-code))
(if (= val-code 0)
(set-char-table-range table (cons start limit) str)
(if (> count 2)
(setq str (concat str (string val-code)))))
(set-char-table-range table (cons start limit) str))))))
- (setq val-list (nreverse (cdr val-list)))
(set-char-table-extra-slot table 0 prop)
(set-char-table-extra-slot table 4 (vconcat (mapcar 'car val-list)))
table))
-(defun unidata-gen-table-symbol (prop)
+(defun unidata-gen-table-symbol (prop default-value val-list)
(let ((table (unidata-gen-table prop
#'(lambda (x) (and (> (length x) 0)
(intern x)))
- 0)))
- (byte-compile 'unidata-get-symbol)
- (byte-compile 'unidata-put-symbol)
- (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-symbol))
- (set-char-table-extra-slot table 2 (symbol-function 'unidata-put-symbol))
+ default-value val-list)))
+ (set-char-table-extra-slot table 1 0)
+ (set-char-table-extra-slot table 2 1)
table))
-(defun unidata-gen-table-integer (prop)
+(defun unidata-gen-table-integer (prop default-value val-list)
(let ((table (unidata-gen-table prop
#'(lambda (x) (and (> (length x) 0)
(string-to-number x)))
- t)))
- (byte-compile 'unidata-get-integer)
- (byte-compile 'unidata-put-integer)
- (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-integer))
- (set-char-table-extra-slot table 2 (symbol-function 'unidata-put-integer))
+ default-value val-list)))
+ (set-char-table-extra-slot table 1 0)
+ (set-char-table-extra-slot table 2 1)
table))
-(defun unidata-gen-table-numeric (prop)
+(defun unidata-gen-table-numeric (prop default-value val-list)
(let ((table (unidata-gen-table prop
#'(lambda (x)
(if (string-match "/" x)
(substring x (match-end 0))))
(if (> (length x) 0)
(string-to-number x))))
- t)))
- (byte-compile 'unidata-get-numeric)
- (byte-compile 'unidata-put-numeric)
- (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-numeric))
- (set-char-table-extra-slot table 2 (symbol-function 'unidata-put-numeric))
+ default-value val-list)))
+ (set-char-table-extra-slot table 1 0)
+ (set-char-table-extra-slot table 2 2)
table))
\f
word-table
block-list block-word-table block-end
tail elt range val idx slot)
- (set-char-table-range table (cons 0 (max-char)) 0)
(setq tail unidata-list)
(setq block-end -1)
(while tail
idx (1+ i)))))
(nreverse (cons (intern (substring str idx)) l))))))
-(defun unidata-gen-table-name (prop)
+(defun unidata-gen-table-name (prop &rest ignore)
(let* ((table (unidata-gen-table-word-list prop 'unidata-split-name))
(word-tables (char-table-extra-slot table 4)))
(byte-compile 'unidata-get-name)
(nreverse l)))))
-(defun unidata-gen-table-decomposition (prop)
+(defun unidata-gen-table-decomposition (prop &rest ignore)
(let* ((table (unidata-gen-table-word-list prop 'unidata-split-decomposition))
(word-tables (char-table-extra-slot table 4)))
(byte-compile 'unidata-get-decomposition)
\f
(defun unidata-describe-general-category (val)
(cdr (assq val
- '((Lu . "Letter, Uppercase")
+ '((nil . "Uknown")
+ (Lu . "Letter, Uppercase")
(Ll . "Letter, Lowercase")
(Lt . "Letter, Titlecase")
(Lm . "Letter, Modifier")
(string ?'))))
val " "))
+(defun unidata-gen-mirroring-list ()
+ (let ((head (list nil))
+ tail)
+ (with-temp-buffer
+ (insert-file-contents (expand-file-name "BidiMirroring.txt" unidata-dir))
+ (goto-char (point-min))
+ (setq tail head)
+ (while (re-search-forward "^\\([0-9A-F]+\\);\\s +\\([0-9A-F]+\\)" nil t)
+ (let ((char (string-to-number (match-string 1) 16))
+ (mirror (match-string 2)))
+ (setq tail (setcdr tail (list (list char mirror)))))))
+ (cdr head)))
+
;; Verify if we can retrieve correct values from the generated
;; char-tables.
;; The entry function. It generates files described in the header
;; comment of this file.
-(defun unidata-gen-files (&optional unidata-text-file)
- (or unidata-text-file
- (setq unidata-text-file (car command-line-args-left)
+(defun unidata-gen-files (&optional data-dir unidata-text-file)
+ (or data-dir
+ (setq data-dir (car command-line-args-left)
+ command-line-args-left (cdr command-line-args-left)
+ unidata-text-file (car command-line-args-left)
command-line-args-left (cdr command-line-args-left)))
- (unidata-setup-list unidata-text-file)
(let ((coding-system-for-write 'utf-8-unix)
- (charprop-file "charprop.el"))
+ (charprop-file "charprop.el")
+ (unidata-dir data-dir))
+ (dolist (elt unidata-prop-alist)
+ (let* ((prop (car elt))
+ (file (unidata-prop-file prop)))
+ (if (file-exists-p file)
+ (delete-file file))))
+ (unidata-setup-list unidata-text-file)
(with-temp-file charprop-file
(insert ";; Automatically generated by unidata-gen.el.\n")
(dolist (elt unidata-prop-alist)
(file (unidata-prop-file prop))
(docstring (unidata-prop-docstring prop))
(describer (unidata-prop-describer prop))
+ (default-value (unidata-prop-default prop))
+ (val-list (unidata-prop-val-list prop))
table)
;; Filename in this comment line is extracted by sed in
;; Makefile.
(insert (format ";; FILE: %s\n" file))
(insert (format "(define-char-code-property '%S %S\n %S)\n"
prop file docstring))
- (with-temp-file file
+ (with-temp-buffer
(message "Generating %s..." file)
- (setq table (funcall generator prop))
+ (when (file-exists-p file)
+ (insert-file-contents file)
+ (goto-char (point-max))
+ (search-backward ";; Local Variables:"))
+ (setq table (funcall generator prop default-value val-list))
(when describer
(unless (subrp (symbol-function describer))
(byte-compile describer)
(setq describer (symbol-function describer)))
(set-char-table-extra-slot table 3 describer))
- (insert ";; Copyright (C) 1991-2009 Unicode, Inc.
-;; This file was generated from the Unicode data file at
-;; http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
-;; See lisp/international/README for the copyright and permission notice.\n"
- (format "(define-char-code-property '%S %S %S)\n"
- prop table docstring)
- ";; Local Variables:\n"
- ";; coding: utf-8\n"
- ";; no-byte-compile: t\n"
- ";; End:\n\n"
- (format ";; %s ends here\n" file)))))
+ (if (bobp)
+ (insert ";; Copyright (C) 1991-2009 Unicode, Inc.
+;; This file was generated from the Unicode data files at
+;; http://www.unicode.org/Public/UNIDATA/.
+;; See lisp/international/README for the copyright and permission notice.\n"))
+ (insert (format "(define-char-code-property '%S %S %S)\n"
+ prop table docstring))
+ (if (eobp)
+ (insert ";; Local Variables:\n"
+ ";; coding: utf-8\n"
+ ";; no-byte-compile: t\n"
+ ";; End:\n\n"
+ (format ";; %s ends here\n" file)))
+ (write-file file)
+ (message "Generating %s...done" file))))
(message "Writing %s..." charprop-file)
(insert ";; Local Variables:\n"
";; coding: utf-8\n"
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
--disable-ns-self-contained
disable self contained build under NeXTstep
--enable-asserts compile code with asserts enabled
- --enable-maintainer-mode
- enable make rules and dependencies not useful (and
+ --disable-maintainer-mode
+ disable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
--enable-locallisppath=PATH
directories Emacs should search for lisp files
## Silicon Graphics machines
## Iris 4D
mips-sgi-irix6.5 )
- machine=iris4d opsys=irix6-5
+ opsys=irix6-5
# Without defining _LANGUAGE_C, things get masked out in the headers
# so that, for instance, grepping for `free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
gl_optind_min=1
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
gl_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
main ()
{
{
- int argc = 0;
- char *argv[10];
+ static char program[] = "program";
+ static char a[] = "-a";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, a, foo, bar, NULL };
int c;
- argv[argc++] = "program";
- argv[argc++] = "-a";
- argv[argc++] = "foo";
- argv[argc++] = "bar";
- argv[argc] = NULL;
optind = OPTIND_MIN;
opterr = 0;
- c = getopt (argc, argv, "ab");
+ c = getopt (4, argv, "ab");
if (!(c == 'a'))
return 1;
- c = getopt (argc, argv, "ab");
+ c = getopt (4, argv, "ab");
if (!(c == -1))
return 2;
if (!(optind == 2))
}
/* Some internal state exists at this point. */
{
- int argc = 0;
- char *argv[10];
+ static char program[] = "program";
+ static char donald[] = "donald";
+ static char p[] = "-p";
+ static char billy[] = "billy";
+ static char duck[] = "duck";
+ static char a[] = "-a";
+ static char bar[] = "bar";
+ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
int c;
- argv[argc++] = "program";
- argv[argc++] = "donald";
- argv[argc++] = "-p";
- argv[argc++] = "billy";
- argv[argc++] = "duck";
- argv[argc++] = "-a";
- argv[argc++] = "bar";
- argv[argc] = NULL;
optind = OPTIND_MIN;
opterr = 0;
- c = getopt (argc, argv, "+abp:q:");
+ c = getopt (7, argv, "+abp:q:");
if (!(c == -1))
return 4;
if (!(strcmp (argv[0], "program") == 0))
}
/* Detect MacOS 10.5, AIX 7.1 bug. */
{
- char *argv[3] = { "program", "-ab", NULL };
+ static char program[] = "program";
+ static char ab[] = "-ab";
+ char *argv[3] = { program, ab, NULL };
optind = OPTIND_MIN;
opterr = 0;
if (getopt (2, argv, "ab:") != 'a')
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
OSF/1 5.1, Solaris 10. */
{
- char *myargv[3];
- myargv[0] = "conftest";
- myargv[1] = "-+";
- myargv[2] = 0;
+ static char conftest[] = "conftest";
+ static char plus[] = "-+";
+ char *argv[3] = { conftest, plus, NULL };
opterr = 0;
- if (getopt (2, myargv, "+a") != '?')
+ if (getopt (2, argv, "+a") != '?')
result |= 1;
}
/* This code succeeds on glibc 2.8, mingw,
and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
{
- char *argv[] = { "program", "-p", "foo", "bar", NULL };
+ static char program[] = "program";
+ static char p[] = "-p";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, p, foo, bar, NULL };
optind = 1;
if (getopt (4, argv, "p::") != 'p')
}
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
{
- char *argv[] = { "program", "foo", "-p", NULL };
+ static char program[] = "program";
+ static char foo[] = "foo";
+ static char p[] = "-p";
+ char *argv[] = { program, foo, p, NULL };
optind = 0;
if (getopt (3, argv, "-p") != 1)
result |= 16;
}
/* This code fails on glibc 2.11. */
{
- char *argv[] = { "program", "-b", "-a", NULL };
+ static char program[] = "program";
+ static char b[] = "-b";
+ static char a[] = "-a";
+ char *argv[] = { program, b, a, NULL };
optind = opterr = 0;
if (getopt (3, argv, "+:a:b") != 'b')
result |= 64;
else if (getopt (3, argv, "+:a:b") != ':')
result |= 64;
}
+ /* This code dumps core on glibc 2.14. */
+ {
+ static char program[] = "program";
+ static char w[] = "-W";
+ static char dummy[] = "dummy";
+ char *argv[] = { program, w, dummy, NULL };
+ optind = opterr = 1;
+ if (getopt (3, argv, "W;") != 'W')
+ result |= 128;
+ }
return result;
;
USE_XASSERTS=no)
AC_ARG_ENABLE(maintainer-mode,
-[AS_HELP_STRING([--enable-maintainer-mode],
- [enable make rules and dependencies not useful (and sometimes
+[AS_HELP_STRING([--disable-maintainer-mode],
+ [disable make rules and dependencies not useful (and sometimes
confusing) to the casual installer])],
USE_MAINTAINER_MODE=$enableval,
USE_MAINTAINER_MODE=yes)
## Silicon Graphics machines
## Iris 4D
mips-sgi-irix6.5 )
- machine=iris4d opsys=irix6-5
+ opsys=irix6-5
# Without defining _LANGUAGE_C, things get masked out in the headers
# so that, for instance, grepping for `free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
AC_DEFUN([AC_TYPE_SIZE_T])
+# Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
+AC_DEFUN([AC_TYPE_UID_T])
dnl Do this early because it can frob feature test macros for Unix-98 &c.
AC_SYS_LARGEFILE
AC_FUNC_GETPGRP
-# Configure gnulib.
-gl_ASSERT_NO_GNULIB_POSIXCHECK
-gl_ASSERT_NO_GNULIB_TESTS
-gl_INIT
-
# UNIX98 PTYs.
AC_CHECK_FUNCS(grantpt)
AC_SUBST(PRE_ALLOC_OBJ)
AC_SUBST(POST_ALLOC_OBJ)
+# Configure gnulib here, now that we know LIBS.
+gl_ASSERT_NO_GNULIB_POSIXCHECK
+gl_ASSERT_NO_GNULIB_TESTS
+gl_INIT
case "$opsys" in
aix4-2) LD_SWITCH_SYSTEM_TEMACS="-Wl,-bnodelcsect" ;;
+2011-07-09 Glenn Morris <rgm@gnu.org>
+
+ * fortran-xtra.texi (Fortran): Update handled extensions.
+
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
* display.texi (Scrolling): `C-v' (etc) are now bound to
``free form'' source code (Fortran 90, 95, 2003, 2008), use F90 mode
(@code{f90-mode}). Emacs normally uses Fortran mode for files with
extension @samp{.f}, @samp{.F} or @samp{.for}, and F90 mode for the
-extensions @samp{.f90} and @samp{.f95}. Customize
-@code{auto-mode-alist} to add more extensions. GNU Fortran supports
-both free and fixed form. This manual mainly documents Fortran mode,
-but the corresponding F90 mode features are mentioned when revelant.
+extensions @samp{.f90}, @samp{.f95}, @samp{.f03} and @samp{.f08}.
+Customize @code{auto-mode-alist} to add more extensions. GNU Fortran
+supports both free and fixed form. This manual mainly documents Fortran
+mode, but the corresponding F90 mode features are mentioned when
+revelant.
Fortran mode provides special motion commands for Fortran statements
and subprograms, and indentation commands that understand Fortran
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * text.texi (Special Properties): Clarify the format of `face'
+ (bug#1375).
+
+ * commands.texi (Interactive Call): Add a `call-interactively'
+ example (bug#1010).
+
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* functions.texi (Calling Functions): Link to the "Interactive
@defun call-interactively command &optional record-flag keys
This function calls the interactively callable function @var{command},
-reading arguments according to its interactive calling specifications.
-It returns whatever @var{command} returns. An error is signaled if
-@var{command} is not a function or if it cannot be called
-interactively (i.e., is not a command). Note that keyboard macros
-(strings and vectors) are not accepted, even though they are
-considered commands, because they are not functions. If @var{command}
-is a symbol, then @code{call-interactively} uses its function definition.
+providing arguments according to its interactive calling specifications.
+It returns whatever @var{command} returns.
+
+If, for instance, you have a function with the following signature:
+
+@example
+(defun foo (begin end)
+ (interactive "r")
+ ...)
+@end example
+
+then saying
+
+@example
+(call-interactively 'foo)
+@end example
+
+will call @code{foo} with the region (@code{point} and @code{mark}) as
+the arguments.
+
+An error is signaled if @var{command} is not a function or if it
+cannot be called interactively (i.e., is not a command). Note that
+keyboard macros (strings and vectors) are not accepted, even though
+they are considered commands, because they are not functions. If
+@var{command} is a symbol, then @code{call-interactively} uses its
+function definition.
@cindex record command history
If @var{record-flag} is non-@code{nil}, then this command and its
You can use the property @code{face} to control the font and color of
text. @xref{Faces}, for more information.
-In the simplest case, the value is a face name. It can also be a list;
-then each element can be any of these possibilities;
+@code{face} can be the following:
@itemize @bullet
@item
@xref{Face Attributes}.
@end itemize
-It works to use the latter two forms directly as the value
-of the @code{face} property.
+@code{face} can also be a list, where each element uses one of the
+forms listed above.
Font Lock mode (@pxref{Font Lock Mode}) works in most buffers by
dynamically updating the @code{face} property of characters based on
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * ediff.texi (Major Entry Points): Remove mention of `require',
+ since that's not pertinent in the installed Emacs (bug#9016).
+
2011-07-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnus.texi (Expiring Mail): Document gnus-auto-expirable-marks.
and restart active Ediff sessions.
@end table
-@noindent
-If you want Ediff to be loaded from the very beginning of your Emacs
-session, you should put this line in your @file{~/.emacs} file:
-
-@example
-(require 'ediff)
-@end example
-
-@noindent
-Otherwise, Ediff will be loaded automatically when you use one of the
-above functions, either directly or through the menus.
-
When the above functions are invoked, the user is prompted for all the
necessary information---typically the files or buffers to compare, merge, or
patch. Ediff tries to be smart about these prompts. For instance, in
+2011-07-07 Tassilo Horn <tassilo@member.fsf.org>
+
+ * themes/tsdh-light-theme.el:
+ * themes/tsdh-dark-theme.el: Make `gnus-button' face inherit from
+ `button', `gnus-header-name' boxed, and define `rcirc-my-nick'
+ face.
+
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * NEWS: Clarify `smtpmail-auth-credentials' non-existence.
+ Mention the `send-mail-function' default change.
+
+2011-07-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * themes/dichromacy-theme.el:
+ * themes/tango-theme.el:
+ * themes/tango-dark-theme.el:
+ * themes/wheatgrass-theme.el: Don't define button face separately;
+ it inherits from link now.
+
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* NEWS: Clarify that `smtpmail-starttls-credentials' doesn't exist.
** auto-mode-case-fold is now enabled by default.
+** Mail changes
+
+The default of `send-mail-function' has changed from
+`sendmail-send-it' (on GNU/Linux and other Unix-like systems) or
+`mailclient-send-it' (on Windows) to `sendmail-query-once'. This new
+default will ask the user (once) whether to use the internal smtpmail
+package to send email, or to use the old, external defaults.
+
** smtpmail changes
-** smtpmail has been largely rewritten to upgrade to STARTTLS if
+*** smtpmail has been largely rewritten to upgrade to STARTTLS if
possible, and uses the auth-source framework for getting credentials.
The rewrite should be largely compatible with previous versions of
smtpmail, but there are two major incompatibilities:
-** `smtpmail-auth-credentials' no longer exists. That variable could
-be either ~/.authinfo (in which case you're fine -- you won't see any
+*** `smtpmail-auth-credentials' no longer exists. That variable used
+to be be either ~/.authinfo (in which case you won't see any
difference), but if it were a direct list of user names and passwords,
-you will be prompted for the user name and the password instead, and
-they will then be saved to ~/.authinfo.
+it will be ignored, and you will be prompted for the user name and the
+password instead. They will then be saved to ~/.authinfo.
+
+If you wish to copy over all the credentials from
+`smtpmail-auth-credentials' to your ~/.authinfo file manually, instead
+of letting smtpmail prompt you for these values, that's also possible.
+
+If you had, for instance,
+
+(setq smtpmail-auth-credentials
+ '(("mail.example.org" 25 "jim" "s!cret")))
+
+then the equivalent line in ~/.authinfo would be
+
+machine mail.example.org port 25 login jim password s!cret
-** Similarly, `smtpmail-starttls-credentials' no longer exists. If
-you had thet set, then then you need to put
+*** Similarly, `smtpmail-starttls-credentials' no longer exists. If
+you had that set, then then you need to put
-machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert "~/.my_smtp_tls.cert"
+machine smtp.whatever.foo port 25 key "~/.my_smtp_tls.key" cert
+"~/.my_smtp_tls.cert"
in your ~/.authinfo file instead.
`(font-lock-warning-face ((,class (:weight bold :slant italic
:foreground ,vermillion))))
;; Button and link faces
- `(button ((,class (:underline t :foreground ,blue))))
`(link ((,class (:underline t :foreground ,blue))))
`(link-visited ((,class (:underline t :foreground ,redpurple))))
;; Gnus faces
`(font-lock-variable-name-face ((,class (:foreground ,orange-1))))
`(font-lock-warning-face ((,class (:foreground ,red-0))))
;; Button and link faces
- `(button ((,class (:underline t :foreground ,blue-1))))
`(link ((,class (:underline t :foreground ,blue-1))))
`(link-visited ((,class (:underline t :foreground ,blue-2))))
;; Gnus faces
`(font-lock-variable-name-face ((,class (:foreground ,orange-4))))
`(font-lock-warning-face ((,class (:foreground ,red-2))))
;; Button and link faces
- `(button ((,class (:underline t :foreground ,blue-3))))
`(link ((,class (:underline t :foreground ,blue-3))))
`(link-visited ((,class (:underline t :foreground ,blue-2))))
;; Gnus faces
'(diff-indicator-removed ((t (:inherit diff-indicator-changed))))
'(diff-removed ((t (:inherit diff-changed :background "dark red"))))
'(dired-directory ((t (:inherit font-lock-function-name-face :weight bold))))
+ '(gnus-button ((t (:inherit button))))
+ '(gnus-header-name ((t (:box (:line-width 1 :style released-button) :weight bold))))
'(header-line ((t (:inherit mode-line :inverse-video t))))
'(hl-line ((t (:background "grey28"))))
'(message-header-subject ((t (:foreground "SkyBlue"))))
'(outline-6 ((t (:inherit font-lock-constant-face :weight bold))))
'(outline-7 ((t (:inherit font-lock-builtin-face :weight bold))))
'(outline-8 ((t (:inherit font-lock-string-face :weight bold))))
+ '(rcirc-my-nick ((t (:foreground "LightSkyBlue" :weight bold))))
'(region ((t (:background "SteelBlue4"))))
'(show-paren-match ((t (:background "DarkGreen"))))
'(show-paren-mismatch ((t (:background "deep pink"))))
'(diff-indicator-removed ((t (:inherit diff-indicator-changed))))
'(diff-removed ((t (:inherit diff-changed :background "sandy brown"))))
'(dired-directory ((t (:inherit font-lock-function-name-face :weight bold))))
+ '(gnus-button ((t (:inherit button))))
+ '(gnus-header-name ((t (:box (:line-width 1 :style released-button) :weight bold))))
'(header-line ((t (:inherit mode-line :inverse-video t))))
'(hl-line ((t (:background "grey95"))))
'(minibuffer-prompt ((t (:background "yellow" :foreground "medium blue" :box (:line-width -1 :color "red" :style released-button) :weight bold))))
'(outline-6 ((t (:inherit font-lock-constant-face :weight bold))))
'(outline-7 ((t (:inherit font-lock-builtin-face :weight bold))))
'(outline-8 ((t (:inherit font-lock-string-face :weight bold))))
+ '(rcirc-my-nick ((t (:foreground "LightSkyBlue" :weight bold))))
'(region ((t (:background "lightgoldenrod1"))))
'(show-paren-match ((t (:background "LightCyan2"))))
'(show-paren-mismatch ((t (:background "deep pink"))))
`(font-lock-variable-name-face ((,class (:foreground "yellow green"))))
`(font-lock-warning-face ((,class (:foreground "salmon1"))))
;; Button and link faces
- `(button ((,class (:underline t :foreground "cyan"))))
`(link ((,class (:underline t :foreground "cyan"))))
`(link-visited ((,class (:underline t :foreground "dark cyan"))))
;; Gnus faces
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
- if (temp[0] == 'W' && temp[1] == ';' && longopts)
+ if (temp[0] == 'W' && temp[1] == ';')
{
char *nameend;
const struct option *p;
int indfound = 0;
int option_index;
+ if (longopts == NULL)
+ goto no_longs;
+
/* This is an option that requires an argument. */
if (*d->__nextchar != '\0')
{
}
return pfound->val;
}
- d->__nextchar = NULL;
- return 'W'; /* Let the application handle it. */
+
+ no_longs:
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
{
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime readlink socklen stdarg stdio strftime strtoumax symlink sys_stat
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
MOSTLYCLEANFILES += core *.stackdump
## end gnulib module mktime
+## begin gnulib module pthread_sigmask
+
+
+EXTRA_DIST += pthread_sigmask.c
+
+EXTRA_libgnu_a_SOURCES += pthread_sigmask.c
+
+## end gnulib module pthread_sigmask
+
## begin gnulib module readlink
## end gnulib module readlink
+## begin gnulib module signal
+
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \
+ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \
+ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \
+ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e 's|@''HAVE_SIGHANDLER_T''@|$(HAVE_SIGHANDLER_T)|g' \
+ -e 's|@''REPLACE_PTHREAD_SIGMASK''@|$(REPLACE_PTHREAD_SIGMASK)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+EXTRA_DIST += signal.in.h
+
+## end gnulib module signal
+
+## begin gnulib module sigprocmask
+
+if gl_GNULIB_ENABLED_sigprocmask
+
+endif
+EXTRA_DIST += sigprocmask.c
+
+EXTRA_libgnu_a_SOURCES += sigprocmask.c
+
+## end gnulib module sigprocmask
+
## begin gnulib module stat
if gl_GNULIB_ENABLED_stat
## end gnulib module strftime
+## begin gnulib module strtoimax
+
+
+EXTRA_DIST += strtoimax.c
+
+EXTRA_libgnu_a_SOURCES += strtoimax.c
+
+## end gnulib module strtoimax
+
+## begin gnulib module strtoll
+
+if gl_GNULIB_ENABLED_strtoll
+
+endif
+EXTRA_DIST += strtol.c strtoll.c
+
+EXTRA_libgnu_a_SOURCES += strtol.c strtoll.c
+
+## end gnulib module strtoll
+
## begin gnulib module strtoull
if gl_GNULIB_ENABLED_strtoull
--- /dev/null
+/* POSIX compatible signal blocking for threads.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+
+int
+pthread_sigmask (int how, const sigset_t *new_mask, sigset_t *old_mask)
+{
+ int ret = sigprocmask (how, new_mask, old_mask);
+ return (ret < 0 ? errno : 0);
+}
--- /dev/null
+/* A GNU-like <signal.h>.
+
+ Copyright (C) 2006-2011 Free Software Foundation, Inc.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_sig_atomic_t || defined __need_sigset_t || defined _GL_ALREADY_INCLUDING_SIGNAL_H || (defined _SIGNAL_H && !defined __SIZEOF_PTHREAD_MUTEX_T)
+/* Special invocation convention:
+ - Inside glibc header files.
+ - On glibc systems we have a sequence of nested includes
+ <signal.h> -> <ucontext.h> -> <signal.h>.
+ In this situation, the functions are not yet declared, therefore we cannot
+ provide the C++ aliases.
+ - On glibc systems with GCC 4.3 we have a sequence of nested includes
+ <csignal> -> </usr/include/signal.h> -> <sys/ucontext.h> -> <signal.h>.
+ In this situation, some of the functions are not yet declared, therefore
+ we cannot provide the C++ aliases. */
+
+# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+
+#define _GL_ALREADY_INCLUDING_SIGNAL_H
+
+/* Define pid_t, uid_t.
+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.
+ On Solaris 10, <signal.h> includes <sys/types.h>, which eventually includes
+ us; so include <sys/types.h> now, before the second inclusion guard. */
+#include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#undef _GL_ALREADY_INCLUDING_SIGNAL_H
+
+#ifndef _@GUARD_PREFIX@_SIGNAL_H
+#define _@GUARD_PREFIX@_SIGNAL_H
+
+/* MacOS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6 declare
+ pthread_sigmask in <pthread.h>, not in <signal.h>.
+ But avoid namespace pollution on glibc systems.*/
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ || defined __sun) \
+ && ! defined __GLIBC__
+# include <pthread.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* On AIX, sig_atomic_t already includes volatile. C99 requires that
+ 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
+ Hence, redefine this to a non-volatile type as needed. */
+#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+# if !GNULIB_defined_sig_atomic_t
+typedef int rpl_sig_atomic_t;
+# undef sig_atomic_t
+# define sig_atomic_t rpl_sig_atomic_t
+# define GNULIB_defined_sig_atomic_t 1
+# endif
+#endif
+
+/* A set or mask of signals. */
+#if !@HAVE_SIGSET_T@
+# if !GNULIB_defined_sigset_t
+typedef unsigned int sigset_t;
+# define GNULIB_defined_sigset_t 1
+# endif
+#endif
+
+/* Define sighandler_t, the type of signal handlers. A GNU extension. */
+#if !@HAVE_SIGHANDLER_T@
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_sighandler_t
+typedef void (*sighandler_t) (int);
+# define GNULIB_defined_sighandler_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+#endif
+
+
+#if @GNULIB_SIGNAL_H_SIGPIPE@
+# ifndef SIGPIPE
+/* Define SIGPIPE to a value that does not overlap with other signals. */
+# define SIGPIPE 13
+# define GNULIB_defined_SIGPIPE 1
+/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask',
+ 'write', 'stdio'. */
+# endif
+#endif
+
+
+/* Maximum signal number + 1. */
+#ifndef NSIG
+# if defined __TANDEM
+# define NSIG 32
+# endif
+#endif
+
+
+#if @GNULIB_PTHREAD_SIGMASK@
+# if @REPLACE_PTHREAD_SIGMASK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_sigmask
+# define pthread_sigmask rpl_pthread_sigmask
+# endif
+_GL_FUNCDECL_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+_GL_CXXALIAS_RPL (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# else
+# if !@HAVE_PTHREAD_SIGMASK@
+_GL_FUNCDECL_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIAS_SYS (pthread_sigmask, int,
+ (int how, const sigset_t *new_mask, sigset_t *old_mask));
+# endif
+_GL_CXXALIASWARN (pthread_sigmask);
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_sigmask
+# if HAVE_RAW_DECL_PTHREAD_SIGMASK
+_GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - "
+ "use gnulib module pthread_sigmask for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SIGPROCMASK@
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+
+/* Maximum signal number + 1. */
+# ifndef NSIG
+# define NSIG 32
+# endif
+
+/* This code supports only 32 signals. */
+# if !GNULIB_defined_verify_NSIG_constraint
+typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1];
+# define GNULIB_defined_verify_NSIG_constraint 1
+# endif
+
+# endif
+
+/* Test whether a given signal is contained in a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on MacOS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigismember
+# endif
+# else
+_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigismember);
+
+/* Initialize a signal set to the empty set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on MacOS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigemptyset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigemptyset);
+
+/* Add a signal to a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on MacOS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigaddset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigaddset);
+
+/* Remove a signal from a signal set. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on MacOS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigdelset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig));
+_GL_CXXALIASWARN (sigdelset);
+
+/* Fill a signal set with all possible signals. */
+# if @HAVE_POSIX_SIGNALBLOCKING@
+/* This function is defined as a macro on MacOS X. */
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+# undef sigfillset
+# endif
+# else
+_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigfillset);
+
+/* Return the set of those blocked signals that are pending. */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set));
+_GL_CXXALIASWARN (sigpending);
+
+/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET.
+ Then, if SET is not NULL, affect the current set of blocked signals by
+ combining it with *SET as indicated in OPERATION.
+ In this implementation, you are not allowed to change a signal handler
+ while the signal is blocked. */
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */
+# define SIG_SETMASK 1 /* blocked_set = *set; */
+# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */
+_GL_FUNCDECL_SYS (sigprocmask, int,
+ (int operation, const sigset_t *set, sigset_t *old_set));
+# endif
+_GL_CXXALIAS_SYS (sigprocmask, int,
+ (int operation, const sigset_t *set, sigset_t *old_set));
+_GL_CXXALIASWARN (sigprocmask);
+
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+# ifdef __cplusplus
+extern "C" {
+# endif
+# if !GNULIB_defined_function_taking_int_returning_void_t
+typedef void (*_gl_function_taking_int_returning_void_t) (int);
+# define GNULIB_defined_function_taking_int_returning_void_t 1
+# endif
+# ifdef __cplusplus
+}
+# endif
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define signal rpl_signal
+# endif
+_GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+_GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+# else
+_GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t,
+ (int sig, _gl_function_taking_int_returning_void_t func));
+# endif
+_GL_CXXALIASWARN (signal);
+
+/* Raise signal SIG. */
+# if !@HAVE_POSIX_SIGNALBLOCKING@ && GNULIB_defined_SIGPIPE
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef raise
+# define raise rpl_raise
+# endif
+_GL_FUNCDECL_RPL (raise, int, (int sig));
+_GL_CXXALIAS_RPL (raise, int, (int sig));
+# else
+_GL_CXXALIAS_SYS (raise, int, (int sig));
+# endif
+_GL_CXXALIASWARN (raise);
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaddset
+# if HAVE_RAW_DECL_SIGADDSET
+_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigdelset
+# if HAVE_RAW_DECL_SIGDELSET
+_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigemptyset
+# if HAVE_RAW_DECL_SIGEMPTYSET
+_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigfillset
+# if HAVE_RAW_DECL_SIGFILLSET
+_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigismember
+# if HAVE_RAW_DECL_SIGISMEMBER
+_GL_WARN_ON_USE (sigismember, "sigismember is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigpending
+# if HAVE_RAW_DECL_SIGPENDING
+_GL_WARN_ON_USE (sigpending, "sigpending is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigprocmask
+# if HAVE_RAW_DECL_SIGPROCMASK
+_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+#endif /* @GNULIB_SIGPROCMASK@ */
+
+
+#if @GNULIB_SIGACTION@
+# if !@HAVE_SIGACTION@
+
+# if !@HAVE_SIGINFO_T@
+
+# if !GNULIB_defined_siginfo_types
+
+/* Present to allow compilation, but unsupported by gnulib. */
+union sigval
+{
+ int sival_int;
+ void *sival_ptr;
+};
+
+/* Present to allow compilation, but unsupported by gnulib. */
+struct siginfo_t
+{
+ int si_signo;
+ int si_code;
+ int si_errno;
+ pid_t si_pid;
+ uid_t si_uid;
+ void *si_addr;
+ int si_status;
+ long si_band;
+ union sigval si_value;
+};
+typedef struct siginfo_t siginfo_t;
+
+# define GNULIB_defined_siginfo_types 1
+# endif
+
+# endif /* !@HAVE_SIGINFO_T@ */
+
+/* We assume that platforms which lack the sigaction() function also lack
+ the 'struct sigaction' type, and vice versa. */
+
+# if !GNULIB_defined_struct_sigaction
+
+struct sigaction
+{
+ union
+ {
+ void (*_sa_handler) (int);
+ /* Present to allow compilation, but unsupported by gnulib. POSIX
+ says that implementations may, but not must, make sa_sigaction
+ overlap with sa_handler, but we know of no implementation where
+ they do not overlap. */
+ void (*_sa_sigaction) (int, siginfo_t *, void *);
+ } _sa_func;
+ sigset_t sa_mask;
+ /* Not all POSIX flags are supported. */
+ int sa_flags;
+};
+# define sa_handler _sa_func._sa_handler
+# define sa_sigaction _sa_func._sa_sigaction
+/* Unsupported flags are not present. */
+# define SA_RESETHAND 1
+# define SA_NODEFER 2
+# define SA_RESTART 4
+
+# define GNULIB_defined_struct_sigaction 1
+# endif
+
+_GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict,
+ struct sigaction *restrict));
+
+# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+
+# define sa_sigaction sa_handler
+
+# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+
+_GL_CXXALIAS_SYS (sigaction, int, (int, const struct sigaction *restrict,
+ struct sigaction *restrict));
+_GL_CXXALIASWARN (sigaction);
+
+#elif defined GNULIB_POSIXCHECK
+# undef sigaction
+# if HAVE_RAW_DECL_SIGACTION
+_GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
+ "use the gnulib module sigaction for portability");
+# endif
+#endif
+
+/* Some systems don't have SA_NODEFER. */
+#ifndef SA_NODEFER
+# define SA_NODEFER 0
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif /* _@GUARD_PREFIX@_SIGNAL_H */
+#endif
--- /dev/null
+/* POSIX compatible signal blocking.
+ Copyright (C) 2006-2011 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/* We assume that a platform without POSIX signal blocking functions
+ also does not have the POSIX sigaction() function, only the
+ signal() function. We also assume signal() has SysV semantics,
+ where any handler is uninstalled prior to being invoked. This is
+ true for Woe32 platforms. */
+
+/* We use raw signal(), but also provide a wrapper rpl_signal() so
+ that applications can query or change a blocked signal. */
+#undef signal
+
+/* Provide invalid signal numbers as fallbacks if the uncatchable
+ signals are not defined. */
+#ifndef SIGKILL
+# define SIGKILL (-1)
+#endif
+#ifndef SIGSTOP
+# define SIGSTOP (-1)
+#endif
+
+/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
+ for the signal SIGABRT. Only one signal handler is stored for both
+ SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef SIGABRT_COMPAT
+# define SIGABRT_COMPAT 6
+#endif
+#ifdef SIGABRT_COMPAT
+# define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT)
+#else
+# define SIGABRT_COMPAT_MASK 0
+#endif
+
+typedef void (*handler_t) (int);
+
+/* Handling of gnulib defined signals. */
+
+#if GNULIB_defined_SIGPIPE
+static handler_t SIGPIPE_handler = SIG_DFL;
+#endif
+
+#if GNULIB_defined_SIGPIPE
+static handler_t
+ext_signal (int sig, handler_t handler)
+{
+ switch (sig)
+ {
+ case SIGPIPE:
+ {
+ handler_t old_handler = SIGPIPE_handler;
+ SIGPIPE_handler = handler;
+ return old_handler;
+ }
+ default: /* System defined signal */
+ return signal (sig, handler);
+ }
+}
+# define signal ext_signal
+#endif
+
+int
+sigismember (const sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ return (*set >> sig) & 1;
+ }
+ else
+ return 0;
+}
+
+int
+sigemptyset (sigset_t *set)
+{
+ *set = 0;
+ return 0;
+}
+
+int
+sigaddset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set |= 1U << sig;
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+int
+sigdelset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set &= ~(1U << sig);
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+
+int
+sigfillset (sigset_t *set)
+{
+ *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
+ return 0;
+}
+
+/* Set of currently blocked signals. */
+static volatile sigset_t blocked_set /* = 0 */;
+
+/* Set of currently blocked and pending signals. */
+static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */;
+
+/* Signal handler that is installed for blocked signals. */
+static void
+blocked_handler (int sig)
+{
+ /* Reinstall the handler, in case the signal occurs multiple times
+ while blocked. There is an inherent race where an asynchronous
+ signal in between when the kernel uninstalled the handler and
+ when we reinstall it will trigger the default handler; oh
+ well. */
+ signal (sig, blocked_handler);
+ if (sig >= 0 && sig < NSIG)
+ pending_array[sig] = 1;
+}
+
+int
+sigpending (sigset_t *set)
+{
+ sigset_t pending = 0;
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (pending_array[sig])
+ pending |= 1U << sig;
+ *set = pending;
+ return 0;
+}
+
+/* The previous signal handlers.
+ Only the array elements corresponding to blocked signals are relevant. */
+static volatile handler_t old_handlers[NSIG];
+
+int
+sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
+{
+ if (old_set != NULL)
+ *old_set = blocked_set;
+
+ if (set != NULL)
+ {
+ sigset_t new_blocked_set;
+ sigset_t to_unblock;
+ sigset_t to_block;
+
+ switch (operation)
+ {
+ case SIG_BLOCK:
+ new_blocked_set = blocked_set | *set;
+ break;
+ case SIG_SETMASK:
+ new_blocked_set = *set;
+ break;
+ case SIG_UNBLOCK:
+ new_blocked_set = blocked_set & ~*set;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ to_unblock = blocked_set & ~new_blocked_set;
+ to_block = new_blocked_set & ~blocked_set;
+
+ if (to_block != 0)
+ {
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_block >> sig) & 1)
+ {
+ pending_array[sig] = 0;
+ if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR)
+ blocked_set |= 1U << sig;
+ }
+ }
+
+ if (to_unblock != 0)
+ {
+ sig_atomic_t received[NSIG];
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_unblock >> sig) & 1)
+ {
+ if (signal (sig, old_handlers[sig]) != blocked_handler)
+ /* The application changed a signal handler while the signal
+ was blocked, bypassing our rpl_signal replacement.
+ We don't support this. */
+ abort ();
+ received[sig] = pending_array[sig];
+ blocked_set &= ~(1U << sig);
+ pending_array[sig] = 0;
+ }
+ else
+ received[sig] = 0;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (received[sig])
+ raise (sig);
+ }
+ }
+ return 0;
+}
+
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+handler_t
+rpl_signal (int sig, handler_t handler)
+{
+ /* We must provide a wrapper, so that a user can query what handler
+ they installed even if that signal is currently blocked. */
+ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP
+ && handler != SIG_ERR)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ if (blocked_set & (1U << sig))
+ {
+ /* POSIX states that sigprocmask and signal are both
+ async-signal-safe. This is not true of our
+ implementation - there is a slight data race where an
+ asynchronous interrupt on signal A can occur after we
+ install blocked_handler but before we have updated
+ old_handlers for signal B, such that handler A can see
+ stale information if it calls signal(B). Oh well -
+ signal handlers really shouldn't try to manipulate the
+ installed handlers of unrelated signals. */
+ handler_t result = old_handlers[sig];
+ old_handlers[sig] = handler;
+ return result;
+ }
+ else
+ return signal (sig, handler);
+ }
+ else
+ {
+ errno = EINVAL;
+ return SIG_ERR;
+ }
+}
+
+#if GNULIB_defined_SIGPIPE
+/* Raise the signal SIG. */
+int
+rpl_raise (int sig)
+# undef raise
+{
+ switch (sig)
+ {
+ case SIGPIPE:
+ if (blocked_set & (1U << sig))
+ pending_array[sig] = 1;
+ else
+ {
+ handler_t handler = SIGPIPE_handler;
+ if (handler == SIG_DFL)
+ exit (128 + SIGPIPE);
+ else if (handler != SIG_IGN)
+ (*handler) (sig);
+ }
+ return 0;
+ default: /* System defined signal */
+ return raise (sig);
+ }
+}
+#endif
--- /dev/null
+/* Function to parse a `long long int' from text.
+ Copyright (C) 1995-1997, 1999, 2001, 2009-2011 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+
+ This program 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 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#define QUAD 1
+
+#include <strtol.c>
+
+#ifdef _LIBC
+# ifdef SHARED
+# include <shlib-compat.h>
+
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
+compat_symbol (libc, __strtoll_internal, __strtoq_internal, GLIBC_2_0);
+# endif
+
+# endif
+weak_alias (strtoll, strtoq)
+#endif
/* The definition of _GL_WARN_ON_USE is copied here. */
-#if @GNULIB_GETHOSTNAME@
-/* Get all possible declarations of gethostname(). */
-# if @UNISTD_H_HAVE_WINSOCK2_H@
-# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef socket
-# define socket socket_used_without_including_sys_socket_h
-# undef connect
-# define connect connect_used_without_including_sys_socket_h
-# undef accept
-# define accept accept_used_without_including_sys_socket_h
-# undef bind
-# define bind bind_used_without_including_sys_socket_h
-# undef getpeername
-# define getpeername getpeername_used_without_including_sys_socket_h
-# undef getsockname
-# define getsockname getsockname_used_without_including_sys_socket_h
-# undef getsockopt
-# define getsockopt getsockopt_used_without_including_sys_socket_h
-# undef listen
-# define listen listen_used_without_including_sys_socket_h
-# undef recv
-# define recv recv_used_without_including_sys_socket_h
-# undef send
-# define send send_used_without_including_sys_socket_h
-# undef recvfrom
-# define recvfrom recvfrom_used_without_including_sys_socket_h
-# undef sendto
-# define sendto sendto_used_without_including_sys_socket_h
-# undef setsockopt
-# define setsockopt setsockopt_used_without_including_sys_socket_h
-# undef shutdown
-# define shutdown shutdown_used_without_including_sys_socket_h
-# else
- _GL_WARN_ON_USE (socket,
- "socket() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (connect,
- "connect() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (accept,
- "accept() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (bind,
- "bind() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getpeername,
- "getpeername() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getsockname,
- "getsockname() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (getsockopt,
- "getsockopt() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (listen,
- "listen() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (recv,
- "recv() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (send,
- "send() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (recvfrom,
- "recvfrom() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (sendto,
- "sendto() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (setsockopt,
- "setsockopt() used without including <sys/socket.h>");
- _GL_WARN_ON_USE (shutdown,
- "shutdown() used without including <sys/socket.h>");
-# endif
+/* Hide some function declarations from <winsock2.h>. */
+
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@
+# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# else
+ _GL_WARN_ON_USE (socket,
+ "socket() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (connect,
+ "connect() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (accept,
+ "accept() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (bind,
+ "bind() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getpeername,
+ "getpeername() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockname,
+ "getsockname() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (getsockopt,
+ "getsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (listen,
+ "listen() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recv,
+ "recv() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (send,
+ "send() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (recvfrom,
+ "recvfrom() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (sendto,
+ "sendto() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (setsockopt,
+ "setsockopt() used without including <sys/socket.h>");
+ _GL_WARN_ON_USE (shutdown,
+ "shutdown() used without including <sys/socket.h>");
# endif
-# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef select
-# define select select_used_without_including_sys_select_h
-# else
- _GL_WARN_ON_USE (select,
- "select() used without including <sys/select.h>");
-# endif
+# endif
+# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef select
+# define select select_used_without_including_sys_select_h
+# else
+ _GL_WARN_ON_USE (select,
+ "select() used without including <sys/select.h>");
# endif
# endif
#endif
+2011-07-09 Leo Liu <sdl.web@gmail.com>
+
+ * register.el (insert-register): Restore accidental change on
+ 2011-06-26. (Bug#9028)
+
+2011-07-09 Glenn Morris <rgm@gnu.org>
+
+ * subr.el (remq): Handle the empty list. (Bug#9024)
+
+2011-07-08 Andreas Schwab <schwab@linux-m68k.org>
+
+ * mail/sendmail.el (send-mail-function): No longer delay custom
+ initialization.
+ * custom.el (custom-initialize-delay): Doc fix.
+
+2011-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * abbrev.el (expand-abbrev): Try to preserve point (bug#5805).
+
+2011-07-08 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp-sh.el (tramp-sh-handle-start-file-process): Use a
+ human-friendly prompt.
+
+2011-07-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-bzr.el (vc-bzr-revision-keywords): Remove svn, it's only
+ provided by a particular plugin.
+
+2011-07-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * mail/sendmail.el (sendmail-query-once): If we aren't allowed to
+ save customizations (with "emacs -Q"), just set the variable
+ instead of erroring out.
+
+ * mail/smtpmail.el (smtpmail-query-smtp-server): Ditto.
+
+2011-07-08 Juri Linkov <juri@jurta.org>
+
+ * arc-mode.el (archive-zip-expunge, archive-zip-update)
+ (archive-zip-update-case): Use 7z if found by `executable-find'.
+ The order of searching the available programs is the same as in
+ `archive-zip-extract' (bug#8968).
+
+2011-07-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * menu-bar.el (menu-bar-line-wrapping-menu): Revert last change.
+ (menu-bar-options-menu): Tweak descriptions.
+
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * menu-bar.el (menu-bar-line-wrapping-menu): Make all the Options
+ menu items into verb phrases (bug#1421). Also refill to fit under
+ 80 columns.
+
+2011-07-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * info.el (info, Info-read-node-name-2, Info-read-node-name-1)
+ (Info-read-node-name): Doc fix (Bug#1084).
+
+ * thingatpt.el (forward-thing, bounds-of-thing-at-point)
+ (thing-at-point, beginning-of-thing, end-of-thing, in-string-p)
+ (end-of-sexp, beginning-of-sexp)
+ (thing-at-point-bounds-of-list-at-point, forward-whitespace)
+ (forward-symbol, forward-same-syntax, word-at-point)
+ (sentence-at-point): Doc fix (Bug#1144).
+
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * info.el (Info-mode-map): Remove S-TAB binding, since [backtab]
+ should cover it (bug#1281).
+
+ * cus-edit.el (custom-show): Mark as obsolete.
+
+ * net/network-stream.el (network-stream-open-starttls): If gnutls
+ negotiation fails, then possibly try again with a non-encrypted
+ connection (bug#9017).
+
+ * mail/smtpmail.el (smtpmail-stream-type): Note that `plain' can
+ be used.
+
+2011-07-07 Richard Stallman <rms@gnu.org>
+
+ * mail/rmail.el (rmail-next-error-move): Use `compilation-message'
+ property, and handle its changed format.
+ Look for the correct line number.
+ Use file's line contents (but not past first =) to find
+ correct line in message.
+
+2011-07-07 Kenichi Handa <handa@m17n.org>
+
+ * international/characters.el (build-unicode-category-table):
+ Delete it.
+ (unicode-category-table): Set it by unicode-property-table-internal.
+
+ * international/mule-cmds.el (char-code-property-alist): Move to
+ to src/chartab.c.
+ (get-char-code-property): Call unicode-property-table-internal to
+ load a file. Call get-unicode-property-internal where necessary.
+ (put-char-code-property): Call unicode-property-table-internal to
+ load a file. Call put-unicode-property-internal where necessary.
+ put-unicode-property-internal where necessary.
+ (char-code-property-description):
+ Call unicode-property-table-internal to load a file.
+
+ * international/charprop.el:
+ * international/uni-bidi.el:
+ * international/uni-category.el:
+ * international/uni-combining.el:
+ * international/uni-comment.el:
+ * international/uni-decimal.el:
+ * international/uni-decomposition.el:
+ * international/uni-digit.el:
+ * international/uni-lowercase.el:
+ * international/uni-mirrored.el:
+ * international/uni-name.el:
+ * international/uni-numeric.el:
+ * international/uni-old-name.el:
+ * international/uni-titlecase.el:
+ * international/uni-uppercase.el: Regenerate.
+
+ * loadup.el: Load international/charprop.el before
+ international/characters.
+
+2011-07-07 Chong Yidong <cyd@stupidchicken.com>
+
+ * window.el (next-buffer, previous-buffer): Signal an error if
+ called from a minibuffer window.
+
+ * bindings.el: Revert 2011-07-04 change.
+
+2011-07-06 Richard Stallman <rms@gnu.org>
+
+ * mail/rmailmm.el (rmail-mime-process): Use markers for buf positions.
+ (rmail-mime-insert-bulk, rmail-mime-insert-text):
+ Treat markers like ints.
+ (rmail-mime-entity): Doc fix.
+
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mail/smtpmail.el (smtpmail-default-smtp-server): Made into a
2011-07-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* emacs-lisp/lisp-mode.el (eval-defun-1): Update the documentation
- of faces when `M-C-x'-ing their definitions (bug#8378). Also
- clean up the code slightly.
+ of faces when `M-C-x'-ing their definitions (bug#8378).
+ Also clean up the code slightly.
* progmodes/grep.el (rgrep): Don't bind `process-connection-type',
because that makes the colours go away.
2011-07-06 Michael R. Mauger <mmaug@yahoo.com>
* progmodes/sql.el: Version 3.0
- (sql-product-alist): Added product :completion-object,
+ (sql-product-alist): Add product :completion-object,
:completion-column, and :statement attributes.
- (sql-mode-menu, sql-interactive-mode-map): Fixed List entries.
+ (sql-mode-menu, sql-interactive-mode-map): Fix List entries.
(sql-mode-syntax-table): Mark all punctuation.
- (sql-font-lock-keywords-builder): Temporarily removed fallback on
+ (sql-font-lock-keywords-builder): Temporarily remove fallback on
ansi keywords.
(sql-regexp-abbrev, sql-regexp-abbrev-list): New functions.
- (sql-mode-oracle-font-lock-keywords): Improved.
+ (sql-mode-oracle-font-lock-keywords): Improve.
(sql-oracle-show-reserved-words): New function for development.
(sql-product-font-lock): Simplify for source code buffers.
(sql-product-syntax-table, sql-product-font-lock-syntax-alist):
New functions.
(sql-highlight-product): Set product specific syntax table.
- (sql-mode-map): Added statement movement functions.
- (sql-ansi-statement-starters, sql-oracle-statement-starters): New
- variable.
+ (sql-mode-map): Add statement movement functions.
+ (sql-ansi-statement-starters, sql-oracle-statement-starters):
+ New variable.
(sql-statement-regexp, sql-beginning-of-statement)
(sql-end-of-statement, sql-signum): New functions.
- (sql-buffer-live-p, sql=find-sqli-buffer): Added CONNECTION
- parameter.
+ (sql-buffer-live-p, sql=find-sqli-buffer): Add CONNECTION parameter.
(sql-show-sqli-buffer): Bug fix.
(sql-interactive-mode): Store connection data as buffer local.
- (sql-connect): Added NEW-NAME parameter. Redesigned interaction
+ (sql-connect): Add NEW-NAME parameter. Redesign interaction
with sql-interactive-mode.
(sql-save-connection): Save buffer local settings.
- (sql-connection-menu-filter): Changed menu entry name.
+ (sql-connection-menu-filter): Change menu entry name.
(sql-product-interactive): Bug fix.
(sql-preoutput-hold): New variable.
(sql-interactive-remove-continuation-prompt): Bug fixes.
(sql-debug-redirect): New variable.
(sql-str-literal): New function.
(sql-redirect, sql-redirect-one, sql-redirect-value, sql-execute):
- Redesigned.
+ Redesign.
(sql-oracle-save-settings, sql-oracle-restore-settings)
(sql-oracle-list-all, sql-oracle-list-table): New functions.
(sql-completion-object, sql-completion-column)
buffer-saved-size and some allout state to not inhibit auto-saves
if there are no longer any plain-text topics pending encryption.
- (allout-next-topic-pending-encryption),
- (allout-encrypt-decrypted): No longer provide for exemption of the
- current topic.
+ (allout-next-topic-pending-encryption, allout-encrypt-decrypted):
+ No longer provide for exemption of the current topic.
2011-07-04 Juri Linkov <juri@jurta.org>
(destructuring-bind (&optional sym name wordstart wordend)
(abbrev--before-point)
(when sym
- (unless (or ;; executing-kbd-macro
- noninteractive
- (window-minibuffer-p (selected-window)))
- ;; Add an undo boundary, in case we are doing this for
- ;; a self-inserting command which has avoided making one so far.
- (undo-boundary))
- ;; Now sym is the abbrev symbol.
- (setq last-abbrev-text name)
- (setq last-abbrev sym)
- (setq last-abbrev-location wordstart)
- ;; If this abbrev has an expansion, delete the abbrev
- ;; and insert the expansion.
- (abbrev-insert sym name wordstart wordend)))))
+ (let ((startpos (copy-marker (point) t))
+ (endmark (copy-marker wordend t)))
+ (unless (or ;; executing-kbd-macro
+ noninteractive
+ (window-minibuffer-p (selected-window)))
+ ;; Add an undo boundary, in case we are doing this for
+ ;; a self-inserting command which has avoided making one so far.
+ (undo-boundary))
+ ;; Now sym is the abbrev symbol.
+ (setq last-abbrev-text name)
+ (setq last-abbrev sym)
+ (setq last-abbrev-location wordstart)
+ ;; If this abbrev has an expansion, delete the abbrev
+ ;; and insert the expansion.
+ (prog1
+ (abbrev-insert sym name wordstart wordend)
+ ;; Yuck!! If expand-abbrev is called with point slightly
+ ;; further than the end of the abbrev, move point back to
+ ;; where it started.
+ (if (and (> startpos endmark)
+ (= (point) endmark)) ;Obey skeletons that move point.
+ (goto-char startpos))))))))
(defun unexpand-abbrev ()
"Undo the expansion of the last abbrev that expanded.
;; Zip archive configuration
(defcustom archive-zip-extract
- (cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
- ((executable-find "7z") '("7z" "x" "-so"))
+ (cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
+ ((executable-find "7z") '("7z" "x" "-so"))
((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
- (t '("unzip" "-qq" "-c")))
+ (t '("unzip" "-qq" "-c")))
"Program and its options to run in order to extract a zip file member.
Extraction should happen to standard output. Archive and member name will
be added."
;; names.
(defcustom archive-zip-expunge
- (if (and (not (executable-find "zip"))
- (executable-find "pkzip"))
- '("pkzip" "-d")
- '("zip" "-d" "-q"))
+ (cond ((executable-find "zip") '("zip" "-d" "-q"))
+ ((executable-find "7z") '("7z" "d"))
+ ((executable-find "pkzip") '("pkzip" "-d"))
+ (t '("zip" "-d" "-q")))
"Program and its options to run in order to delete zip file members.
Archive and member names will be added."
:type '(list (string :tag "Program")
- (repeat :tag "Options"
- :inline t
- (string :format "%v")))
+ (repeat :tag "Options"
+ :inline t
+ (string :format "%v")))
:group 'archive-zip)
(defcustom archive-zip-update
- (if (and (not (executable-find "zip"))
- (executable-find "pkzip"))
- '("pkzip" "-u" "-P")
- '("zip" "-q"))
+ (cond ((executable-find "zip") '("zip" "-q"))
+ ((executable-find "7z") '("7z" "u"))
+ ((executable-find "pkzip") '("pkzip" "-u" "-P"))
+ (t '("zip" "-q")))
"Program and its options to run in order to update a zip file member.
Options should ensure that specified directory will be put into the zip
file. Archive and member name will be added."
:type '(list (string :tag "Program")
- (repeat :tag "Options"
- :inline t
- (string :format "%v")))
+ (repeat :tag "Options"
+ :inline t
+ (string :format "%v")))
:group 'archive-zip)
(defcustom archive-zip-update-case
- (if (and (not (executable-find "zip"))
- (executable-find "pkzip"))
- '("pkzip" "-u" "-P")
- '("zip" "-q" "-k"))
+ (cond ((executable-find "zip") '("zip" "-q" "-k"))
+ ((executable-find "7z") '("7z" "u"))
+ ((executable-find "pkzip") '("pkzip" "-u" "-P"))
+ (t '("zip" "-q" "-k")))
"Program and its options to run in order to update a case fiddled zip member.
Options should ensure that specified directory will be put into the zip file.
Archive and member name will be added."
:type '(list (string :tag "Program")
- (repeat :tag "Options"
- :inline t
- (string :format "%v")))
+ (repeat :tag "Options"
+ :inline t
+ (string :format "%v")))
:group 'archive-zip)
(defcustom archive-zip-case-fiddle t
(define-key map [up] 'previous-history-element)
(define-key map "\es" 'next-matching-history-element)
(define-key map "\er" 'previous-matching-history-element)
- (define-key map [remap next-buffer] 'ignore)
- (define-key map [remap previous-buffer] 'ignore)
;; Override the global binding (which calls indent-relative via
;; indent-for-tab-command). The alignment that indent-relative tries to
;; do doesn't make much sense here since the prompt messes it up.
;; We want simple widgets to be displayed by default, but complex
;; widgets to be hidden.
+;; This widget type is obsolete as of Emacs 24.1.
(widget-put (get 'item 'widget-type) :custom-show t)
(widget-put (get 'editable-field 'widget-type)
:custom-show (lambda (_widget value)
(setq widget nil)))))
(widget-setup))
+(make-obsolete 'custom-show "this widget type is no longer supported." "24.1")
(defun custom-show (widget value)
"Non-nil if WIDGET should be shown with VALUE by default."
(let ((show (widget-get widget :custom-show)))
For variables in preloaded files, you can simply use this
function for the :initialize property. For autoloaded variables,
you will also need to add an autoload stanza calling this
-function, and another one setting the standard-value property.
-See `send-mail-function' in sendmail.el for an example."
+function, and another one setting the standard-value property."
+ ;; No longer true:
+ ;; "See `send-mail-function' in sendmail.el for an example."
+
;; Until the var is actually initialized, it is kept unbound.
;; This seemed to be at least as good as setting it to an arbitrary
;; value like nil (evaluating `value' is not an option because it
;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
-;;;;;; dired-diff) "dired-aux" "dired-aux.el" "d7b197829c8d456cc5bc6c5fdab7c4b0")
+;;;;;; dired-diff) "dired-aux" "dired-aux.el" "198ca311b49f0b6354f915502bba4ab6")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
;;;***
\f
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;; "dired-x" "dired-x.el" "cdeb2935dc1d33819b12981ba5272073")
+;;;;;; "dired-x" "dired-x.el" "90459fb5998296fc67986945701b2bfc")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
+2011-07-08 Daiki Ueno <ueno@unixuser.org>
+
+ * plstore.el: Revert the editing feature since it is not urgent.
+ (plstore-mode, plstore-mode-toggle-display, plstore-mode-original)
+ (plstore-mode-decoded): Remove.
+
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-msg.el (gnus-bug): Don't insert user variables. It usually
+ isn't very interesting any more, and it leaks potentially secret data.
+ (gnus-debug): Removed.
+
+ * gnus-art.el (gnus-ignored-headers): Removed obsolete and non-working
+ use of :custom-show.
+
+2011-07-07 Daiki Ueno <ueno@unixuser.org>
+
+ * plstore.el: Add documentation.
+ (plstore-mode): New mode to edit plstore file.
+ (plstore-mode-toggle-display, plstore-mode-original)
+ (plstore-mode-decoded): New command.
+ (plstore--encode, plstore--decode, plstore--write-contents-functions)
+ (plstore--insert-buffer, plstore--make): New function.
+ (plstore-open, plstore-save): Simplify by using them.
+
2011-07-06 Glenn Morris <rgm@gnu.org>
* gnus-group.el (gnus-read-ephemeral-emacs-bug-group): Silence compiler.
2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-group.el (gnus-read-ephemeral-bug-group): Allow fetching several
+ bug reports at once.
+
* nnimap.el (nnimap-request-scan): Say that splitting has finished.
2011-07-04 Katsumi Yamaoka <yamaoka@jpl.org>
"*All headers that start with this regexp will be hidden.
This variable can also be a list of regexps of headers to be ignored.
If `gnus-visible-headers' is non-nil, this variable will be ignored."
- :type '(choice :custom-show nil
- regexp
+ :type '(choice regexp
(repeat regexp))
:group 'gnus-article-hiding)
(when gnus-bug-create-help-buffer
(push `(gnus-bug-kill-buffer) message-send-actions))
(goto-char (point-min))
- (re-search-forward (concat "^" (regexp-quote mail-header-separator) "$"))
- (forward-line 1)
- (insert (format "Package: %s\n" gnus-bug-package))
- (insert (format "Version: %s\n" (gnus-continuum-version)))
- (insert "\n")
+ (message-goto-body)
+ (insert "\n\n\n\n\n")
(insert (gnus-version) "\n"
(emacs-version) "\n")
(when (and (boundp 'nntp-server-type)
(stringp nntp-server-type))
(insert nntp-server-type))
- (insert "\n\n\n\n\n")
- (let (text)
- (with-current-buffer (gnus-get-buffer-create " *gnus environment info*")
- (erase-buffer)
- (gnus-debug)
- (setq text (buffer-string)))
- (insert "<#part type=application/emacs-lisp "
- "disposition=inline description=\"User settings\">\n"
- text
- "\n<#/part>"))
(goto-char (point-min))
(search-forward "Subject: " nil t)
(message "")))
(with-current-buffer buffer
(message-yank-buffer gnus-article-buffer))))
-(defun gnus-debug ()
- "Attempts to go through the Gnus source file and report what variables have been changed.
-The source file has to be in the Emacs load path."
- (interactive)
- (let ((files gnus-debug-files)
- (point (point))
- file expr olist sym)
- (gnus-message 4 "Please wait while we snoop your variables...")
- (sit-for 0)
- ;; Go through all the files looking for non-default values for variables.
- (with-current-buffer (gnus-get-buffer-create " *gnus bug info*")
- (while files
- (erase-buffer)
- (when (and (setq file (locate-library (pop files)))
- (file-exists-p file))
- (insert-file-contents file)
- (goto-char (point-min))
- (if (not (re-search-forward "^;;* *Internal variables" nil t))
- (gnus-message 4 "Malformed sources in file %s" file)
- (narrow-to-region (point-min) (point))
- (goto-char (point-min))
- (while (setq expr (ignore-errors (read (current-buffer))))
- (ignore-errors
- (and (or (eq (car expr) 'defvar)
- (eq (car expr) 'defcustom))
- (stringp (nth 3 expr))
- (not (memq (nth 1 expr) gnus-debug-exclude-variables))
- (or (not (boundp (nth 1 expr)))
- (not (equal (eval (nth 2 expr))
- (symbol-value (nth 1 expr)))))
- (push (nth 1 expr) olist)))))))
- (kill-buffer (current-buffer)))
- (when (setq olist (nreverse olist))
- (insert "------------------ Environment follows ------------------\n\n"))
- (while olist
- (if (boundp (car olist))
- (ignore-errors
- (gnus-pp
- `(setq ,(car olist)
- ,(if (or (consp (setq sym (symbol-value (car olist))))
- (and (symbolp sym)
- (not (or (eq sym nil)
- (eq sym t)))))
- (list 'quote (symbol-value (car olist)))
- (symbol-value (car olist))))))
- (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n"))
- (setq olist (cdr olist)))
- (insert "\n\n")
- ;; Remove any control chars - they seem to cause trouble for some
- ;; mailers. (Byte-compiled output from the stuff above.)
- (goto-char point)
- (while (re-search-forward (mm-string-to-multibyte
- "[\000-\010\013-\037\200-\237]") nil t)
- (replace-match (format "\\%03o" (string-to-char (match-string 0)))
- t t))))
-
;;; Treatment of rejected articles.
;;; Bounced mail.
-;;; plstore.el --- searchable, partially encrypted, persistent plist store -*- lexical-binding: t -*-
+;;; plstore.el --- secure plist store -*- lexical-binding: t -*-
;; Copyright (C) 2011 Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;;; Commentary
+;; Plist based data store providing search and partial encryption.
+;;
;; Creating:
;;
+;; ;; Open a new store associated with ~/.emacs.d/auth.plist.
;; (setq store (plstore-open (expand-file-name "~/.emacs.d/auth.plist")))
+;; ;; Both `:host' and `:port' are public property.
;; (plstore-put store "foo" '(:host "foo.example.org" :port 80) nil)
+;; ;; No encryption will be needed.
;; (plstore-save store)
-;; ;; :user property is secret
+;;
+;; ;; `:user' is marked as secret.
;; (plstore-put store "bar" '(:host "bar.example.org") '(:user "test"))
-;; (plstore-put store "baz" '(:host "baz.example.org") '(:user "test"))
-;; (plstore-save store) ;<= will ask passphrase via GPG
+;; ;; `:password' is marked as secret.
+;; (plstore-put store "baz" '(:host "baz.example.org") '(:password "test"))
+;; ;; Those secret properties are encrypted together.
+;; (plstore-save store)
+;;
+;; ;; Kill the buffer visiting ~/.emacs.d/auth.plist.
;; (plstore-close store)
;;
;; Searching:
;;
;; (setq store (plstore-open (expand-file-name "~/.emacs.d/auth.plist")))
+;;
+;; ;; As the entry "foo" associated with "foo.example.org" has no
+;; ;; secret properties, no need to decryption.
;; (plstore-find store '(:host ("foo.example.org")))
-;; (plstore-find store '(:host ("bar.example.org"))) ;<= will ask passphrase via GPG
+;;
+;; ;; As the entry "bar" associated with "bar.example.org" has a
+;; ;; secret property `:user', Emacs tries to decrypt the secret (and
+;; ;; thus you will need to input passphrase).
+;; (plstore-find store '(:host ("bar.example.org")))
+;;
+;; ;; While the entry "baz" associated with "baz.example.org" has also
+;; ;; a secret property `:password', it is encrypted together with
+;; ;; `:user' of "bar", so no need to decrypt the secret.
+;; (plstore-find store '(:host ("bar.example.org")))
+;;
;; (plstore-close store)
;;
+;; Editing:
+;;
+;; Currently not supported but in the future plstore will provide a
+;; major mode to edit PLSTORE files.
;;; Code:
(defun plstore--get-merged-alist (this)
(aref this 4))
-(defun plstore--set-file (this file)
- (aset this 0 file))
+(defun plstore--set-buffer (this buffer)
+ (aset this 0 buffer))
(defun plstore--set-alist (this plist)
(aset this 1 plist))
(defun plstore-get-file (this)
(buffer-file-name (plstore--get-buffer this)))
+(defun plstore--make (&optional buffer alist encrypted-data secret-alist
+ merged-alist)
+ (vector buffer alist encrypted-data secret-alist merged-alist))
+
(defun plstore--init-from-buffer (plstore)
(goto-char (point-min))
(when (looking-at ";;; public entries")
;;;###autoload
(defun plstore-open (file)
"Create a plstore instance associated with FILE."
- (with-current-buffer (find-file-noselect file)
- ;; make the buffer invisible from user
- (rename-buffer (format " plstore %s" (buffer-file-name)))
- (let ((store (vector
- (current-buffer)
- nil ;plist (plist)
- nil ;encrypted data (string)
- nil ;secret plist (plist)
- nil ;merged plist (plist)
- )))
+ (let* ((filename (file-truename file))
+ (buffer (or (find-buffer-visiting filename)
+ (generate-new-buffer (format " plstore %s" filename))))
+ (store (plstore--make buffer)))
+ (with-current-buffer buffer
+ ;; In the future plstore will provide a major mode called
+ ;; `plstore-mode' to edit PLSTORE files.
+ (if (eq major-mode 'plstore-mode)
+ (error "%s is opened for editing; kill the buffer first" file))
+ (erase-buffer)
+ (condition-case nil
+ (insert-file-contents-literally file)
+ (error))
+ (setq buffer-file-name (file-truename file))
+ (set-buffer-modified-p nil)
(plstore--init-from-buffer store)
store)))
(delq entry (plstore--get-merged-alist plstore))))))
(defvar pp-escape-newlines)
+(defun plstore--insert-buffer (plstore)
+ (insert ";;; public entries -*- mode: plstore -*- \n"
+ (pp-to-string (plstore--get-alist plstore)))
+ (if (plstore--get-secret-alist plstore)
+ (let ((context (epg-make-context 'OpenPGP))
+ (pp-escape-newlines nil)
+ (recipients
+ (cond
+ ((listp plstore-encrypt-to) plstore-encrypt-to)
+ ((stringp plstore-encrypt-to) (list plstore-encrypt-to))))
+ cipher)
+ (epg-context-set-armor context t)
+ (epg-context-set-passphrase-callback
+ context
+ (cons #'plstore-passphrase-callback-function
+ plstore))
+ (setq cipher (epg-encrypt-string
+ context
+ (pp-to-string
+ (plstore--get-secret-alist plstore))
+ (if (or (eq plstore-select-keys t)
+ (and (null plstore-select-keys)
+ (not (local-variable-p 'plstore-encrypt-to
+ (current-buffer)))))
+ (epa-select-keys
+ context
+ "Select recipents for encryption.
+If no one is selected, symmetric encryption will be performed. "
+ recipients)
+ (if plstore-encrypt-to
+ (epg-list-keys context recipients)))))
+ (goto-char (point-max))
+ (insert ";;; secret entries\n" (pp-to-string cipher)))))
+
(defun plstore-save (plstore)
"Save the contents of PLSTORE associated with a FILE."
(with-current-buffer (plstore--get-buffer plstore)
(erase-buffer)
- (insert ";;; public entries -*- mode: emacs-lisp -*- \n"
- (pp-to-string (plstore--get-alist plstore)))
- (if (plstore--get-secret-alist plstore)
- (let ((context (epg-make-context 'OpenPGP))
- (pp-escape-newlines nil)
- (recipients
- (cond
- ((listp plstore-encrypt-to) plstore-encrypt-to)
- ((stringp plstore-encrypt-to) (list plstore-encrypt-to))))
- cipher)
- (epg-context-set-armor context t)
- (epg-context-set-passphrase-callback
- context
- (cons #'plstore-passphrase-callback-function
- plstore))
- (setq cipher (epg-encrypt-string
- context
- (pp-to-string
- (plstore--get-secret-alist plstore))
- (if (or (eq plstore-select-keys t)
- (and (null plstore-select-keys)
- (not (local-variable-p 'plstore-encrypt-to
- (current-buffer)))))
- (epa-select-keys
- context
- "Select recipents for encryption.
-If no one is selected, symmetric encryption will be performed. "
- recipients)
- (if plstore-encrypt-to
- (epg-list-keys context recipients)))))
- (goto-char (point-max))
- (insert ";;; secret entries\n" (pp-to-string cipher))))
+ (plstore--insert-buffer plstore)
(save-buffer)))
(provide 'plstore)
Optional argument FILE-OR-NODE specifies the file to examine;
the default is the top-level directory of Info.
Called from a program, FILE-OR-NODE may specify an Info node of the form
-`(FILENAME)NODENAME'.
+\"(FILENAME)NODENAME\".
Optional argument BUFFER specifies the Info buffer name;
the default buffer name is *info*. If BUFFER exists,
just switch to BUFFER. Otherwise, create a new buffer
(defvar Info-read-node-completion-table)
(defun Info-read-node-name-2 (dirs suffixes string pred action)
- "Virtual completion table for file names input in Info node names."
+ "Internal function used to complete Info node names.
+Return a completion table for Info files---the FILENAME part of a
+node named \"(FILENAME)NODENAME\". DIRS is a list of Info
+directories to search if FILENAME is not absolute; SUFFIXES is a
+list of valid filename suffixes for Info files. See
+`try-completion' for a description of the remaining arguments."
(setq suffixes (remove "" suffixes))
(when (file-name-absolute-p string)
(setq dirs (list (file-name-directory string))))
(push (if string-dir (concat string-dir file) file) names)))))
(complete-with-action action names string pred)))
-;; This function is used as the "completion table" while reading a node name.
-;; It does completion using the alist in Info-read-node-completion-table
-;; unless STRING starts with an open-paren.
(defun Info-read-node-name-1 (string predicate code)
+ "Internal function used by `Info-read-node-name'.
+See `completing-read' for a description of arguments and usage."
(cond
;; First complete embedded file names.
((string-match "\\`([^)]*\\'" string)
(substring string 1)
predicate
code))
-
;; If a file name was given, then any node is fair game.
((string-match "\\`(" string)
(cond
code Info-read-node-completion-table string predicate))))
;; Arrange to highlight the proper letters in the completion list buffer.
-
-
(defun Info-read-node-name (prompt)
+ "Read an Info node name with completion, prompting with PROMPT.
+A node name can have the form \"NODENAME\", referring to a node
+in the current Info file, or \"(FILENAME)NODENAME\"."
(let* ((completion-ignore-case t)
(Info-read-node-completion-table (Info-build-node-completions))
(nodename (completing-read prompt 'Info-read-node-name-1 nil t)))
(define-key map "\C-m" 'Info-follow-nearest-node)
(define-key map "\t" 'Info-next-reference)
(define-key map "\e\t" 'Info-prev-reference)
- (define-key map [(shift tab)] 'Info-prev-reference)
(define-key map [backtab] 'Info-prev-reference)
(define-key map "1" 'Info-nth-menu-item)
(define-key map "2" 'Info-nth-menu-item)
\f
;;; Setting unicode-category-table.
-;; This macro is to build unicode-category-table at compile time so
-;; that C code can access the table efficiently.
-(defmacro build-unicode-category-table ()
- (let ((table (make-char-table 'unicode-category-table nil)))
- (dotimes (i #x110000)
- (if (or (< i #xD800)
- (and (>= i #xF900) (< i #x30000))
- (and (>= i #xE0000) (< i #xE0200)))
- (aset table i (get-char-code-property i 'general-category))))
- (set-char-table-range table '(#xE000 . #xF8FF) 'Co)
- (set-char-table-range table '(#xF0000 . #xFFFFD) 'Co)
- (set-char-table-range table '(#x100000 . #x10FFFD) 'Co)
- (optimize-char-table table 'eq)
- table))
-
-(setq unicode-category-table (build-unicode-category-table))
+(setq unicode-category-table
+ (unicode-property-table-internal 'general-category))
(map-char-table #'(lambda (key val)
(if (and val
(or (and (/= (aref (symbol-name val) 0) ?M)
-;; Copyright (C) 1991-2010 Unicode, Inc.
-;; This file was generated from the Unicode data file at
-;; http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.
-;; See lisp/international/README for the copyright and permission notice.
-
+;; Automatically generated by unidata-gen.el.
;; FILE: uni-name.el
(define-char-code-property 'name "uni-name.el"
"Unicode character name.
;; FILE: uni-mirrored.el
(define-char-code-property 'mirrored "uni-mirrored.el"
"Unicode bidi mirrored flag.
-Property value is a symbol `Y' or `N'.")
+Property value is a symbol `Y' or `N'. See also the property `mirroring'.")
;; FILE: uni-old-name.el
(define-char-code-property 'old-name "uni-old-name.el"
"Unicode old names as published in Unicode 1.0.
(define-char-code-property 'titlecase "uni-titlecase.el"
"Unicode simple titlecase mapping.
Property value is a character.")
+;; FILE: uni-mirrored.el
+(define-char-code-property 'mirroring "uni-mirrored.el"
+ "Unicode bidi-mirroring characters.
+Property value is a character that has the corresponding mirroring image,
+or nil for non-mirrored character.")
;; Local Variables:
;; coding: utf-8
;; no-byte-compile: t
\f
;;; Character property
-;; Each element has the form (PROP . TABLE).
-;; PROP is a symbol representing a character property.
-;; TABLE is a char-table containing the property value for each character.
-;; TABLE may be a name of file to load to build a char-table.
-;; Don't modify this variable directly but use `define-char-code-property'.
-
-(defvar char-code-property-alist nil
- "Alist of character property name vs char-table containing property values.
-Internal use only.")
-
(put 'char-code-property-table 'char-table-extra-slots 5)
(defun define-char-code-property (name table &optional docstring)
(defun get-char-code-property (char propname)
"Return the value of CHAR's PROPNAME property."
- (let ((slot (assq propname char-code-property-alist)))
- (if slot
- (let (table value func)
- (if (stringp (cdr slot))
- (load (cdr slot) nil t))
- (setq table (cdr slot)
- value (aref table char)
- func (char-table-extra-slot table 1))
+ (let ((table (unicode-property-table-internal propname)))
+ (if table
+ (let ((func (char-table-extra-slot table 1)))
(if (functionp func)
- (setq value (funcall func char value table)))
- value)
+ (funcall func char (aref table char) table)
+ (get-unicode-property-internal table char)))
(plist-get (aref char-code-property-table char) propname))))
(defun put-char-code-property (char propname value)
"Store CHAR's PROPNAME property with VALUE.
It can be retrieved with `(get-char-code-property CHAR PROPNAME)'."
- (let ((slot (assq propname char-code-property-alist)))
- (if slot
- (let (table func)
- (if (stringp (cdr slot))
- (load (cdr slot) nil t))
- (setq table (cdr slot)
- func (char-table-extra-slot table 2))
+ (let ((table (unicode-property-table-internal propname)))
+ (if table
+ (let ((func (char-table-extra-slot table 2)))
(if (functionp func)
(funcall func char value table)
- (aset table char value)))
+ (put-unicode-property-internal table char value)))
(let* ((plist (aref char-code-property-table char))
(x (plist-put plist propname value)))
(or (eq x plist)
(defun char-code-property-description (prop value)
"Return a description string of character property PROP's value VALUE.
If there's no description string for VALUE, return nil."
- (let ((slot (assq prop char-code-property-alist)))
- (if slot
- (let (table func)
- (if (stringp (cdr slot))
- (load (cdr slot) nil t))
- (setq table (cdr slot)
- func (char-table-extra-slot table 3))
+ (let ((table (unicode-property-table-internal prop)))
+ (if table
+ (let ((func (char-table-extra-slot table 3)))
(if (functionp func)
(funcall func value))))))
;; multilingual text.
(load "international/mule-cmds")
(load "case-table")
-(load "international/characters")
-(load "composite")
;; This file doesn't exist when building a development version of Emacs
;; from the repository. It is generated just after temacs is built.
(load "international/charprop.el" t)
+(load "international/characters")
+(load "composite")
;; Load language-specific files.
(load "language/chinese")
MSG-POS is a marker pointing at the error message in the grep buffer.
BAD-MARKER is a marker that ought to point at where to move to,
but probably is garbage."
- (let* ((message (car (get-text-property msg-pos 'message (marker-buffer msg-pos))))
- (column (car message))
- (linenum (cadr message))
+
+ (let* ((message-loc (compilation--message->loc
+ (get-text-property msg-pos 'compilation-message
+ (marker-buffer msg-pos))))
+ (column (car message-loc))
+ (linenum (cadr message-loc))
+ line-text
pos
msgnum msgbeg msgend
header-field
(save-excursion
;; Find the line that the error message points at.
(goto-char (point-min))
- (forward-line linenum)
+ (forward-line (1- linenum))
(setq pos (point))
- ;; Find which message that's in,
+ ;; Find the text at the start of the line,
+ ;; before the first = sign.
+ ;; This text has a good chance of being also in the
+ ;; decoded message.
+ (save-excursion
+ (skip-chars-forward "^=\n")
+ (setq line-text (buffer-substring pos (point))))
+
+ ;; Find which message this position is in,
;; and the limits of that message.
(setq msgnum (rmail-what-message pos))
(setq msgbeg (rmail-msgbeg msgnum))
(rmail-show-message msgnum)
;; Move to the right position within the displayed message.
+ ;; Or at least try. The decoded message's lines may not
+ ;; correspond to the lines in the inbox file.
+ (goto-char (point-min))
(if header-field
- (re-search-forward (concat "^" (regexp-quote header-field)) nil t)
- (search-forward "\n\n" nil t))
- (forward-line line-number-within)
- (forward-char column)))
+ (progn
+ (re-search-forward (concat "^" (regexp-quote header-field)) nil t)
+ (forward-line line-number-within))
+ (search-forward "\n\n" nil t)
+ (if (re-search-forward (concat "^" (regexp-quote line-text)) nil t)
+ (goto-char (match-beginning 0))))
+ (if (eobp)
+ ;; If the decoded message doesn't have enough lines,
+ ;; go to the beginning rather than the end.
+ (goto-char (point-min))
+ ;; Otherwise, go to the right column.
+ (if column
+ (forward-char column)))))
(defun rmail-what-message (&optional pos)
"Return message number POS (or point) is in."
;;;***
\f
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "30ab95e291380f184dff5fa6cde75520")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "a7d3e7205efa4e20ca9038c9b260ce83")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
raw: displayed by the raw MIME data (for the header and body only)
HEADER and BODY are vectors [BEG END DISPLAY-FLAG], where BEG and
-END specify the region of the header or body lines in RMAIL's
-data (mbox) buffer, and DISPLAY-FLAG non-nil means that the
+END are markers that specify the region of the header or body lines
+in RMAIL's data (mbox) buffer, and DISPLAY-FLAG non-nil means that the
header or body is, by default, displayed by the decoded
presentation form.
(beg (point))
(segment (rmail-mime-entity-segment (point) entity)))
- (or (integerp (aref body 0))
+ (or (integerp (aref body 0)) (markerp (aref body 0))
(let ((data (buffer-string)))
(aset body 0 data)
(delete-region (point-min) (point-max))))
(segment (rmail-mime-entity-segment (point) entity))
beg data size)
- (if (integerp (aref body 0))
+ (if (or (integerp (aref body 0)) (markerp (aref body 0)))
(setq data entity
size (car bulk-data))
(if (stringp (aref body 0))
(if parse-tag
(let* ((is-inline (string= (car content-disposition) "inline"))
- (header (vector (point-min) end nil))
+ (hdr-end (copy-marker end))
+ (header (vector (point-min-marker) hdr-end nil))
(tagline (vector parse-tag (cons nil nil) t))
- (body (vector end (point-max) is-inline))
+ (body (vector hdr-end (point-max-marker) is-inline))
(new (vector (aref header 2) (aref tagline 2) (aref body 2)))
children handler entity)
(cond ((string-match "multipart/.*" (car content-type))
;; Hide headers and handle the part.
(put-text-property (point-min) (point-max) 'rmail-mime-entity
(rmail-mime-entity
- content-type content-disposition
- content-transfer-encoding
- (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw))
- (vector nil nil 'raw) (vector "" (cons nil nil) nil)
- (vector nil nil 'raw) nil nil))
+ content-type content-disposition
+ content-transfer-encoding
+ (vector (vector 'raw nil 'raw) (vector 'raw nil 'raw))
+ (vector nil nil 'raw) (vector "" (cons nil nil) nil)
+ (vector nil nil 'raw) nil nil))
(save-restriction
(cond ((string= (car content-type) "message/rfc822")
(narrow-to-region end (point-max)))
:group 'sendmail
:version "23.1")
-;; Prevent problems with `window-system' not having the correct value
-;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the
-;; standard value.
-;;;###autoload
-(put 'send-mail-function 'standard-value
- ;; MS-Windows can access the clipboard even under -nw.
- '('sendmail-query-once))
-
;; Useful to set in site-init.el
;;;###autoload
(defcustom send-mail-function 'sendmail-query-once
(function-item feedmail-send-it :tag "Use Feedmail package")
(function-item mailclient-send-it :tag "Use Mailclient package")
function)
- :initialize 'custom-initialize-delay
:version "24.1"
:group 'sendmail)
(defvar sendmail-query-once-function 'query
"Either a function to send email, or the symbol `query'.")
+(autoload 'custom-file "cus-edit")
+
;;;###autoload
(defun sendmail-query-once ()
"Send an email via `sendmail-query-once-function'.
If `sendmail-query-once-function' is `query', ask the user what
function to use, and then save that choice."
(when (equal sendmail-query-once-function 'query)
- (let ((default
- (cond
- ((or (and window-system (eq system-type 'darwin))
- (eq system-type 'windows-nt))
- 'mailclient-send-it)
- ((and sendmail-program
- (executable-find sendmail-program))
- 'sendmail-send-it))))
- (customize-save-variable
- 'sendmail-query-once-function
- (if (or (not default)
- ;; We have detected no OS-level mail senders, or we
- ;; have already configured smtpmail, so we use the
- ;; internal SMTP service.
- (and (boundp 'smtpmail-smtp-server)
- smtpmail-smtp-server))
- 'smtpmail-send-it
- ;; Query the user.
- (unwind-protect
- (progn
- (pop-to-buffer "*Mail Help*")
- (erase-buffer)
- (insert "Sending mail from Emacs hasn't been set up yet.\n\n"
- "Type `y' to configure outgoing SMTP, or `n' to use\n"
- "the default mail sender on your system.\n\n"
- "To change this again at a later date, customize the\n"
- "`send-mail-function' variable.\n")
- (goto-char (point-min))
- (if (y-or-n-p "Configure outgoing SMTP in Emacs? ")
- 'smtpmail-send-it
- default))
- (kill-buffer (current-buffer)))))))
+ (let* ((default
+ (cond
+ ((or (and window-system (eq system-type 'darwin))
+ (eq system-type 'windows-nt))
+ 'mailclient-send-it)
+ ((and sendmail-program
+ (executable-find sendmail-program))
+ 'sendmail-send-it)))
+ (function
+ (if (or (not default)
+ ;; We have detected no OS-level mail senders, or we
+ ;; have already configured smtpmail, so we use the
+ ;; internal SMTP service.
+ (and (boundp 'smtpmail-smtp-server)
+ smtpmail-smtp-server))
+ 'smtpmail-send-it
+ ;; Query the user.
+ (unwind-protect
+ (progn
+ (pop-to-buffer "*Mail Help*")
+ (erase-buffer)
+ (insert "Sending mail from Emacs hasn't been set up yet.\n\n"
+ "Type `y' to configure outgoing SMTP, or `n' to use\n"
+ "the default mail sender on your system.\n\n"
+ "To change this again at a later date, customize the\n"
+ "`send-mail-function' variable.\n")
+ (goto-char (point-min))
+ (if (y-or-n-p "Configure outgoing SMTP in Emacs? ")
+ 'smtpmail-send-it
+ default))
+ (kill-buffer (current-buffer))))))
+ (if (ignore-errors (custom-file))
+ (customize-save-variable 'sendmail-query-once-function function)
+ (setq sendmail-query-once-function function))))
(funcall sendmail-query-once-function))
-;;;###autoload(custom-initialize-delay 'send-mail-function nil)
-
;;;###autoload
(defcustom mail-header-separator (purecopy "--text follows this line--")
"Line used to separate headers from text in messages being composed."
(defcustom smtpmail-stream-type nil
"Connection type SMTP connections.
-This may be either nil (plain connection) or `starttls' (use the
-starttls mechanism to turn on TLS security after opening the
-stream)."
+This may be either nil (possibly upgraded to STARTTLS if
+possible), or `starttls' (refuse to send if STARTTLS isn't
+available), or `plain' (never use STARTTLS).."
:version "24.1"
:group 'smtpmail
- :type '(choice (const :tag "Plain" nil)
- (const starttls)))
+ :type '(choice (const :tag "Possibly upgrade to STARTTLS" nil)
+ (const :tag "Always use STARTTLS" starttls)
+ (const :tag "Never use STARTTLS" plain)))
(defcustom smtpmail-sendto-domain nil
"Local domain name without a host name.
(defun smtpmail-response-text (response)
(mapconcat 'identity (cdr response) "\n"))
+(autoload 'custom-file "cus-edit")
+
(defun smtpmail-query-smtp-server ()
(let ((server (read-string "Outgoing SMTP mail server: "))
(ports '(587 "smtp"))
(setq port (pop ports)))
(when (setq stream (ignore-errors
(open-network-stream "smtp" nil server port)))
- (customize-save-variable 'smtpmail-smtp-server server)
- (customize-save-variable 'smtpmail-smtp-service port)
+ (if (ignore-errors (custom-file))
+ (progn
+ (customize-save-variable 'smtpmail-smtp-server server)
+ (customize-save-variable 'smtpmail-smtp-service port))
+ (setq smtpmail-smtp-server server
+ smtpmail-smtp-service port))
(delete-process stream)))
(unless smtpmail-smtp-server
(error "Couldn't contact an SMTP server"))))
(let ((menu (make-sparse-keymap "Line Wrapping")))
(define-key menu [word-wrap]
- `(menu-item ,(purecopy "Word Wrap (Visual Line mode)")
- (lambda ()
- (interactive)
- (unless visual-line-mode
- (visual-line-mode 1))
- (message ,(purecopy "Visual-Line mode enabled")))
- :help ,(purecopy "Wrap long lines at word boundaries")
- :button (:radio . (and (null truncate-lines)
- (not (truncated-partial-width-window-p))
- word-wrap))
- :visible (menu-bar-menu-frame-live-and-visible-p)))
+ `(menu-item
+ ,(purecopy "Word Wrap (Visual Line mode)")
+ (lambda ()
+ (interactive)
+ (unless visual-line-mode
+ (visual-line-mode 1))
+ (message ,(purecopy "Visual-Line mode enabled")))
+ :help ,(purecopy "Wrap long lines at word boundaries")
+ :button (:radio . (and (null truncate-lines)
+ (not (truncated-partial-width-window-p))
+ word-wrap))
+ :visible (menu-bar-menu-frame-live-and-visible-p)))
(define-key menu [truncate]
`(menu-item ,(purecopy "Truncate Long Lines")
menu-bar-separator)
(define-key menu [blink-cursor-mode]
- (menu-bar-make-mm-toggle blink-cursor-mode
- "Blinking Cursor"
- "Whether the cursor blinks (Blink Cursor mode)"))
+ (menu-bar-make-mm-toggle
+ blink-cursor-mode
+ "Blink Cursor"
+ "Whether the cursor blinks (Blink Cursor mode)"))
(define-key menu [cursor-separator]
menu-bar-separator)
(define-key menu [save-place]
- (menu-bar-make-toggle toggle-save-place-globally save-place
- "Save Place in Files between Sessions"
- "Saving place in files %s"
- "Visit files of previous session when restarting Emacs"
- (require 'saveplace)
- ;; Do it by name, to avoid a free-variable
- ;; warning during byte compilation.
- (set-default
- 'save-place (not (symbol-value 'save-place)))))
+ (menu-bar-make-toggle
+ toggle-save-place-globally save-place
+ "Save Place in Files between Sessions"
+ "Saving place in files %s"
+ "Visit files of previous session when restarting Emacs"
+ (require 'saveplace)
+ ;; Do it by name, to avoid a free-variable
+ ;; warning during byte compilation.
+ (set-default
+ 'save-place (not (symbol-value 'save-place)))))
(define-key menu [uniquify]
- (menu-bar-make-toggle toggle-uniquify-buffer-names uniquify-buffer-name-style
- "Use Directory Names in Buffer Names"
- "Directory name in buffer names (uniquify) %s"
- "Uniquify buffer names by adding parent directory names"
- (require 'uniquify)
- (setq uniquify-buffer-name-style
- (if (not uniquify-buffer-name-style)
- 'forward))))
+ (menu-bar-make-toggle
+ toggle-uniquify-buffer-names uniquify-buffer-name-style
+ "Use Directory Names in Buffer Names"
+ "Directory name in buffer names (uniquify) %s"
+ "Uniquify buffer names by adding parent directory names"
+ (require 'uniquify)
+ (setq uniquify-buffer-name-style
+ (if (not uniquify-buffer-name-style)
+ 'forward))))
(define-key menu [edit-options-separator]
menu-bar-separator)
(define-key menu [cua-mode]
- (menu-bar-make-mm-toggle cua-mode
- "C-x/C-c/C-v Cut and Paste (CUA)"
- "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"
- (:visible (or (not (boundp 'cua-enable-cua-keys))
- cua-enable-cua-keys))))
+ (menu-bar-make-mm-toggle
+ cua-mode
+ "Use CUA Keys (Cut/Paste with C-x/C-c/C-v)"
+ "Use C-z/C-x/C-c/C-v keys for undo/cut/copy/paste"
+ (:visible (or (not (boundp 'cua-enable-cua-keys))
+ cua-enable-cua-keys))))
(define-key menu [cua-emulation-mode]
- (menu-bar-make-mm-toggle cua-mode
- "Shift movement mark region (CUA)"
- "Use shifted movement keys to set and extend the region"
- (:visible (and (boundp 'cua-enable-cua-keys)
- (not cua-enable-cua-keys)))))
+ (menu-bar-make-mm-toggle
+ cua-mode
+ "Shift movement mark region (CUA)"
+ "Use shifted movement keys to set and extend the region"
+ (:visible (and (boundp 'cua-enable-cua-keys)
+ (not cua-enable-cua-keys)))))
(define-key menu [case-fold-search]
- (menu-bar-make-toggle toggle-case-fold-search case-fold-search
- "Case-Insensitive Search"
- "Case-Insensitive Search %s"
- "Ignore letter-case in search commands"))
+ (menu-bar-make-toggle
+ toggle-case-fold-search case-fold-search
+ "Ignore Case for Search"
+ "Case-Insensitive Search %s"
+ "Ignore letter-case in search commands"))
(define-key menu [auto-fill-mode]
- `(menu-item ,(purecopy "Auto Fill in Text Modes")
- menu-bar-text-mode-auto-fill
- :help ,(purecopy "Automatically fill text while typing (Auto Fill mode)")
- :button (:toggle . (if (listp text-mode-hook)
- (member 'turn-on-auto-fill text-mode-hook)
- (eq 'turn-on-auto-fill text-mode-hook)))))
+ `(menu-item
+ ,(purecopy "Auto Fill in Text Modes")
+ menu-bar-text-mode-auto-fill
+ :help ,(purecopy "Automatically fill text while typing (Auto Fill mode)")
+ :button (:toggle . (if (listp text-mode-hook)
+ (member 'turn-on-auto-fill text-mode-hook)
+ (eq 'turn-on-auto-fill text-mode-hook)))))
(define-key menu [line-wrapping]
- `(menu-item ,(purecopy "Line Wrapping in this Buffer") ,menu-bar-line-wrapping-menu))
+ `(menu-item ,(purecopy "Line Wrapping in this Buffer")
+ ,menu-bar-line-wrapping-menu))
(define-key menu [highlight-separator]
menu-bar-separator)
(define-key menu [highlight-paren-mode]
- (menu-bar-make-mm-toggle show-paren-mode
- "Paren Match Highlighting"
- "Highlight matching/mismatched parentheses at cursor (Show Paren mode)"))
+ (menu-bar-make-mm-toggle
+ show-paren-mode
+ "Highlight Matching Parentheses"
+ "Highlight matching/mismatched parentheses at cursor (Show Paren mode)"))
(define-key menu [transient-mark-mode]
- (menu-bar-make-mm-toggle transient-mark-mode
- "Active Region Highlighting"
- "Make text in active region stand out in color (Transient Mark mode)"
- (:enable (not cua-mode))))
+ (menu-bar-make-mm-toggle
+ transient-mark-mode
+ "Highlight Active Region"
+ "Make text in active region stand out in color (Transient Mark mode)"
+ (:enable (not cua-mode))))
menu))
\f
;; The server said it was OK to begin STARTTLS negotiations.
(if builtin-starttls
(let ((cert (network-stream-certificate host service parameters)))
- (gnutls-negotiate :process stream :hostname host
- :keylist (and cert (list cert))))
+ (condition-case nil
+ (gnutls-negotiate :process stream :hostname host
+ :keylist (and cert (list cert)))
+ ;; If we get a gnutls-specific error (for instance if
+ ;; the certificate the server gives us is completely
+ ;; syntactically invalid), then close the connection
+ ;; and possibly (further down) try to create a
+ ;; non-encrypted connection.
+ (gnutls-error
+ (delete-process stream))))
(unless (starttls-negotiate stream)
(delete-process stream)))
(if (memq (process-status stream) '(open run))
;; When PROGRAM is nil, we just provide a tty.
(let ((command
(when (stringp program)
- (format "cd %s; exec %s"
+ (format "cd %s; exec env PS1=%s %s"
(tramp-shell-quote-argument localname)
+ ;; Use a human-friendly prompt, for example for `shell'.
+ (tramp-shell-quote-argument
+ (format "%s %s"
+ (file-remote-p default-directory)
+ tramp-initial-end-of-output))
(mapconcat 'tramp-shell-quote-argument
(cons program args) " "))))
(tramp-process-connection-type
"Don't know how to insert register %s"
(single-key-description register))
(funcall (registerv-insert-func val) (registerv-data val)))
+ ((consp val)
+ (insert-rectangle val))
((stringp val)
(insert-for-yank val))
((numberp val)
"Return LIST with all occurrences of ELT removed.
The comparison is done with `eq'. Contrary to `delq', this does not use
side-effects, and the argument LIST is not modified."
- (while (eq elt (car list)) (setq list (cdr list)))
+ (while (and (eq elt (car list)) (setq list (cdr list))))
(if (memq elt list)
(delq elt (copy-sequence list))
list))
;;;###autoload
(defun forward-thing (thing &optional n)
- "Move forward to the end of the Nth next THING."
+ "Move forward to the end of the Nth next THING.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'."
(let ((forward-op (or (get thing 'forward-op)
(intern-soft (format "forward-%s" thing)))))
(if (functionp forward-op)
;;;###autoload
(defun bounds-of-thing-at-point (thing)
"Determine the start and end buffer locations for the THING at point.
-THING is a symbol which specifies the kind of syntactic entity you want.
-Possibilities include `symbol', `list', `sexp', `defun', `filename', `url',
-`email', `word', `sentence', `whitespace', `line', `page' and others.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'.
-See the file `thingatpt.el' for documentation on how to define
-a symbol as a valid THING.
+See the file `thingatpt.el' for documentation on how to define a
+valid THING.
-The value is a cons cell (START . END) giving the start and end positions
-of the textual entity that was found."
+Return a cons cell (START . END) giving the start and end
+positions of the thing found."
(if (get thing 'bounds-of-thing-at-point)
(funcall (get thing 'bounds-of-thing-at-point))
(let ((orig (point)))
;;;###autoload
(defun thing-at-point (thing)
"Return the THING at point.
-THING is a symbol which specifies the kind of syntactic entity you want.
-Possibilities include `symbol', `list', `sexp', `defun', `filename', `url',
-`email', `word', `sentence', `whitespace', `line', `page' and others.
+THING should be a symbol specifying a type of syntactic entity.
+Possibilities include `symbol', `list', `sexp', `defun',
+`filename', `url', `email', `word', `sentence', `whitespace',
+`line', and `page'.
See the file `thingatpt.el' for documentation on how to define
a symbol as a valid THING."
;; Go to beginning/end
(defun beginning-of-thing (thing)
+ "Move point to the beginning of THING.
+The bounds of THING are determined by `bounds-of-thing-at-point'."
(let ((bounds (bounds-of-thing-at-point thing)))
(or bounds (error "No %s here" thing))
(goto-char (car bounds))))
(defun end-of-thing (thing)
+ "Move point to the end of THING.
+The bounds of THING are determined by `bounds-of-thing-at-point'."
(let ((bounds (bounds-of-thing-at-point thing)))
(or bounds (error "No %s here" thing))
(goto-char (cdr bounds))))
;; Sexps
(defun in-string-p ()
+ "Return non-nil if point is in a string.
+\[This is an internal function.]"
(let ((orig (point)))
(save-excursion
(beginning-of-defun)
(nth 3 (parse-partial-sexp (point) orig)))))
(defun end-of-sexp ()
+ "Move point to the end of the current sexp.
+\[This is an internal function.]"
(let ((char-syntax (char-syntax (char-after))))
(if (or (eq char-syntax ?\))
(and (eq char-syntax ?\") (in-string-p)))
(put 'sexp 'end-op 'end-of-sexp)
(defun beginning-of-sexp ()
+ "Move point to the beginning of the current sexp.
+\[This is an internal function.]"
(let ((char-syntax (char-syntax (char-before))))
(if (or (eq char-syntax ?\()
(and (eq char-syntax ?\") (in-string-p)))
(put 'list 'bounds-of-thing-at-point 'thing-at-point-bounds-of-list-at-point)
(defun thing-at-point-bounds-of-list-at-point ()
+ "Return the bounds of the list at point.
+\[Internal function used by `bounds-of-thing-at-point'.]"
(save-excursion
(let ((opoint (point))
(beg (condition-case nil
;; Whitespace
(defun forward-whitespace (arg)
+ "Move point to the end of the next sequence of whitespace chars.
+Each such sequence may be a single newline, or a sequence of
+consecutive space and/or tab characters.
+With prefix argument ARG, do it ARG times if positive, or move
+backwards ARG times if negative."
(interactive "p")
(if (natnump arg)
(re-search-forward "[ \t]+\\|\n" nil 'move arg)
;; Symbols
(defun forward-symbol (arg)
+ "Move point to the next position that is the end of a symbol.
+A symbol is any sequence of characters that are in either the
+word constituent or symbol constituent syntax class.
+With prefix argument ARG, do it ARG times if positive, or move
+backwards ARG times if negative."
(interactive "p")
(if (natnump arg)
(re-search-forward "\\(\\sw\\|\\s_\\)+" nil 'move arg)
;; Syntax blocks
(defun forward-same-syntax (&optional arg)
+ "Move point past all characters with the same syntax class.
+With prefix argument ARG, do it ARG times if positive, or move
+backwards ARG times if negative."
(interactive "p")
(while (< arg 0)
(skip-syntax-backward
;; Aliases
-(defun word-at-point () (thing-at-point 'word))
-(defun sentence-at-point () (thing-at-point 'sentence))
+(defun word-at-point ()
+ "Return the word at point. See `thing-at-point'."
+ (thing-at-point 'word))
+
+(defun sentence-at-point ()
+ "Return the sentence at point. See `thing-at-point'."
+ (thing-at-point 'sentence))
(defun read-from-whole-string (str)
"Read a Lisp expression from STR.
(defconst vc-bzr-revision-keywords
;; bzr help revisionspec | sed -ne 's/^\([a-z]*\):$/"\1"/p' | sort -u
'("ancestor" "annotate" "before" "branch" "date" "last" "mainline" "revid"
- "revno" "submit" "svn" "tag")))
+ "revno" "submit" "tag")))
(defun vc-bzr-revision-completion-table (files)
(lexical-let ((files files))
(defun next-buffer ()
"In selected window switch to next buffer."
(interactive)
+ (if (window-minibuffer-p)
+ (error "Cannot switch buffers in minibuffer window"))
(switch-to-next-buffer))
(defun previous-buffer ()
"In selected window switch to previous buffer."
(interactive)
+ (if (window-minibuffer-p)
+ (error "Cannot switch buffers in minibuffer window"))
(switch-to-prev-buffer))
(defun delete-windows-on (&optional buffer-or-name frame)
-# getopt.m4 serial 35
+# getopt.m4 serial 38
dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_CACHE_CHECK([whether getopt is POSIX compatible],
[gl_cv_func_getopt_posix],
[
- dnl BSD getopt_long uses an incompatible method to reset
- dnl option processing. Existence of the variable, in and of
+ dnl BSD getopt_long uses an incompatible method to reset option
+ dnl processing. Existence of the optreset variable, in and of
dnl itself, is not a reason to replace getopt, but knowledge
dnl of the variable is needed to determine how to reset and
dnl whether a reset reparses the environment. Solaris
dnl supports neither optreset nor optind=0, but keeps no state
dnl that needs a reset beyond setting optind=1; detect Solaris
dnl by getopt_clip.
- AC_COMPILE_IFELSE(
+ AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <unistd.h>]],
[[int *p = &optreset; return optreset;]])],
main ()
{
{
- int argc = 0;
- char *argv[10];
+ static char program[] = "program";
+ static char a[] = "-a";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, a, foo, bar, NULL };
int c;
- argv[argc++] = "program";
- argv[argc++] = "-a";
- argv[argc++] = "foo";
- argv[argc++] = "bar";
- argv[argc] = NULL;
optind = OPTIND_MIN;
opterr = 0;
- c = getopt (argc, argv, "ab");
+ c = getopt (4, argv, "ab");
if (!(c == 'a'))
return 1;
- c = getopt (argc, argv, "ab");
+ c = getopt (4, argv, "ab");
if (!(c == -1))
return 2;
if (!(optind == 2))
}
/* Some internal state exists at this point. */
{
- int argc = 0;
- char *argv[10];
+ static char program[] = "program";
+ static char donald[] = "donald";
+ static char p[] = "-p";
+ static char billy[] = "billy";
+ static char duck[] = "duck";
+ static char a[] = "-a";
+ static char bar[] = "bar";
+ char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
int c;
- argv[argc++] = "program";
- argv[argc++] = "donald";
- argv[argc++] = "-p";
- argv[argc++] = "billy";
- argv[argc++] = "duck";
- argv[argc++] = "-a";
- argv[argc++] = "bar";
- argv[argc] = NULL;
optind = OPTIND_MIN;
opterr = 0;
- c = getopt (argc, argv, "+abp:q:");
+ c = getopt (7, argv, "+abp:q:");
if (!(c == -1))
return 4;
if (!(strcmp (argv[0], "program") == 0))
}
/* Detect MacOS 10.5, AIX 7.1 bug. */
{
- char *argv[3] = { "program", "-ab", NULL };
+ static char program[] = "program";
+ static char ab[] = "-ab";
+ char *argv[3] = { program, ab, NULL };
optind = OPTIND_MIN;
opterr = 0;
if (getopt (2, argv, "ab:") != 'a')
and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
OSF/1 5.1, Solaris 10. */
{
- char *myargv[3];
- myargv[0] = "conftest";
- myargv[1] = "-+";
- myargv[2] = 0;
+ static char conftest[] = "conftest";
+ static char plus[] = "-+";
+ char *argv[3] = { conftest, plus, NULL };
opterr = 0;
- if (getopt (2, myargv, "+a") != '?')
+ if (getopt (2, argv, "+a") != '?')
result |= 1;
}
/* This code succeeds on glibc 2.8, mingw,
and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
{
- char *argv[] = { "program", "-p", "foo", "bar", NULL };
+ static char program[] = "program";
+ static char p[] = "-p";
+ static char foo[] = "foo";
+ static char bar[] = "bar";
+ char *argv[] = { program, p, foo, bar, NULL };
optind = 1;
if (getopt (4, argv, "p::") != 'p')
}
/* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
{
- char *argv[] = { "program", "foo", "-p", NULL };
+ static char program[] = "program";
+ static char foo[] = "foo";
+ static char p[] = "-p";
+ char *argv[] = { program, foo, p, NULL };
optind = 0;
if (getopt (3, argv, "-p") != 1)
result |= 16;
}
/* This code fails on glibc 2.11. */
{
- char *argv[] = { "program", "-b", "-a", NULL };
+ static char program[] = "program";
+ static char b[] = "-b";
+ static char a[] = "-a";
+ char *argv[] = { program, b, a, NULL };
optind = opterr = 0;
if (getopt (3, argv, "+:a:b") != 'b')
result |= 64;
else if (getopt (3, argv, "+:a:b") != ':')
result |= 64;
}
+ /* This code dumps core on glibc 2.14. */
+ {
+ static char program[] = "program";
+ static char w[] = "-W";
+ static char dummy[] = "dummy";
+ char *argv[] = { program, w, dummy, NULL };
+ optind = opterr = 1;
+ if (getopt (3, argv, "W;") != 'W')
+ result |= 128;
+ }
return result;
]])],
[gl_cv_func_getopt_gnu=yes],
# Code from module lstat:
# Code from module mktime:
# Code from module multiarch:
+ # Code from module pthread_sigmask:
# Code from module readlink:
+ # Code from module signal:
+ # Code from module sigprocmask:
# Code from module socklen:
# Code from module ssize_t:
# Code from module stat:
# Code from module stdio:
# Code from module stdlib:
# Code from module strftime:
+ # Code from module strtoimax:
+ # Code from module strtoll:
# Code from module strtoull:
# Code from module strtoumax:
# Code from module symlink:
fi
gl_TIME_MODULE_INDICATOR([mktime])
gl_MULTIARCH
+gl_FUNC_PTHREAD_SIGMASK
+if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+ AC_LIBOBJ([pthread_sigmask])
+fi
+gl_SIGNAL_MODULE_INDICATOR([pthread_sigmask])
gl_FUNC_READLINK
if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
AC_LIBOBJ([readlink])
gl_PREREQ_READLINK
fi
gl_UNISTD_MODULE_INDICATOR([readlink])
+gl_SIGNAL_H
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
gl_STDARG_H
gl_STDIO_H
gl_STDLIB_H
gl_FUNC_GNU_STRFTIME
+gl_FUNC_STRTOIMAX
+if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
+ AC_LIBOBJ([strtoimax])
+ gl_PREREQ_STRTOIMAX
+fi
+gl_INTTYPES_MODULE_INDICATOR([strtoimax])
gl_FUNC_STRTOUMAX
if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
AC_LIBOBJ([strtoumax])
gl_UNISTD_H
gl_gnulib_enabled_dosname=false
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
+ gl_gnulib_enabled_sigprocmask=false
gl_gnulib_enabled_stat=false
+ gl_gnulib_enabled_strtoll=false
gl_gnulib_enabled_strtoull=false
gl_gnulib_enabled_verify=false
func_gl_gnulib_m4code_dosname ()
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=true
fi
}
+ func_gl_gnulib_m4code_sigprocmask ()
+ {
+ if ! $gl_gnulib_enabled_sigprocmask; then
+gl_SIGNALBLOCKING
+if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+fi
+gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+ gl_gnulib_enabled_sigprocmask=true
+ fi
+ }
func_gl_gnulib_m4code_stat ()
{
if ! $gl_gnulib_enabled_stat; then
fi
fi
}
+ func_gl_gnulib_m4code_strtoll ()
+ {
+ if ! $gl_gnulib_enabled_strtoll; then
+gl_FUNC_STRTOLL
+if test $HAVE_STRTOLL = 0; then
+ AC_LIBOBJ([strtoll])
+ gl_PREREQ_STRTOLL
+fi
+gl_STDLIB_MODULE_INDICATOR([strtoll])
+ gl_gnulib_enabled_strtoll=true
+ fi
+ }
func_gl_gnulib_m4code_strtoull ()
{
if ! $gl_gnulib_enabled_strtoull; then
if test $REPLACE_LSTAT = 1; then
func_gl_gnulib_m4code_stat
fi
+ if test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1; then
+ func_gl_gnulib_m4code_sigprocmask
+ fi
if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
func_gl_gnulib_m4code_stat
fi
+ if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no; then
+ func_gl_gnulib_m4code_verify
+ fi
+ if test "$ac_cv_have_decl_strtoimax" != yes && test $ac_cv_func_strtoimax = no && test $ac_cv_type_long_long_int = yes; then
+ func_gl_gnulib_m4code_strtoll
+ fi
if test "$ac_cv_have_decl_strtoumax" != yes && test $ac_cv_func_strtoumax = no; then
func_gl_gnulib_m4code_verify
fi
m4_pattern_allow([^gl_GNULIB_ENABLED_])
AM_CONDITIONAL([gl_GNULIB_ENABLED_dosname], [$gl_gnulib_enabled_dosname])
AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [$gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_sigprocmask], [$gl_gnulib_enabled_sigprocmask])
AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtoll])
AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoull], [$gl_gnulib_enabled_strtoull])
AM_CONDITIONAL([gl_GNULIB_ENABLED_verify], [$gl_gnulib_enabled_verify])
# End of code from modules
lib/md5.h
lib/mktime-internal.h
lib/mktime.c
+ lib/pthread_sigmask.c
lib/readlink.c
lib/sha1.c
lib/sha1.h
lib/sha256.h
lib/sha512.c
lib/sha512.h
+ lib/signal.in.h
+ lib/sigprocmask.c
lib/stat.c
lib/stdarg.in.h
lib/stdbool.in.h
lib/strftime.h
lib/strtoimax.c
lib/strtol.c
+ lib/strtoll.c
lib/strtoul.c
lib/strtoull.c
lib/strtoumax.c
m4/md5.m4
m4/mktime.m4
m4/multiarch.m4
+ m4/pthread_sigmask.m4
m4/readlink.m4
m4/sha1.m4
m4/sha256.m4
m4/sha512.m4
+ m4/signal_h.m4
+ m4/signalblocking.m4
m4/socklen.m4
m4/ssize_t.m4
m4/st_dm_mode.m4
m4/stdio_h.m4
m4/stdlib_h.m4
m4/strftime.m4
+ m4/strtoimax.m4
+ m4/strtoll.m4
m4/strtoull.m4
m4/strtoumax.m4
m4/symlink.m4
--- /dev/null
+# pthread_sigmask.m4 serial 7
+dnl Copyright (C) 2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
+[
+ AC_CHECK_FUNCS_ONCE([pthread_sigmask])
+ LIB_PTHREAD_SIGMASK=
+ m4_ifdef([gl_THREADLIB], [
+ AC_REQUIRE([gl_THREADLIB])
+ if test "$gl_threads_api" = posix; then
+ if test $ac_cv_func_pthread_sigmask = yes; then
+ dnl pthread_sigmask is available without -lpthread.
+ :
+ else
+ if test -n "$LIBMULTITHREAD"; then
+ AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
+ [gl_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ #include <signal.h>
+ ]],
+ [[return pthread_sigmask (0, (sigset_t *) 0, (sigset_t *) 0);]])
+ ],
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
+ [gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
+ LIBS="$gl_save_LIBS"
+ ])
+ if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
+ dnl pthread_sigmask is available with -lpthread.
+ LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+ else
+ dnl pthread_sigmask is not available at all.
+ HAVE_PTHREAD_SIGMASK=0
+ fi
+ else
+ dnl pthread_sigmask is not available at all.
+ HAVE_PTHREAD_SIGMASK=0
+ fi
+ fi
+ else
+ dnl pthread_sigmask may exist but does not interoperate with the chosen
+ dnl multithreading facility.
+ dnl If "$gl_threads_api" = pth, we could use the function pth_sigmask,
+ dnl but it is equivalent to sigprocmask, so we choose to emulate
+ dnl pthread_sigmask with sigprocmask also in this case. This yields fewer
+ dnl link dependencies.
+ if test $ac_cv_func_pthread_sigmask = yes; then
+ REPLACE_PTHREAD_SIGMASK=1
+ else
+ HAVE_PTHREAD_SIGMASK=0
+ fi
+ fi
+ ] ,[
+ dnl gl_THREADLIB is not in use. Assume the application wants
+ dnl POSIX semantics.
+ if test $ac_cv_func_pthread_sigmask != yes; then
+ gl_save_LIBS=$LIBS
+ AC_SEARCH_LIBS([pthread_sigmask], [pthread c_r])
+ LIBS=$gl_save_LIBS
+ if test "$ac_cv_search_pthread_sigmask" = no; then
+ HAVE_PTHREAD_SIGMASK=0
+ elif test "$ac_cv_search_pthread_sigmask" != 'none required'; then
+ LIB_PTHREAD_SIGMASK=$ac_cv_search_pthread_sigmask
+ fi
+ fi
+ ])
+ AC_SUBST([LIB_PTHREAD_SIGMASK])
+ dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
+ dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
+ dnl same: either both empty or both "-lpthread".
+])
--- /dev/null
+# signal_h.m4 serial 16
+dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SIGNAL_H],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ gl_NEXT_HEADERS([signal.h])
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ AC_CHECK_TYPE([volatile sig_atomic_t], [],
+ [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
+#include <signal.h>
+ ]])
+
+ AC_REQUIRE([AC_TYPE_UID_T])
+
+ dnl Persuade glibc <signal.h> to define sighandler_t.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
+#include <signal.h>
+ ]])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+ ]], [pthread_sigmask sigaction
+ sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+])
+
+AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
+[
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [[
+ #include <signal.h>
+ /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+ #include <sys/types.h>
+ ]])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+ GNULIB_PTHREAD_SIGMASK=0; AC_SUBST([GNULIB_PTHREAD_SIGMASK])
+ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+ HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
+ REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
+])
--- /dev/null
+# signalblocking.m4 serial 12
+dnl Copyright (C) 2001-2002, 2006-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine available signal blocking primitives. Three different APIs exist:
+# 1) POSIX: sigemptyset, sigaddset, sigprocmask
+# 2) SYSV: sighold, sigrelse
+# 3) BSD: sigblock, sigsetmask
+# For simplicity, here we check only for the POSIX signal blocking.
+AC_DEFUN([gl_SIGNALBLOCKING],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
+ if test $gl_cv_type_sigset_t = yes; then
+ AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ fi
+])
+
+# Prerequisites of lib/sigprocmask.c.
+AC_DEFUN([gl_PREREQ_SIGPROCMASK], [:])
--- /dev/null
+# strtoimax.m4 serial 10
+dnl Copyright (C) 2002-2004, 2006, 2009-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOIMAX],
+[
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+
+ AC_CHECK_DECLS_ONCE([strtoimax])
+ if test "$ac_cv_have_decl_strtoimax" != yes; then
+ HAVE_DECL_STRTOIMAX=0
+
+ AC_CHECK_FUNCS([strtoimax])
+ fi
+])
+
+# Prerequisites of lib/strtoimax.c.
+AC_DEFUN([gl_PREREQ_STRTOIMAX], [
+ AC_CHECK_DECLS([strtoll])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
--- /dev/null
+# strtoll.m4 serial 7
+dnl Copyright (C) 2002, 2004, 2006, 2008-2011 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOLL],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ dnl We don't need (and can't compile) the replacement strtoll
+ dnl unless the type 'long long int' exists.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test "$ac_cv_type_long_long_int" = yes; then
+ AC_CHECK_FUNCS([strtoll])
+ if test $ac_cv_func_strtoll = no; then
+ HAVE_STRTOLL=0
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtoll.c.
+AC_DEFUN([gl_PREREQ_STRTOLL], [
+ :
+])
(tiff_load): Omit no-longer-needed casts.
(Fimagemagick_types): Don't assume size fits into 'int'.
-2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
-
Improve hashing quality when configured --with-wide-int.
* fns.c (hash_string): New function, taken from sxhash_string.
Do not discard information about ASCII character case; this
The fns.c version returns a wider integer if --with-wide-int is
specified, so this should help the quality of the hashing a bit.
-2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
-
* emacs.c: Integer overflow minor fix.
(heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
Define only if GNU_LINUX.
(STDC_HEADERS): Remove obsolete defines.
* sysdep.c: Include limits.h unconditionally.
-2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
-
Assume support for memcmp, memcpy, memmove, memset.
* lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
* regex.c (memcmp, memcpy):
Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
well either way, and we prefer signed to unsigned.
+2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ Use pthread_sigmask, not sigprocmask (Bug#9010).
+ sigprocmask is portable only for single-threaded applications, and
+ Emacs can be multi-threaded when it uses GTK.
+ * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
+ (LIBES): Use it.
+ * callproc.c (Fcall_process):
+ * process.c (create_process):
+ * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
+ Use pthread_sigmask, not sigprocmask.
+
+2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
+ (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
+ wrong (Bug#8591).
+
+2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
+ Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
+ (xg_hide_tooltip): Fix comment.
+
+ * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
+ in registerServicesMenuSendTypes.
+ (validRequestorForSendType): Don't check ns_return_types.
+
+ * nsfns.m (Fx_open_connection): Put NSStringPboardType into
+ ns_return_type.
+
+2011-07-08 Jason Rumney <jasonr@gnu.org>
+
+ * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
+ frame struct members of non-existent frames (Bug#6284).
+
+2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
+ variable firstTime not needed on OSX >= 10.6.
+ (setPosition): setFloatValue:knobProportion: is deprecated on OSX
+ >= 10.5. Use setKnobProportion, setDoubleValue.
+
+ * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
+ (MAC_OS_X_VERSION_10_5): Define if not defined.
+ (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
+ (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
+ (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
+
+ * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
+ cString and lossyCString on OSX >= 10.4
+
+ * nsmenu.m (fillWithWidgetValue): Don't use depercated method
+ sizeToFit on OSX >= 10.2.
+
+ * nsimage.m (allocInitFromFile): Don't use deprecated method
+ bestRepresentationForDevice on OSX >= 10.6.
+
+ * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
+ to avoid warning.
+
+ * emacs.c: Declare unexec_init_emacs_zone.
+
+ * nsgui.h: Fix compiler warning about gnulib redefining verify.
+
+ * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
+
+ * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
+ on svcsMenu (Bug#8842).
+
+ * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
+ ns_return_types.
+ (Fns_list_services): Just return Qnil on 10.6, code not working there.
+
+ * nsterm.m (QUTF8_STRING): Declare.
+ (initFrameFromEmacs): Call registerServicesMenuSendTypes.
+ (validRequestorForSendType): Return type is (id).
+ Change indexOfObjectIdenticalTo to indexOfObject.
+ Check if we have local selection before returning self (Bug#8842).
+ (writeSelectionToPasteboard): Put local selection into paste board
+ if we have a local selection (Bug#8842).
+ (syms_of_nsterm): DEFSYM QUTF8_STRING.
+
+ * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
+ (ns_get_local_selection): Declare.
+
+2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * keymap.c (describe_map_tree): Don't insert a double newline at
+ the end of the buffer (bug#1169) and return whether we inserted
+ something.
+
+ * callint.c (Fcall_interactively): Change "reading args" to
+ "providing args" to try to clarify what it does (bug#1010).
+
+2011-07-07 Kenichi Handa <handa@m17n.org>
+
+ * composite.c (composition_compute_stop_pos): Ignore a static
+ composition starting before CHARPOS (Bug#8915).
+
+ * xdisp.c (handle_composition_prop): Likewise.
+
+2011-07-07 Eli Zaretskii <eliz@gnu.org>
+
+ * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
+ (Bug#9015)
+
+2011-07-07 Kenichi Handa <handa@m17n.org>
+
+ * character.h (unicode_category_t): New enum type.
+
+ * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
+ (Qchar_code_property_table): New variable.
+ (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
+ (UNIPROP_COMPRESSED_FORM_P): New macros.
+ (char_table_ascii): Uncompress the compressed values.
+ (sub_char_table_ref): New arg is_uniprop. Callers changed.
+ Uncompress the compressed values.
+ (sub_char_table_ref_and_range): Likewise.
+ (char_table_ref_and_range): Uncompress the compressed values.
+ (sub_char_table_set): New arg is_uniprop. Callers changed.
+ Uncompress the compressed values.
+ (sub_char_table_set_range): Args changed. Callers changed.
+ (char_table_set_range): Adjuted for the above change.
+ (map_sub_char_table): Delete args default_val and parent. Add arg
+ top. Give decoded values to a Lisp function.
+ (map_char_table): Adjusted for the above change. Give decoded
+ values to a Lisp function. Gcpro more variables.
+ (uniprop_table_uncompress)
+ (uniprop_decode_value_run_length): New functions.
+ (uniprop_decoder, uniprop_decoder_count): New variables.
+ (uniprop_get_decoder, uniprop_encode_value_character)
+ (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
+ New functions.
+ (uniprop_encoder, uniprop_encoder_count): New variables.
+ (uniprop_get_encoder, uniprop_table)
+ (Funicode_property_table_internal, Fget_unicode_property_internal)
+ (Fput_unicode_property_internal): New functions.
+ (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
+ Sunicode_property_table_internal, Sget_unicode_property_internal,
+ and Sput_unicode_property_internal. Defvar_lisp
+ char-code-property-alist.
+
+ * composite.c (CHAR_COMPOSABLE_P): Adjusted for the change of
+ Vunicode_category_table.
+
+ * font.c (font_range): Adjusted for the change of
+ Vunicode_category_table.
+
+2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * m/iris4d.h: Remove file, move contents ...
+ * s/irix6-5.h: ... here.
+
2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
Remove unportable assumption about struct layout (Bug#8884).
LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
+LIB_PTHREAD_SIGMASK = @LIB_PTHREAD_SIGMASK@
+
INTERVALS_H = dispextern.h intervals.h composite.h
GETLOADAVG_LIBS = @GETLOADAVG_LIBS@
$(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) \
$(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
- $(LIBGNUTLS_LIBS) \
+ $(LIBGNUTLS_LIBS) $(LIB_PTHREAD_SIGMASK) \
$(LIB_GCC) $(LIB_MATH) $(LIB_STANDARD) $(LIB_GCC)
all: emacs$(EXEEXT) $(OTHER_FILES)
}
DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, 1, 3, 0,
- doc: /* Call FUNCTION, reading args according to its interactive calling specs.
+ doc: /* Call FUNCTION, providing args according to its interactive calling specs.
Return the value FUNCTION returns.
The function contains a specification of how to do the argument reading.
In the case of user-defined functions, this is specified by placing a call
sigemptyset (&blocked);
sigaddset (&blocked, SIGPIPE);
sigaction (SIGPIPE, 0, &sigpipe_action);
- sigprocmask (SIG_BLOCK, &blocked, &procmask);
+ pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
#endif
BLOCK_INPUT;
in the child. */
//signal (SIGPIPE, SIG_DFL);
#ifdef HAVE_WORKING_VFORK
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
#endif
child_setup (filefd, fd1, fd_error, (char **) new_argv,
#ifdef HAVE_WORKING_VFORK
/* Restore the signal state. */
sigaction (SIGPIPE, &sigpipe_action, 0);
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
#endif
#endif /* not WINDOWSNT */
: (c) <= 0xDFFF ? 2 \
: 0)
+/* Data type for Unicode general category.
+
+ The order of members must be in sync with the 8th element of the
+ member of unidata-prop-alist (in admin/unidata/unidata-getn.el) for
+ Unicode character property `general-category'. */
+
+typedef enum {
+ UNICODE_CATEGORY_UNKNOWN = 0,
+ UNICODE_CATEGORY_Lu,
+ UNICODE_CATEGORY_Ll,
+ UNICODE_CATEGORY_Lt,
+ UNICODE_CATEGORY_Lm,
+ UNICODE_CATEGORY_Lo,
+ UNICODE_CATEGORY_Mn,
+ UNICODE_CATEGORY_Mc,
+ UNICODE_CATEGORY_Me,
+ UNICODE_CATEGORY_Nd,
+ UNICODE_CATEGORY_Nl,
+ UNICODE_CATEGORY_No,
+ UNICODE_CATEGORY_Pc,
+ UNICODE_CATEGORY_Pd,
+ UNICODE_CATEGORY_Ps,
+ UNICODE_CATEGORY_Pe,
+ UNICODE_CATEGORY_Pi,
+ UNICODE_CATEGORY_Pf,
+ UNICODE_CATEGORY_Po,
+ UNICODE_CATEGORY_Sm,
+ UNICODE_CATEGORY_Sc,
+ UNICODE_CATEGORY_Sk,
+ UNICODE_CATEGORY_So,
+ UNICODE_CATEGORY_Zs,
+ UNICODE_CATEGORY_Zl,
+ UNICODE_CATEGORY_Zp,
+ UNICODE_CATEGORY_Cc,
+ UNICODE_CATEGORY_Cf,
+ UNICODE_CATEGORY_Cs,
+ UNICODE_CATEGORY_Co,
+ UNICODE_CATEGORY_Cn
+} unicode_category_t;
extern int char_resolve_modifier_mask (int);
extern int char_string (unsigned, unsigned char *);
#define CHARTAB_IDX(c, depth, min_char) \
(((c) - (min_char)) >> chartab_bits[(depth)])
+\f
+/* Preamble for uniprop (Unicode character property) tables. See the
+ comment of "Unicode character property tables". */
+
+/* Purpose of uniprop tables. */
+static Lisp_Object Qchar_code_property_table;
+
+/* Types of decoder and encoder functions for uniprop values. */
+typedef Lisp_Object (*uniprop_decoder_t) (Lisp_Object, Lisp_Object);
+typedef Lisp_Object (*uniprop_encoder_t) (Lisp_Object, Lisp_Object);
+
+static Lisp_Object uniprop_table_uncompress (Lisp_Object, int);
+static uniprop_decoder_t uniprop_get_decoder (Lisp_Object);
+
+/* 1 iff TABLE is a uniprop table. */
+#define UNIPROP_TABLE_P(TABLE) \
+ (EQ (XCHAR_TABLE (TABLE)->purpose, Qchar_code_property_table) \
+ && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (TABLE)) == 5)
+
+/* Return a decoder for values in the uniprop table TABLE. */
+#define UNIPROP_GET_DECODER(TABLE) \
+ (UNIPROP_TABLE_P (TABLE) ? uniprop_get_decoder (TABLE) : NULL)
+/* Nonzero iff OBJ is a string representing uniprop values of 128
+ succeeding characters (the bottom level of a char-table) by a
+ compressed format. We are sure that no property value has a string
+ starting with '\001' nor '\002'. */
+#define UNIPROP_COMPRESSED_FORM_P(OBJ) \
+ (STRINGP (OBJ) && SCHARS (OBJ) > 0 \
+ && ((SREF (OBJ, 0) == 1 || (SREF (OBJ, 0) == 2))))
+
+\f
DEFUN ("make-char-table", Fmake_char_table, Smake_char_table, 1, 2, 0,
doc: /* Return a newly created char-table, with purpose PURPOSE.
Each element is initialized to INIT, which defaults to nil.
static Lisp_Object
char_table_ascii (Lisp_Object table)
{
- Lisp_Object sub;
+ Lisp_Object sub, val;
sub = XCHAR_TABLE (table)->contents[0];
if (! SUB_CHAR_TABLE_P (sub))
sub = XSUB_CHAR_TABLE (sub)->contents[0];
if (! SUB_CHAR_TABLE_P (sub))
return sub;
- return XSUB_CHAR_TABLE (sub)->contents[0];
+ val = XSUB_CHAR_TABLE (sub)->contents[0];
+ if (UNIPROP_TABLE_P (table) && UNIPROP_COMPRESSED_FORM_P (val))
+ val = uniprop_table_uncompress (sub, 0);
+ return val;
}
static Lisp_Object
}
static Lisp_Object
-sub_char_table_ref (Lisp_Object table, int c)
+sub_char_table_ref (Lisp_Object table, int c, int is_uniprop)
{
struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
int depth = XINT (tbl->depth);
int min_char = XINT (tbl->min_char);
Lisp_Object val;
+ int idx = CHARTAB_IDX (c, depth, min_char);
- val = tbl->contents[CHARTAB_IDX (c, depth, min_char)];
+ val = tbl->contents[idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val))
+ val = uniprop_table_uncompress (table, idx);
if (SUB_CHAR_TABLE_P (val))
- val = sub_char_table_ref (val, c);
+ val = sub_char_table_ref (val, c, is_uniprop);
return val;
}
{
val = tbl->contents[CHARTAB_IDX (c, 0, 0)];
if (SUB_CHAR_TABLE_P (val))
- val = sub_char_table_ref (val, c);
+ val = sub_char_table_ref (val, c, UNIPROP_TABLE_P (table));
}
if (NILP (val))
{
}
static Lisp_Object
-sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to, Lisp_Object defalt)
+sub_char_table_ref_and_range (Lisp_Object table, int c, int *from, int *to,
+ Lisp_Object defalt, int is_uniprop)
{
struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
int depth = XINT (tbl->depth);
Lisp_Object val;
val = tbl->contents[chartab_idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val))
+ val = uniprop_table_uncompress (table, chartab_idx);
if (SUB_CHAR_TABLE_P (val))
- val = sub_char_table_ref_and_range (val, c, from, to, defalt);
+ val = sub_char_table_ref_and_range (val, c, from, to, defalt, is_uniprop);
else if (NILP (val))
val = defalt;
c = min_char + idx * chartab_chars[depth] - 1;
idx--;
this_val = tbl->contents[idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (this_val))
+ this_val = uniprop_table_uncompress (table, idx);
if (SUB_CHAR_TABLE_P (this_val))
- this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt);
+ this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt,
+ is_uniprop);
else if (NILP (this_val))
this_val = defalt;
chartab_idx++;
this_val = tbl->contents[chartab_idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (this_val))
+ this_val = uniprop_table_uncompress (table, chartab_idx);
if (SUB_CHAR_TABLE_P (this_val))
- this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt);
+ this_val = sub_char_table_ref_and_range (this_val, c, from, to, defalt,
+ is_uniprop);
else if (NILP (this_val))
this_val = defalt;
if (! EQ (this_val, val))
struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
int chartab_idx = CHARTAB_IDX (c, 0, 0), idx;
Lisp_Object val;
+ int is_uniprop = UNIPROP_TABLE_P (table);
val = tbl->contents[chartab_idx];
if (*from < 0)
*from = 0;
if (*to < 0)
*to = MAX_CHAR;
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (val))
+ val = uniprop_table_uncompress (table, chartab_idx);
if (SUB_CHAR_TABLE_P (val))
- val = sub_char_table_ref_and_range (val, c, from, to, tbl->defalt);
+ val = sub_char_table_ref_and_range (val, c, from, to, tbl->defalt,
+ is_uniprop);
else if (NILP (val))
val = tbl->defalt;
-
idx = chartab_idx;
while (*from < idx * chartab_chars[0])
{
c = idx * chartab_chars[0] - 1;
idx--;
this_val = tbl->contents[idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (this_val))
+ this_val = uniprop_table_uncompress (table, idx);
if (SUB_CHAR_TABLE_P (this_val))
this_val = sub_char_table_ref_and_range (this_val, c, from, to,
- tbl->defalt);
+ tbl->defalt, is_uniprop);
else if (NILP (this_val))
this_val = tbl->defalt;
chartab_idx++;
c = chartab_idx * chartab_chars[0];
this_val = tbl->contents[chartab_idx];
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (this_val))
+ this_val = uniprop_table_uncompress (table, chartab_idx);
if (SUB_CHAR_TABLE_P (this_val))
this_val = sub_char_table_ref_and_range (this_val, c, from, to,
- tbl->defalt);
+ tbl->defalt, is_uniprop);
else if (NILP (this_val))
this_val = tbl->defalt;
if (! EQ (this_val, val))
static void
-sub_char_table_set (Lisp_Object table, int c, Lisp_Object val)
+sub_char_table_set (Lisp_Object table, int c, Lisp_Object val, int is_uniprop)
{
struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
int depth = XINT ((tbl)->depth);
sub = tbl->contents[i];
if (! SUB_CHAR_TABLE_P (sub))
{
- sub = make_sub_char_table (depth + 1,
- min_char + i * chartab_chars[depth], sub);
- tbl->contents[i] = sub;
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (sub))
+ sub = uniprop_table_uncompress (table, i);
+ else
+ {
+ sub = make_sub_char_table (depth + 1,
+ min_char + i * chartab_chars[depth],
+ sub);
+ tbl->contents[i] = sub;
+ }
}
- sub_char_table_set (sub, c, val);
+ sub_char_table_set (sub, c, val, is_uniprop);
}
}
sub = make_sub_char_table (1, i * chartab_chars[0], sub);
tbl->contents[i] = sub;
}
- sub_char_table_set (sub, c, val);
+ sub_char_table_set (sub, c, val, UNIPROP_TABLE_P (table));
if (ASCII_CHAR_P (c))
tbl->ascii = char_table_ascii (table);
}
}
static void
-sub_char_table_set_range (Lisp_Object *table, int depth, int min_char, int from, int to, Lisp_Object val)
+sub_char_table_set_range (Lisp_Object table, int from, int to, Lisp_Object val,
+ int is_uniprop)
{
- int max_char = min_char + chartab_chars[depth] - 1;
-
- if (depth == 3 || (from <= min_char && to >= max_char))
- *table = val;
- else
+ struct Lisp_Sub_Char_Table *tbl = XSUB_CHAR_TABLE (table);
+ int depth = XINT ((tbl)->depth);
+ int min_char = XINT ((tbl)->min_char);
+ int chars_in_block = chartab_chars[depth];
+ int i, c, lim = chartab_size[depth];
+
+ if (from < min_char)
+ from = min_char;
+ i = CHARTAB_IDX (from, depth, min_char);
+ c = min_char + chars_in_block * i;
+ for (; i < lim; i++, c += chars_in_block)
{
- int i;
- unsigned j;
-
- depth++;
- if (! SUB_CHAR_TABLE_P (*table))
- *table = make_sub_char_table (depth, min_char, *table);
- if (from < min_char)
- from = min_char;
- if (to > max_char)
- to = max_char;
- i = CHARTAB_IDX (from, depth, min_char);
- j = CHARTAB_IDX (to, depth, min_char);
- min_char += chartab_chars[depth] * i;
- for (j++; i < j; i++, min_char += chartab_chars[depth])
- sub_char_table_set_range (XSUB_CHAR_TABLE (*table)->contents + i,
- depth, min_char, from, to, val);
+ if (c > to)
+ break;
+ if (from <= c && c + chars_in_block - 1 <= to)
+ tbl->contents[i] = val;
+ else
+ {
+ Lisp_Object sub = tbl->contents[i];
+ if (! SUB_CHAR_TABLE_P (sub))
+ {
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (sub))
+ sub = uniprop_table_uncompress (table, i);
+ else
+ {
+ sub = make_sub_char_table (depth + 1, c, sub);
+ tbl->contents[i] = sub;
+ }
+ }
+ sub_char_table_set_range (sub, from, to, val, is_uniprop);
+ }
}
}
{
struct Lisp_Char_Table *tbl = XCHAR_TABLE (table);
Lisp_Object *contents = tbl->contents;
- int i;
if (from == to)
char_table_set (table, from, val);
else
{
- unsigned lim = to / chartab_chars[0] + 1;
- for (i = CHARTAB_IDX (from, 0, 0); i < lim; i++)
- sub_char_table_set_range (contents + i, 0, i * chartab_chars[0],
- from, to, val);
+ int is_uniprop = UNIPROP_TABLE_P (table);
+ int lim = CHARTAB_IDX (to, 0, 0);
+ int i, c;
+
+ for (i = CHARTAB_IDX (from, 0, 0), c = 0; i <= lim;
+ i++, c += chartab_chars[0])
+ {
+ if (c > to)
+ break;
+ if (from <= c && c + chartab_chars[0] - 1 <= to)
+ tbl->contents[i] = val;
+ else
+ {
+ Lisp_Object sub = tbl->contents[i];
+ if (! SUB_CHAR_TABLE_P (sub))
+ {
+ sub = make_sub_char_table (1, i * chartab_chars[0], sub);
+ tbl->contents[i] = sub;
+ }
+ sub_char_table_set_range (sub, from, to, val, is_uniprop);
+ }
+ }
if (ASCII_CHAR_P (from))
tbl->ascii = char_table_ascii (table);
}
(Lisp_Object char_table, Lisp_Object n, Lisp_Object value)
{
CHECK_CHAR_TABLE (char_table);
+ if (EQ (XCHAR_TABLE (char_table)->purpose, Qchar_code_property_table))
+ error ("Can't change extra-slot of char-code-property-table");
CHECK_NUMBER (n);
if (XINT (n) < 0
|| XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
CHECK_CHARACTER_CAR (range);
CHECK_CHARACTER_CDR (range);
- val = char_table_ref_and_range (char_table, XFASTINT (XCAR (range)),
- &from, &to);
+ from = XFASTINT (XCAR (range));
+ to = XFASTINT (XCDR (range));
+ val = char_table_ref_and_range (char_table, from, &from, &to);
/* Not yet implemented. */
}
else
/* Map C_FUNCTION or FUNCTION over TABLE (top or sub char-table),
calling it for each character or group of characters that share a
value. RANGE is a cons (FROM . TO) specifying the range of target
- characters, VAL is a value of FROM in TABLE, DEFAULT_VAL is the
- default value of the char-table, PARENT is the parent of the
+ characters, VAL is a value of FROM in TABLE, TOP is the top
char-table.
ARG is passed to C_FUNCTION when that is called.
static Lisp_Object
map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
Lisp_Object function, Lisp_Object table, Lisp_Object arg, Lisp_Object val,
- Lisp_Object range, Lisp_Object default_val, Lisp_Object parent)
+ Lisp_Object range, Lisp_Object top)
{
/* Pointer to the elements of TABLE. */
Lisp_Object *contents;
int chars_in_block;
int from = XINT (XCAR (range)), to = XINT (XCDR (range));
int i, c;
+ int is_uniprop = UNIPROP_TABLE_P (top);
+ uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top);
if (SUB_CHAR_TABLE_P (table))
{
for (c = min_char + chars_in_block * i; c <= max_char;
i++, c += chars_in_block)
{
- Lisp_Object this = contents[i];
+ Lisp_Object this = (SUB_CHAR_TABLE_P (table)
+ ? XSUB_CHAR_TABLE (table)->contents[i]
+ : XCHAR_TABLE (table)->contents[i]);
int nextc = c + chars_in_block;
+ if (is_uniprop && UNIPROP_COMPRESSED_FORM_P (this))
+ this = uniprop_table_uncompress (table, i);
if (SUB_CHAR_TABLE_P (this))
{
if (to >= nextc)
XSETCDR (range, make_number (nextc - 1));
val = map_sub_char_table (c_function, function, this, arg,
- val, range, default_val, parent);
+ val, range, top);
}
else
{
if (NILP (this))
- this = default_val;
+ this = XCHAR_TABLE (top)->defalt;
if (!EQ (val, this))
{
int different_value = 1;
if (NILP (val))
{
- if (! NILP (parent))
+ if (! NILP (XCHAR_TABLE (top)->parent))
{
+ Lisp_Object parent = XCHAR_TABLE (top)->parent;
Lisp_Object temp = XCHAR_TABLE (parent)->parent;
/* This is to get a value of FROM in PARENT
XSETCDR (range, make_number (c - 1));
val = map_sub_char_table (c_function, function,
parent, arg, val, range,
- XCHAR_TABLE (parent)->defalt,
- XCHAR_TABLE (parent)->parent);
+ parent);
if (EQ (val, this))
different_value = 0;
}
if (c_function)
(*c_function) (arg, XCAR (range), val);
else
- call2 (function, XCAR (range), val);
+ {
+ if (decoder)
+ val = decoder (top, val);
+ call2 (function, XCAR (range), val);
+ }
}
else
{
if (c_function)
(*c_function) (arg, range, val);
else
- call2 (function, range, val);
+ {
+ if (decoder)
+ val = decoder (top, val);
+ call2 (function, range, val);
+ }
}
}
val = this;
ARG is passed to C_FUNCTION when that is called. */
void
-map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object function, Lisp_Object table, Lisp_Object arg)
+map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
+ Lisp_Object function, Lisp_Object table, Lisp_Object arg)
{
- Lisp_Object range, val;
- struct gcpro gcpro1, gcpro2, gcpro3;
+ Lisp_Object range, val, parent;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
+ uniprop_decoder_t decoder = UNIPROP_GET_DECODER (table);
range = Fcons (make_number (0), make_number (MAX_CHAR));
- GCPRO3 (table, arg, range);
+ parent = XCHAR_TABLE (table)->parent;
+
+ GCPRO4 (table, arg, range, parent);
val = XCHAR_TABLE (table)->ascii;
if (SUB_CHAR_TABLE_P (val))
val = XSUB_CHAR_TABLE (val)->contents[0];
val = map_sub_char_table (c_function, function, table, arg, val, range,
- XCHAR_TABLE (table)->defalt,
- XCHAR_TABLE (table)->parent);
+ table);
+
/* If VAL is nil and TABLE has a parent, we must consult the parent
recursively. */
while (NILP (val) && ! NILP (XCHAR_TABLE (table)->parent))
{
- Lisp_Object parent = XCHAR_TABLE (table)->parent;
- Lisp_Object temp = XCHAR_TABLE (parent)->parent;
+ Lisp_Object temp;
int from = XINT (XCAR (range));
+ parent = XCHAR_TABLE (table)->parent;
+ temp = XCHAR_TABLE (parent)->parent;
/* This is to get a value of FROM in PARENT without checking the
parent of PARENT. */
XCHAR_TABLE (parent)->parent = Qnil;
val = CHAR_TABLE_REF (parent, from);
XCHAR_TABLE (parent)->parent = temp;
val = map_sub_char_table (c_function, function, parent, arg, val, range,
- XCHAR_TABLE (parent)->defalt,
- XCHAR_TABLE (parent)->parent);
+ parent);
table = parent;
}
if (c_function)
(*c_function) (arg, XCAR (range), val);
else
- call2 (function, XCAR (range), val);
+ {
+ if (decoder)
+ val = decoder (table, val);
+ call2 (function, XCAR (range), val);
+ }
}
else
{
if (c_function)
(*c_function) (arg, range, val);
else
- call2 (function, range, val);
+ {
+ if (decoder)
+ val = decoder (table, val);
+ call2 (function, range, val);
+ }
}
}
}
\f
+/* Unicode character property tables.
+
+ This section provides a convenient and efficient way to get a
+ Unicode character property from C code (from Lisp, you must use
+ get-char-code-property).
+
+ The typical usage is to get a char-table for a specific property at
+ a proper initialization time as this:
+
+ Lisp_Object bidi_class_table = uniprop_table (intern ("bidi-class"));
+
+ and get a property value for character CH as this:
+
+ Lisp_Object bidi_class = CHAR_TABLE_REF (CH, bidi_class_table);
+
+ In this case, what you actually get is an index number to the
+ vector of property values (symbols nil, L, R, etc).
+
+ A table for Unicode character property has these characteristics:
+
+ o The purpose is `char-code-property-table', which implies that the
+ table has 5 extra slots.
+
+ o The second extra slot is a Lisp function, an index (integer) to
+ the array uniprop_decoder[], or nil. If it is a Lisp function, we
+ can't use such a table from C (at the moment). If it is nil, it
+ means that we don't have to decode values.
+
+ o The third extra slot is a Lisp function, an index (integer) to
+ the array uniprop_enncoder[], or nil. If it is a Lisp function, we
+ can't use such a table from C (at the moment). If it is nil, it
+ means that we don't have to encode values. */
+
+
+/* Uncompress the IDXth element of sub-char-table TABLE. */
+
+static Lisp_Object
+uniprop_table_uncompress (Lisp_Object table, int idx)
+{
+ Lisp_Object val = XSUB_CHAR_TABLE (table)->contents[idx];
+ int min_char = (XINT (XSUB_CHAR_TABLE (table)->min_char)
+ + chartab_chars[2] * idx);
+ Lisp_Object sub = make_sub_char_table (3, min_char, Qnil);
+ struct Lisp_Sub_Char_Table *subtbl = XSUB_CHAR_TABLE (sub);
+ const unsigned char *p, *pend;
+ int i;
+
+ XSUB_CHAR_TABLE (table)->contents[idx] = sub;
+ p = SDATA (val), pend = p + SBYTES (val);
+ if (*p == 1)
+ {
+ /* SIMPLE TABLE */
+ p++;
+ idx = STRING_CHAR_ADVANCE (p);
+ while (p < pend && idx < chartab_chars[2])
+ {
+ int v = STRING_CHAR_ADVANCE (p);
+ subtbl->contents[idx++] = v > 0 ? make_number (v) : Qnil;
+ }
+ }
+ else if (*p == 2)
+ {
+ /* RUN-LENGTH TABLE */
+ p++;
+ for (idx = 0; p < pend; )
+ {
+ int v = STRING_CHAR_ADVANCE (p);
+ int count = 1;
+ int len;
+
+ if (p < pend)
+ {
+ count = STRING_CHAR_AND_LENGTH (p, len);
+ if (count < 128)
+ count = 1;
+ else
+ {
+ count -= 128;
+ p += len;
+ }
+ }
+ while (count-- > 0)
+ subtbl->contents[idx++] = make_number (v);
+ }
+ }
+/* It seems that we don't need this function because C code won't need
+ to get a property that is compressed in this form. */
+#if 0
+ else if (*p == 0)
+ {
+ /* WORD-LIST TABLE */
+ }
+#endif
+ return sub;
+}
+
+
+/* Decode VALUE as an elemnet of char-table TABLE. */
+
+static Lisp_Object
+uniprop_decode_value_run_length (Lisp_Object table, Lisp_Object value)
+{
+ if (VECTORP (XCHAR_TABLE (table)->extras[4]))
+ {
+ Lisp_Object valvec = XCHAR_TABLE (table)->extras[4];
+
+ if (XINT (value) >= 0 && XINT (value) < ASIZE (valvec))
+ value = AREF (valvec, XINT (value));
+ }
+ return value;
+}
+
+static uniprop_decoder_t uniprop_decoder [] =
+ { uniprop_decode_value_run_length };
+
+static int uniprop_decoder_count
+ = (sizeof uniprop_decoder) / sizeof (uniprop_decoder[0]);
+
+
+/* Return the decoder of char-table TABLE or nil if none. */
+
+static uniprop_decoder_t
+uniprop_get_decoder (Lisp_Object table)
+{
+ int i;
+
+ if (! INTEGERP (XCHAR_TABLE (table)->extras[1]))
+ return NULL;
+ i = XINT (XCHAR_TABLE (table)->extras[1]);
+ if (i < 0 || i >= uniprop_decoder_count)
+ return NULL;
+ return uniprop_decoder[i];
+}
+
+
+/* Encode VALUE as an element of char-table TABLE which contains
+ characters as elements. */
+
+static Lisp_Object
+uniprop_encode_value_character (Lisp_Object table, Lisp_Object value)
+{
+ if (! NILP (value) && ! CHARACTERP (value))
+ wrong_type_argument (Qintegerp, value);
+ return value;
+}
+
+
+/* Encode VALUE as an element of char-table TABLE which adopts RUN-LENGTH
+ compression. */
+
+static Lisp_Object
+uniprop_encode_value_run_length (Lisp_Object table, Lisp_Object value)
+{
+ Lisp_Object *value_table = XVECTOR (XCHAR_TABLE (table)->extras[4])->contents;
+ int i, size = ASIZE (XCHAR_TABLE (table)->extras[4]);
+
+ for (i = 0; i < size; i++)
+ if (EQ (value, value_table[i]))
+ break;
+ if (i == size)
+ wrong_type_argument (build_string ("Unicode property value"), value);
+ return make_number (i);
+}
+
+
+/* Encode VALUE as an element of char-table TABLE which adopts RUN-LENGTH
+ compression and contains numbers as elements . */
+
+static Lisp_Object
+uniprop_encode_value_numeric (Lisp_Object table, Lisp_Object value)
+{
+ Lisp_Object *value_table = XVECTOR (XCHAR_TABLE (table)->extras[4])->contents;
+ int i, size = ASIZE (XCHAR_TABLE (table)->extras[4]);
+
+ CHECK_NUMBER (value);
+ for (i = 0; i < size; i++)
+ if (EQ (value, value_table[i]))
+ break;
+ value = make_number (i);
+ if (i == size)
+ {
+ Lisp_Object args[2];
+
+ args[0] = XCHAR_TABLE (table)->extras[4];
+ args[1] = Fmake_vector (make_number (1), value);
+ XCHAR_TABLE (table)->extras[4] = Fvconcat (2, args);
+ }
+ return make_number (i);
+}
+
+static uniprop_encoder_t uniprop_encoder[] =
+ { uniprop_encode_value_character,
+ uniprop_encode_value_run_length,
+ uniprop_encode_value_numeric };
+
+static int uniprop_encoder_count
+ = (sizeof uniprop_encoder) / sizeof (uniprop_encoder[0]);
+
+
+/* Return the encoder of char-table TABLE or nil if none. */
+
+static uniprop_decoder_t
+uniprop_get_encoder (Lisp_Object table)
+{
+ int i;
+
+ if (! INTEGERP (XCHAR_TABLE (table)->extras[2]))
+ return NULL;
+ i = XINT (XCHAR_TABLE (table)->extras[2]);
+ if (i < 0 || i >= uniprop_encoder_count)
+ return NULL;
+ return uniprop_encoder[i];
+}
+
+/* Return a char-table for Unicode character property PROP. This
+ function may load a Lisp file and thus may cause
+ garbage-collection. */
+
+Lisp_Object
+uniprop_table (Lisp_Object prop)
+{
+ Lisp_Object val, table, result;
+
+ val = Fassq (prop, Vchar_code_property_alist);
+ if (! CONSP (val))
+ return Qnil;
+ table = XCDR (val);
+ if (STRINGP (table))
+ {
+ struct gcpro gcpro1;
+ GCPRO1 (val);
+ result = Fload (concat2 (build_string ("international/"), table),
+ Qt, Qt, Qt, Qt);
+ UNGCPRO;
+ if (NILP (result))
+ return Qnil;
+ table = XCDR (val);
+ }
+ if (! CHAR_TABLE_P (table)
+ || ! UNIPROP_TABLE_P (table))
+ return Qnil;
+ val = XCHAR_TABLE (table)->extras[1];
+ if (INTEGERP (val)
+ ? (XINT (val) < 0 || XINT (val) >= uniprop_decoder_count)
+ : ! NILP (val))
+ return Qnil;
+ /* Prepare ASCII values in advance for CHAR_TABLE_REF. */
+ XCHAR_TABLE (table)->ascii = char_table_ascii (table);
+ return table;
+}
+
+DEFUN ("unicode-property-table-internal", Funicode_property_table_internal,
+ Sunicode_property_table_internal, 1, 1, 0,
+ doc: /* Return a char-table for Unicode character property PROP.
+Use `get-unicode-property-internal' and
+`put-unicode-property-internal' instead of `aref' and `aset' to get
+and put an element value. */)
+ (Lisp_Object prop)
+{
+ Lisp_Object table = uniprop_table (prop);
+
+ if (CHAR_TABLE_P (table))
+ return table;
+ return Fcdr (Fassq (prop, Vchar_code_property_alist));
+}
+
+DEFUN ("get-unicode-property-internal", Fget_unicode_property_internal,
+ Sget_unicode_property_internal, 2, 2, 0,
+ doc: /* Return an element of CHAR-TABLE for character CH.
+CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
+ (Lisp_Object char_table, Lisp_Object ch)
+{
+ Lisp_Object val;
+ uniprop_decoder_t decoder;
+
+ CHECK_CHAR_TABLE (char_table);
+ CHECK_CHARACTER (ch);
+ if (! UNIPROP_TABLE_P (char_table))
+ error ("Invalid Unicode property table");
+ val = CHAR_TABLE_REF (char_table, XINT (ch));
+ decoder = uniprop_get_decoder (char_table);
+ return (decoder ? decoder (char_table, val) : val);
+}
+
+DEFUN ("put-unicode-property-internal", Fput_unicode_property_internal,
+ Sput_unicode_property_internal, 3, 3, 0,
+ doc: /* Set an element of CHAR-TABLE for character CH to VALUE.
+CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
+ (Lisp_Object char_table, Lisp_Object ch, Lisp_Object value)
+{
+ uniprop_encoder_t encoder;
+
+ CHECK_CHAR_TABLE (char_table);
+ CHECK_CHARACTER (ch);
+ if (! UNIPROP_TABLE_P (char_table))
+ error ("Invalid Unicode property table");
+ encoder = uniprop_get_encoder (char_table);
+ if (encoder)
+ value = encoder (char_table, value);
+ CHAR_TABLE_SET (char_table, XINT (ch), value);
+ return Qnil;
+}
+
+\f
void
syms_of_chartab (void)
{
+ DEFSYM (Qchar_code_property_table, "char-code-property-table");
+
defsubr (&Smake_char_table);
defsubr (&Schar_table_parent);
defsubr (&Schar_table_subtype);
defsubr (&Sset_char_table_default);
defsubr (&Soptimize_char_table);
defsubr (&Smap_char_table);
+ defsubr (&Sunicode_property_table_internal);
+ defsubr (&Sget_unicode_property_internal);
+ defsubr (&Sput_unicode_property_internal);
+
+ /* Each element has the form (PROP . TABLE).
+ PROP is a symbol representing a character property.
+ TABLE is a char-table containing the property value for each character.
+ TABLE may be a name of file to load to build a char-table.
+ This variable should be modified only through
+ `define-char-code-property'. */
+
+ DEFVAR_LISP ("char-code-property-alist", Vchar_code_property_alist,
+ doc: /* Alist of character property name vs char-table containing property values.
+Internal use only. */);
+ Vchar_code_property_alist = Qnil;
}
((C) > ' ' \
&& ((C) == 0x200C || (C) == 0x200D \
|| (_work_val = CHAR_TABLE_REF (Vunicode_category_table, (C)), \
- (SYMBOLP (_work_val) \
- && (_work_char = SDATA (SYMBOL_NAME (_work_val))[0]) != 'C' \
- && _work_char != 'Z'))))
+ (INTEGERP (_work_val) \
+ && (XINT (_work_val) <= UNICODE_CATEGORY_So)))))
/* Update cmp_it->stop_pos to the next position after CHARPOS (and
BYTEPOS) where character composition may happen. If BYTEPOS is
/* FIXME: Bidi is not yet handled well in static composition. */
if (charpos < endpos
&& find_composition (charpos, endpos, &start, &end, &prop, string)
+ && start >= charpos
&& COMPOSITION_VALID_P (start, end, prop))
{
cmp_it->stop_pos = endpos = start;
/* Data type for describing the bidirectional character types. The
first 7 must be at the beginning, because they are the only values
valid in the `bidi_type' member of `struct glyph'; we only reserve
- 3 bits for it, so we cannot use there values larger than 7. */
+ 3 bits for it, so we cannot use there values larger than 7.
+
+ The order of members must be in sync with the 8th element of the
+ member of unidata-prop-alist (in admin/unidata/unidata-getn.el) for
+ Unicode character property `bidi-class'. */
typedef enum {
UNKNOWN_BT = 0,
STRONG_L, /* strong left-to-right */
on subsequent starts. */
int initialized;
+#ifdef DARWIN_OS
+extern void unexec_init_emacs_zone (void);
+#endif
+
#ifdef DOUG_LEA_MALLOC
/* Preserves a pointer to the memory allocated that copies that
static data inside glibc's malloc. */
else
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte);
category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (EQ (category, QCf)
- || CHAR_VARIATION_SELECTOR_P (c))
+ if (INTEGERP (category)
+ && (XINT (category) == UNICODE_CATEGORY_Cf
+ || CHAR_VARIATION_SELECTOR_P (c)))
continue;
if (NILP (font_object))
{
struct x_output *x = f->output_data.x;
if (x->ttip_widget == NULL)
{
+ GtkWidget *p;
+ GList *list, *iter;
+
g_object_set (G_OBJECT (widget), "has-tooltip", FALSE, NULL);
x->ttip_widget = tooltip;
g_object_ref (G_OBJECT (tooltip));
g_object_ref (G_OBJECT (x->ttip_lbl));
gtk_tooltip_set_custom (tooltip, x->ttip_lbl);
x->ttip_window = GTK_WINDOW (gtk_widget_get_toplevel (x->ttip_lbl));
+
+ /* Change stupid Gtk+ default line wrapping. */
+ p = gtk_widget_get_parent (x->ttip_lbl);
+ list = gtk_container_get_children (GTK_CONTAINER (p));
+ iter;
+ for (iter = list; iter; iter = g_list_next (iter))
+ {
+ GtkWidget *w = GTK_WIDGET (iter->data);
+ if (GTK_IS_LABEL (w))
+ gtk_label_set_line_wrap (GTK_LABEL (w), FALSE);
+ }
+ g_list_free (list);
+
/* ATK needs an empty title for some reason. */
gtk_window_set_title (x->ttip_window, "");
/* Realize so we can safely get screen later on. */
int
xg_prepare_tooltip (FRAME_PTR f,
- Lisp_Object string,
- int *width,
+ Lisp_Object string,
+ int *width,
int *height)
{
#ifndef USE_GTK_TOOLTIP
(gtk_widget_get_display (GTK_WIDGET (x->ttip_window))),
"gdk-display-current-tooltip", NULL);
- /* Put out dummy widget in so we can get callbacks for unrealize and
+ /* Put our dummy widget in so we can get callbacks for unrealize and
hierarchy-changed. */
gtk_tooltip_set_custom (x->ttip_widget, widget);
-
gtk_tooltip_set_text (x->ttip_widget, SSDATA (encoded_string));
gtk_widget_get_preferred_size (GTK_WIDGET (x->ttip_window), NULL, &req);
if (width) *width = req.width;
}
/* Hide tooltip if shown. Do nothing if not shown.
- Return non-zero if tip was hidden, non-ero if not (i.e. not using
+ Return non-zero if tip was hidden, non-zero if not (i.e. not using
system tooltips). */
int
to look through.
If MENTION_SHADOW is nonzero, then when something is shadowed by SHADOW,
- don't omit it; instead, mention it but say it is shadowed. */
+ don't omit it; instead, mention it but say it is shadowed.
-void
+ Return whether something was inserted or not. */
+
+int
describe_map_tree (Lisp_Object startmap, int partial, Lisp_Object shadow,
Lisp_Object prefix, const char *title, int nomenu, int transl,
int always_title, int mention_shadow)
skip: ;
}
- if (something)
- insert_string ("\n");
-
UNGCPRO;
+ return something;
}
static int previous_description_column;
extern Lisp_Object access_keymap (Lisp_Object, Lisp_Object, int, int, int);
extern Lisp_Object get_keymap (Lisp_Object, int, int);
EXFUN (Fset_keymap_parent, 2);
-extern void describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
- const char *, int, int, int, int);
+extern int describe_map_tree (Lisp_Object, int, Lisp_Object, Lisp_Object,
+ const char *, int, int, int, int);
extern int current_minor_maps (Lisp_Object **, Lisp_Object **);
extern void initial_define_key (Lisp_Object, int, const char *);
extern void initial_define_lispy_key (Lisp_Object, const char *, const char *);
+++ /dev/null
-/* machine description file for Iris-4D machines. Use with s/irix*.h.
-
-Copyright (C) 1987, 2001-2011 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 3 of the License, 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. If not, see <http://www.gnu.org/licenses/>. */
-
-
-/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
- were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
- the value field of a LISP_OBJECT). */
-#define DATA_START 0x10000000
-#define DATA_SEG_BITS 0x10000000
-
struct terminal *t = get_terminal (frame, 1);
if (t->type != output_ns)
- error ("Terminal %d is not a Nextstep display", XINT (frame));
+ error ("Terminal %ld is not a Nextstep display", (long) XINT (frame));
return t->display_info.ns;
}
/* Register our external input/output types, used for determining
applicable services and also drag/drop eligibility. */
- ns_send_types = [[NSArray arrayWithObject: NSStringPboardType] retain];
- ns_return_types = [[NSArray arrayWithObject: NSStringPboardType] retain];
+ ns_send_types = [[NSArray arrayWithObjects: NSStringPboardType, nil] retain];
+ ns_return_types = [[NSArray arrayWithObjects: NSStringPboardType, nil]
+ retain];
ns_drag_types = [[NSArray arrayWithObjects:
NSStringPboardType,
NSTabularTextPboardType,
doc: /* List available Nextstep services by querying NSApp. */)
(void)
{
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ /* You can't get services like this in 10.6+. */
+ return Qnil;
+#else
Lisp_Object ret = Qnil;
NSMenu *svcs;
id delegate;
ret = interpret_services_menu (svcs, Qnil, ret);
return ret;
+#endif
}
#undef init_process
#endif /* NS_IMPL_COCOA */
+#undef verify
+
#import <AppKit/AppKit.h>
#ifdef NS_IMPL_COCOA
#endif /* __OBJC__ */
+#undef verify
+#undef _GL_VERIFY_H
+#include <verify.h>
/* menu-related */
#define free_widget_value(wv) xfree (wv)
image = [[EmacsImage alloc] initByReferencingFile:
[NSString stringWithUTF8String: SDATA (found)]];
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+ imgRep = [NSBitmapImageRep imageRepWithData:[image TIFFRepresentation]];
+#else
imgRep = [image bestRepresentationForDevice: nil];
+#endif
if (imgRep == nil)
{
[image release];
{
/* but we need to make sure it will update on demand */
[svcsMenu setFrame: f];
- [svcsMenu setDelegate: svcsMenu];
}
else
#endif
if ([[self window] isVisible])
[self sizeToFit];
#else
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2
if ([self supermenu] == nil)
[self sizeToFit];
#endif
+#endif
}
}
-static Lisp_Object
+Lisp_Object
ns_get_local_selection (Lisp_Object selection_name,
Lisp_Object target_type)
{
utfStr = [mstr UTF8String];
length = [mstr lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
+#if ! defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
if (!utfStr)
{
utfStr = [mstr cString];
length = strlen (utfStr);
}
+#endif
}
NS_HANDLER
{
message1 ("ns_string_from_pasteboard: UTF8String failed\n");
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
+ utfStr = "Conversion failed";
+#else
utfStr = [str lossyCString];
+#endif
length = strlen (utfStr);
}
NS_ENDHANDLER
#ifdef HAVE_NS
+#ifdef NS_IMPL_COCOA
+#ifndef MAC_OS_X_VERSION_10_3
+#define MAC_OS_X_VERSION_10_3 1030
+#endif
+#ifndef MAC_OS_X_VERSION_10_4
+#define MAC_OS_X_VERSION_10_4 1040
+#endif
+#ifndef MAC_OS_X_VERSION_10_5
+#define MAC_OS_X_VERSION_10_5 1050
+#endif
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+#endif /* NS_IMPL_COCOA */
+
#ifdef __OBJC__
/* ==========================================================================
@class EmacsToolbar;
-@interface EmacsView : NSView <NSTextInput> /* 10.6+: NSWindowDelegate */
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+@interface EmacsView : NSView <NSTextInput, NSWindowDelegate>
+#else
+@interface EmacsView : NSView <NSTextInput>
+#endif
{
char *old_title;
BOOL windowClosing;
========================================================================== */
-@interface EmacsMenu : NSMenu /* 10.6+: <NSMenuDelegate> */
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+@interface EmacsMenu : NSMenu <NSMenuDelegate>
+#else
+@interface EmacsMenu : NSMenu
+#endif
{
struct frame *frame;
unsigned long keyEquivModMask;
@class EmacsImage;
-@interface EmacsToolbar : NSToolbar /* 10.6+: <NSToolbarDelegate> */
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+@interface EmacsToolbar : NSToolbar <NSToolbarDelegate>
+#else
+@interface EmacsToolbar : NSToolbar
+#endif
{
EmacsView *emacsView;
NSMutableDictionary *identifierToItem;
- (Lisp_Object)runDialogAt: (NSPoint)p;
@end
-@interface EmacsTooltip : NSObject /* 10.6+: <NSWindowDelegate> */
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
+@interface EmacsTooltip : NSObject <NSWindowDelegate>
+#else
+@interface EmacsTooltip : NSObject
+#endif
{
NSWindow *win;
NSTextField *textField;
extern Lisp_Object ns_map_event_to_object ();
extern Lisp_Object ns_string_from_pasteboard ();
extern void ns_string_to_pasteboard ();
+extern Lisp_Object ns_get_local_selection (Lisp_Object selection_name,
+ Lisp_Object target_type);
extern void nxatoms_of_nsselect ();
extern int ns_lisp_to_cursor_type ();
extern Lisp_Object ns_cursor_type_to_lisp (int arg);
0x1B, 0x1B /* escape */
};
-
static Lisp_Object Qmodifier_value;
Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper, Qnone;
extern Lisp_Object Qcursor_color, Qcursor_type, Qns, Qleft;
+static Lisp_Object QUTF8_STRING;
+
/* On OS X picks up the default NSGlobalDomain AppleAntiAliasingThreshold,
the maximum font size to NOT antialias. On GNUstep there is currently
no way to control this behavior. */
unsigned fnKeysym = 0;
int flags;
static NSMutableArray *nsEvArray;
+#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
static BOOL firstTime = YES;
+#endif
int left_is_none;
NSTRACE (keyDown);
}
}
+
+#if !defined (NS_IMPL_COCOA) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
/* if we get here we should send the key for input manager processing */
if (firstTime && [[NSInputManager currentInputManager]
wantsToDelayTextChangeNotifications] == NO)
fprintf (stderr,
"Emacs: WARNING: TextInput mgr wants marked text to be permanent!\n");
firstTime = NO;
-
+#endif
if (NS_KEYLOG && !processingCompose)
fprintf (stderr, "keyDown: Begin compose sequence.\n");
[self allocateGState];
+ [NSApp registerServicesMenuSendTypes: ns_send_types
+ returnTypes: nil];
+
ns_window_num++;
return self;
}
}
-- validRequestorForSendType: (NSString *)typeSent
- returnType: (NSString *)typeReturned
+- (id) validRequestorForSendType: (NSString *)typeSent
+ returnType: (NSString *)typeReturned
{
NSTRACE (validRequestorForSendType);
- if ([ns_send_types indexOfObjectIdenticalTo: typeSent] != NSNotFound &&
- [ns_return_types indexOfObjectIdenticalTo: typeSent] != NSNotFound)
- return self;
+ if (typeSent != nil && [ns_send_types indexOfObject: typeSent] != NSNotFound
+ && typeReturned == nil)
+ {
+ if (! NILP (ns_get_local_selection (QPRIMARY, QUTF8_STRING)))
+ return self;
+ }
return [super validRequestorForSendType: typeSent
returnType: typeReturned];
- (BOOL) writeSelectionToPasteboard: (NSPasteboard *)pb types: (NSArray *)types
{
- /* supposed to write for as many of types as we are able */
- return NO;
+ NSArray *typesDeclared;
+ Lisp_Object val;
+
+ /* We only support NSStringPboardType */
+ if ([types containsObject:NSStringPboardType] == NO) {
+ return NO;
+ }
+
+ val = ns_get_local_selection (QPRIMARY, QUTF8_STRING);
+ if (CONSP (val) && SYMBOLP (XCAR (val)))
+ {
+ val = XCDR (val);
+ if (CONSP (val) && NILP (XCDR (val)))
+ val = XCAR (val);
+ }
+ if (! STRINGP (val))
+ return NO;
+
+ typesDeclared = [NSArray arrayWithObject:NSStringPboardType];
+ [pb declareTypes:typesDeclared owner:nil];
+ ns_string_to_pasteboard (pb, val);
+ return YES;
}
em_whole = whole;
if (portion >= whole)
- [self setFloatValue: 0.0 knobProportion: 1.0];
+ {
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+ [self setKnobProportion: 1.0];
+ [self setDoubleValue: 1.0];
+#else
+ [self setFloatValue: 0.0 knobProportion: 1.0];
+#endif
+ }
else
{
float pos, por;
portion = max ((float)whole*min_portion/pixel_height, portion);
pos = (float)position / (whole - portion);
por = (float)portion/whole;
+#if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_5
+ [self setKnobProportion: por];
+ [self setDoubleValue: pos];
+#else
[self setFloatValue: pos knobProportion: por];
+#endif
}
return self;
}
DEFSYM (Qsuper, "super");
DEFSYM (Qcontrol, "control");
DEFSYM (Qnone, "none");
+ DEFSYM (QUTF8_STRING, "UTF8_STRING");
+
Fput (Qalt, Qmodifier_value, make_number (alt_modifier));
Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier));
Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
sigaddset (&blocked, SIGHUP ); sigaction (SIGHUP , 0, &sighup_action );
#endif
#endif /* HAVE_WORKING_VFORK */
- sigprocmask (SIG_BLOCK, &blocked, &procmask);
+ pthread_sigmask (SIG_BLOCK, &blocked, &procmask);
FD_SET (inchannel, &input_wait_mask);
FD_SET (inchannel, &non_keyboard_wait_mask);
signal (SIGPIPE, SIG_DFL);
/* Stop blocking signals in the child. */
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
if (pty_flag)
child_setup_tty (xforkout);
#endif
#endif /* HAVE_WORKING_VFORK */
/* Stop blocking signals in the parent. */
- sigprocmask (SIG_SETMASK, &procmask, 0);
+ pthread_sigmask (SIG_SETMASK, &procmask, 0);
/* Now generate the error if vfork failed. */
if (pid < 0)
/* Tested on Irix 6.5. SCM worked on earlier versions. */
#define GC_SETJMP_WORKS 1
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
+
+
+/* DATA_SEG_BITS forces extra bits to be or'd in with any pointers which
+ were stored in a Lisp_Object (as Emacs uses fewer than 32 bits for
+ the value field of a LISP_OBJECT). */
+#define DATA_START 0x10000000
+#define DATA_SEG_BITS 0x10000000
sys_sigblock (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_BLOCK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_BLOCK, &new_mask, &old_mask);
return (old_mask);
}
sys_sigunblock (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_UNBLOCK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_UNBLOCK, &new_mask, &old_mask);
return (old_mask);
}
sys_sigsetmask (sigset_t new_mask)
{
sigset_t old_mask;
- sigprocmask (SIG_SETMASK, &new_mask, &old_mask);
+ pthread_sigmask (SIG_SETMASK, &new_mask, &old_mask);
return (old_mask);
}
/* Nothing but characters are supported on terminal frames. */
xassert (it->what == IT_CHARACTER
|| it->what == IT_COMPOSITION
- || it->what == IT_STRETCH);
+ || it->what == IT_STRETCH
+ || it->what == IT_GLYPHLESS);
if (it->what == IT_STRETCH)
{
{
/* Free memory used by owner-drawn and help-echo strings. */
w32_free_menu_strings (hwnd);
- f->output_data.w32->menubar_active = 0;
+ if (f)
+ f->output_data.w32->menubar_active = 0;
menubar_in_use = 0;
}
}
if (LOWORD (lParam) == HTCLIENT)
{
f = x_window_to_frame (dpyinfo, hwnd);
- if (f->output_data.w32->hourglass_p && !menubar_in_use
- && !current_popup_menu)
+ if (f && f->output_data.w32->hourglass_p
+ && !menubar_in_use && !current_popup_menu)
SetCursor (f->output_data.w32->hourglass_cursor);
- else
+ else if (f)
SetCursor (f->output_data.w32->current_cursor);
return 0;
}
&& COMPOSITION_VALID_P (start, end, prop)
&& (STRINGP (it->string) || (PT <= start || PT >= end)))
{
+ if (start < pos)
+ /* As we can't handle this situation (perhaps font-lock added
+ a new composition), we just return here hoping that next
+ redisplay will detect this composition much earlier. */
+ return HANDLED_NORMALLY;
if (start != pos)
{
if (STRINGP (it->string))