emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e946a9a: Miscellaneous tiny fixes here and there.


From: Dmitry Antipov
Subject: [Emacs-diffs] master e946a9a: Miscellaneous tiny fixes here and there.
Date: Mon, 12 Jan 2015 17:17:36 +0000

branch: master
commit e946a9acf6e12137caf836fc043d695c65684110
Author: Dmitry Antipov <address@hidden>
Commit: Dmitry Antipov <address@hidden>

    Miscellaneous tiny fixes here and there.
    
    * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
    Remove dead NILP check.
    * image.c (Flookup_image): Use regular format for docstring.
    * keyboard.c (apply_modifiers_uncached): Use stpcpy.
---
 src/ChangeLog  |    7 +++++++
 src/fileio.c   |    5 -----
 src/image.c    |    3 ++-
 src/keyboard.c |    8 ++++----
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/ChangeLog b/src/ChangeLog
index ea6274f..32f17e1 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-12  Dmitry Antipov  <address@hidden>
+
+       * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
+       Remove dead NILP check.
+       * image.c (Flookup_image): Use regular format for docstring.
+       * keyboard.c (apply_modifiers_uncached): Use stpcpy.
+
 2015-01-12  Martin Rudalics  <address@hidden>
 
        * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
diff --git a/src/fileio.c b/src/fileio.c
index 15c6f91..cd3c485 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -522,8 +522,6 @@ For a Unix-syntax file name, just appends a slash.  */)
   USE_SAFE_ALLOCA;
 
   CHECK_STRING (file);
-  if (NILP (file))
-    return Qnil;
 
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */
@@ -591,9 +589,6 @@ In Unix-syntax, this function just removes the final slash. 
 */)
 
   CHECK_STRING (directory);
 
-  if (NILP (directory))
-    return Qnil;
-
   /* If the file name has special constructs in it,
      call the corresponding file handler.  */
   handler = Ffind_file_name_handler (directory, Qdirectory_file_name);
diff --git a/src/image.c b/src/image.c
index 5d08a89..9c09c55 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9288,7 +9288,8 @@ DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0,
 }
 
 
-DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
+DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0,
+       doc: /* */)
   (Lisp_Object spec)
 {
   ptrdiff_t id = -1;
diff --git a/src/keyboard.c b/src/keyboard.c
index 5411aff..9d6eb07 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6270,10 +6270,10 @@ apply_modifiers_uncached (int modifiers, char *base, 
int base_len, int base_len_
     if (modifiers & meta_modifier)  { *p++ = 'M'; *p++ = '-'; }
     if (modifiers & shift_modifier) { *p++ = 'S'; *p++ = '-'; }
     if (modifiers & super_modifier) { *p++ = 's'; *p++ = '-'; }
-    if (modifiers & double_modifier)  { strcpy (p, "double-");  p += 7; }
-    if (modifiers & triple_modifier)  { strcpy (p, "triple-");  p += 7; }
-    if (modifiers & down_modifier)  { strcpy (p, "down-");  p += 5; }
-    if (modifiers & drag_modifier)  { strcpy (p, "drag-");  p += 5; }
+    if (modifiers & double_modifier) p = stpcpy (p, "double-");
+    if (modifiers & triple_modifier) p = stpcpy (p, "triple-");
+    if (modifiers & down_modifier) p = stpcpy (p, "down-");
+    if (modifiers & drag_modifier) p = stpcpy (p, "drag-");
     /* The click modifier is denoted by the absence of other modifiers.  */
 
     *p = '\0';



reply via email to

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