emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/international/mule-util.el,v


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule-util.el,v
Date: Thu, 20 Nov 2008 23:07:47 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Juanma Barranquero <lektu>      08/11/20 23:07:46

Index: international/mule-util.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-util.el,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -b -r1.72 -r1.73
--- international/mule-util.el  12 Jun 2008 03:56:18 -0000      1.72
+++ international/mule-util.el  20 Nov 2008 23:07:46 -0000      1.73
@@ -233,8 +233,8 @@
 (defun set-nested-alist (keyseq entry alist &optional len branches)
   "Set ENTRY for KEYSEQ in a nested alist ALIST.
 Optional 4th arg LEN non-nil means the first LEN elements in KEYSEQ
- is considered.
-Optional argument BRANCHES if non-nil is branches for a keyseq
+ are considered.
+Optional 5th argument BRANCHES if non-nil is branches for a keyseq
 longer than KEYSEQ.
 See the documentation of `nested-alist-p' for more detail."
   (or (nested-alist-p alist)
@@ -248,10 +248,9 @@
          (error "Keyseq %s is too long for this nested alist" keyseq))
       (setq key-elt (if islist (nth i keyseq) (aref keyseq i)))
       (setq slot (assoc key-elt (cdr alist)))
-      (if (null slot)
-         (progn
+      (unless slot
            (setq slot (cons key-elt (list t)))
-           (setcdr alist (cons slot (cdr alist)))))
+       (setcdr alist (cons slot (cdr alist))))
       (setq alist (cdr slot))
       (setq i (1+ i)))
     (setcar alist entry)
@@ -261,14 +260,14 @@
 ;;;###autoload
 (defun lookup-nested-alist (keyseq alist &optional len start nil-for-too-long)
   "Look up key sequence KEYSEQ in nested alist ALIST.  Return the definition.
-Optional 1st argument LEN specifies the length of KEYSEQ.
-Optional 2nd argument START specifies index of the starting key.
+Optional 3rd argument LEN specifies the length of KEYSEQ.
+Optional 4th argument START specifies index of the starting key.
 The returned value is normally a nested alist of which
 car part is the entry for KEYSEQ.
 If ALIST is not deep enough for KEYSEQ, return number which is
  how many key elements at the front of KEYSEQ it takes
  to reach a leaf in ALIST.
-Optional 3rd argument NIL-FOR-TOO-LONG non-nil means return nil
+Optional 5th argument NIL-FOR-TOO-LONG non-nil means return nil
  even if ALIST is not deep enough."
   (or (nested-alist-p alist)
       (error "Invalid argument %s" alist))
@@ -315,9 +314,9 @@
 ;;;###autoload
 (defmacro with-coding-priority (coding-systems &rest body)
   "Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list.
-CODING-SYSTEMS is a list of coding systems.  See
-`set-coding-priority'.  This affects the implicit sorting of lists of
-coding sysems returned by operations such as `find-coding-systems-region'."
+CODING-SYSTEMS is a list of coding systems.  See `set-coding-priority'.
+This affects the implicit sorting of lists of coding sysems returned by
+operations such as `find-coding-systems-region'."
   (let ((current (make-symbol "current")))
   `(let ((,current (coding-system-priority-list)))
      (apply #'set-coding-system-priority ,coding-systems)
@@ -335,7 +334,7 @@
   `(with-coding-priority (mapcar #'cdr ,priority-list)
      (detect-coding-region ,from ,to)))
 (make-obsolete 'detect-coding-with-priority
-              "Use with-coding-priority and detect-coding-region" "23.1")
+              "use `with-coding-priority' and `detect-coding-region'." "23.1")
 
 ;;;###autoload
 (defun detect-coding-with-language-environment (from to lang-env)
@@ -353,9 +352,9 @@
 (defun char-displayable-p (char)
   "Return non-nil if we should be able to display CHAR.
 On a multi-font display, the test is only whether there is an
-appropriate font from the selected frame's fontset to display CHAR's
-charset in general.  Since fonts may be specified on a per-character
-basis, this may not be accurate."
+appropriate font from the selected frame's fontset to display
+CHAR's charset in general.  Since fonts may be specified on a
+per-character basis, this may not be accurate."
   (cond ((< char 128)
         ;; ASCII characters are always displayable.
         t)
@@ -371,7 +370,7 @@
         ;; On a terminal, a character is displayable if the coding
         ;; system for the terminal can encode it.
         (let ((coding (terminal-coding-system)))
-          (if coding
+          (when coding
               (let ((cs-list (coding-system-get coding :charset-list)))
                 (cond
                  ((listp cs-list)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]